Message ID | 20231019080437.94849-1-subhajit.ghosh@tweaklogic.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp227293vqb; Thu, 19 Oct 2023 01:05:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEsvYrJLLBtYJPgYiLdlapKh9vHyAeo+bjDiJLPo+owMZLhAusJDPI3j2TwYzZn7hNiRQLm X-Received: by 2002:a05:6359:d11:b0:164:8d78:257f with SMTP id gp17-20020a0563590d1100b001648d78257fmr1066581rwb.17.1697702707020; Thu, 19 Oct 2023 01:05:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697702706; cv=none; d=google.com; s=arc-20160816; b=DAL1QRHtYWv5UwyazBoB3cbg9bU+sh46NgaK1pxhsJ3+dE47xhZBLn3NvbLd1/0b8m DNGumfVhHm5ViOalSSzBZV0gNcfFyYMBdnLWQzqij7va/F/mSSSNZXyZjTplnzehN31D hbpzlnYrrFKsmdza/53ke77WTZ+hj4mIa7nKKys4qkm9htNTkHLnjYZ6xjTkZ9mxa+uU gJ2sxoVVJTtqUTNra7WhRMasD2gIhyFZU8F8RMdd5swxOT78UT6tCUF5qtzhYAcsepFN KXbYENLAWgVV4affV7YtFDEUr1fo/Mp/yBNyJugPVHnI6JCpyKskhwegMdMtpDKBcD9K 9xVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=amvbJJr0EcJgPf0fIdoc/bnu/yWtT48GlSjc/kIMZRs=; fh=za5I+aJXikAfnTuOxkDsj/FJKJDokYaKVN9s5RwabmQ=; b=hoMG9RMka1nK0+IpVptyxwhijVTvUEWXXW0lAQCmlnCoDa4jztwOzgGTCc14Dj5jH2 uDxXTbZU2R8xUNqOLp30MGlr93sb8e0U9Sujs8Ez7ZG7qv47AwrTtnEehVpzGutSvGbV Z9svRVDk+BNawfIcWsBGdbk50zKwsif4WY19tc19Q2s1j41BKuVsYtNBxaTpjmxtkscy 5opIgeFw91eXIjlhRb6RB+6vtydz5bITALfu+5UHYmhV1vTgcLLMYNr2fdvmSX94WqM9 rJs53fKNQS2CzDsCetSvVXHshtLEO88ditMMPq7ggfhYt0J5fqmSHM6TWOwVUTo5RIYz QOqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tweaklogic.com header.s=google header.b="Au/vv363"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id q4-20020aa78424000000b006b1fc88d095si5391351pfn.71.2023.10.19.01.04.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 01:05:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@tweaklogic.com header.s=google header.b="Au/vv363"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 2CE6282224E8; Thu, 19 Oct 2023 01:04:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232897AbjJSIEy (ORCPT <rfc822;zwp10758@gmail.com> + 24 others); Thu, 19 Oct 2023 04:04:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232788AbjJSIEx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 19 Oct 2023 04:04:53 -0400 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 037F2121 for <linux-kernel@vger.kernel.org>; Thu, 19 Oct 2023 01:04:51 -0700 (PDT) Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1c9e072472bso51017765ad.2 for <linux-kernel@vger.kernel.org>; Thu, 19 Oct 2023 01:04:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tweaklogic.com; s=google; t=1697702690; x=1698307490; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=amvbJJr0EcJgPf0fIdoc/bnu/yWtT48GlSjc/kIMZRs=; b=Au/vv363RpvXXgjrtpEcrVjvHwoj427iFtyqpAn6hKxsSLgb/juW+obeRrhc5hwSsI Idmwtum0xSNisMJM9qRgE4Be+hPVAswTLXVishu2pJjF31SUBjGrLMm0Qonsf9RI/OZx POSgWCatAVh/1Mz1WonzNNViMJM9cxHA3b/9M/3hQlF1HPrsyfrAUgITtkulvqglYfRW QcohId+SMn1SBF9C6sx7faZOJvvOZZWc3RDna/oOWXGm9zAzc+lprnVOURUCWsPYSg5q WbS4g2c9J7D8MS9sGnUVQgA/NMn0Sd3Oc0Ia3i2D0EEhApZ8NWqPX0hDKhWFnx1JD8bK LDqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697702690; x=1698307490; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=amvbJJr0EcJgPf0fIdoc/bnu/yWtT48GlSjc/kIMZRs=; b=COI1R0lRv5nzt0oGo76KlPjsmXHuNgw1n/3l2xreUzMNoiCy6GfGK9TVaPnrhHG0an EwsE8U4ZAw+0kt1WtjpG8VDmGGc6NnHMa0Ff54wzc0tAEobJsBbdKZreR+JpE2C8xS5h eQ6Oe4yCBV14E0teDBwdqUiVvW966UhI/rTj6GrE+X9Hnbub9Ju2KFzsBlUfE2AT8/WT md3NtCPorACtpYC5beTy56hHjAbprYxgMFhzvo4OWB3JD49MzEi6p6lwO2QGK4sIJ7vW WhETOv2LGGf3D3OnVCPx2dxSZSYpNjO7M4Tin6/Vp/E6GqPt8a73Ny1Y5Uqh/57DtLDk uK6A== X-Gm-Message-State: AOJu0YzsIfrT3+Mn1rUDm5NLBb9CQmi8of+AQYV17XyJZmmczY4MU0JX eL0MpNpYQVN4CyjSSjhZhljppw== X-Received: by 2002:a17:902:d042:b0:1c7:49dd:2df with SMTP id l2-20020a170902d04200b001c749dd02dfmr1225061pll.32.1697702690357; Thu, 19 Oct 2023 01:04:50 -0700 (PDT) Received: from localhost.localdomain (2403-580d-82f4-0-43ac-2324-cc6e-9fa5.ip6.aussiebb.net. [2403:580d:82f4:0:43ac:2324:cc6e:9fa5]) by smtp.gmail.com with ESMTPSA id a20-20020a170902ee9400b001c739768214sm1245450pld.92.2023.10.19.01.04.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 01:04:49 -0700 (PDT) From: Subhajit Ghosh <subhajit.ghosh@tweaklogic.com> To: Jonathan Cameron <jic23@kernel.org>, Lars-Peter Clausen <lars@metafoo.de>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org> Cc: Subhajit Ghosh <subhajit.ghosh@tweaklogic.com>, Matt Ranostay <matt.ranostay@konsulko.com>, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dt-bindings: iio: light: Squash APDS9300 and APDS9960 schemas Date: Thu, 19 Oct 2023 18:34:37 +1030 Message-Id: <20231019080437.94849-1-subhajit.ghosh@tweaklogic.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 19 Oct 2023 01:04:58 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780170313650070789 X-GMAIL-MSGID: 1780170313650070789 |
Series |
dt-bindings: iio: light: Squash APDS9300 and APDS9960 schemas
|
|
Commit Message
Subhajit Ghosh
Oct. 19, 2023, 8:04 a.m. UTC
Squashing Avago (Broadcom) APDS9300 and APDS9960 schemas into one
file and removing the other.
Link: https://lore.kernel.org/all/4e785d2e-d310-4592-a75a-13549938dcef@linaro.org/
Signed-off-by: Subhajit Ghosh <subhajit.ghosh@tweaklogic.com>
---
.../bindings/iio/light/avago,apds9300.yaml | 35 ++++++++++++---
.../bindings/iio/light/avago,apds9960.yaml | 44 -------------------
2 files changed, 29 insertions(+), 50 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml
Comments
On Thu, Oct 19, 2023 at 06:34:37PM +1030, Subhajit Ghosh wrote: > Squashing Avago (Broadcom) APDS9300 and APDS9960 schemas into one > file and removing the other. > Link: https://lore.kernel.org/all/4e785d2e-d310-4592-a75a-13549938dcef@linaro.org/ "Yes, they look similar. I will combine them all in a single yaml file in the next revision. Thank you Krzysztof." Yet this is a follow-up patch, not a version 2. The original patches seem to not have been applied, so I am not sure why you didn't send a v2? Cheers, Conor. > --- > .../bindings/iio/light/avago,apds9300.yaml | 35 ++++++++++++--- > .../bindings/iio/light/avago,apds9960.yaml | 44 ------------------- > 2 files changed, 29 insertions(+), 50 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml > > diff --git a/Documentation/devicetree/bindings/iio/light/avago,apds9300.yaml b/Documentation/devicetree/bindings/iio/light/avago,apds9300.yaml > index 206af44f2c43..7826a1749fcd 100644 > --- a/Documentation/devicetree/bindings/iio/light/avago,apds9300.yaml > +++ b/Documentation/devicetree/bindings/iio/light/avago,apds9300.yaml > @@ -4,17 +4,26 @@ > $id: http://devicetree.org/schemas/iio/light/avago,apds9300.yaml# > $schema: http://devicetree.org/meta-schemas/core.yaml# > > -title: Avago APDS9300 ambient light sensor > +title: Avago Gesture, RGB, ALS and Proximity sensors > > maintainers: > - Jonathan Cameron <jic23@kernel.org> > + - Matt Ranostay <matt.ranostay@konsulko.com> > > description: | > - Datasheet at https://www.avagotech.com/docs/AV02-1077EN > + Avago (Broadcom) optical and proximity sensors with I2C interfaces. > + Datasheet at https://docs.broadcom.com/doc/AV02-1077EN > + Datasheet at https://docs.broadcom.com/doc/AV02-4191EN > > properties: > compatible: > - const: avago,apds9300 > + oneOf: > + - items: > + - const: avago,apds9300 > + - const: avago,apds9960 > + - enum: > + - avago,apds9300 > + - avago,apds9960 > > reg: > maxItems: 1 > @@ -22,14 +31,28 @@ properties: > interrupts: > maxItems: 1 > > -additionalProperties: false > - > required: > - compatible > - reg > > +allOf: > + - $ref: ../common.yaml# > + - if: > + properties: > + compatible: > + contains: > + enum: > + - avago,apds9960 > + then: > + required: > + - interrupts > + > +additionalProperties: false > + > examples: > - | > + #include <dt-bindings/interrupt-controller/irq.h> > + > i2c { > #address-cells = <1>; > #size-cells = <0>; > @@ -38,7 +61,7 @@ examples: > compatible = "avago,apds9300"; > reg = <0x39>; > interrupt-parent = <&gpio2>; > - interrupts = <29 8>; > + interrupts = <29 IRQ_TYPE_LEVEL_LOW>; > }; > }; > ... > diff --git a/Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml b/Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml > deleted file mode 100644 > index f06e0fda5629..000000000000 > --- a/Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml > +++ /dev/null > @@ -1,44 +0,0 @@ > -# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > -%YAML 1.2 > ---- > -$id: http://devicetree.org/schemas/iio/light/avago,apds9960.yaml# > -$schema: http://devicetree.org/meta-schemas/core.yaml# > - > -title: Avago APDS9960 gesture/RGB/ALS/proximity sensor > - > -maintainers: > - - Matt Ranostay <matt.ranostay@konsulko.com> > - > -description: | > - Datasheet at https://www.avagotech.com/docs/AV02-4191EN > - > -properties: > - compatible: > - const: avago,apds9960 > - > - reg: > - maxItems: 1 > - > - interrupts: > - maxItems: 1 > - > -additionalProperties: false > - > -required: > - - compatible > - - reg > - > -examples: > - - | > - i2c { > - #address-cells = <1>; > - #size-cells = <0>; > - > - light-sensor@39 { > - compatible = "avago,apds9960"; > - reg = <0x39>; > - interrupt-parent = <&gpio1>; > - interrupts = <16 1>; > - }; > - }; > -... > -- > 2.34.1 >
On Thu, Oct 19, 2023 at 09:51:39AM +0100, Conor Dooley wrote: > On Thu, Oct 19, 2023 at 06:34:37PM +1030, Subhajit Ghosh wrote: > > Squashing Avago (Broadcom) APDS9300 and APDS9960 schemas into one > > file and removing the other. > > > Link: https://lore.kernel.org/all/4e785d2e-d310-4592-a75a-13549938dcef@linaro.org/ > > "Yes, they look similar. I will combine them all in a single yaml file in > the next revision. Thank you Krzysztof." > > Yet this is a follow-up patch, not a version 2. The original patches > seem to not have been applied, so I am not sure why you didn't send a > v2? > > --- > > .../bindings/iio/light/avago,apds9300.yaml | 35 ++++++++++++--- > > .../bindings/iio/light/avago,apds9960.yaml | 44 ------------------- > > 2 files changed, 29 insertions(+), 50 deletions(-) > > delete mode 100644 Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml > > > > diff --git a/Documentation/devicetree/bindings/iio/light/avago,apds9300.yaml b/Documentation/devicetree/bindings/iio/light/avago,apds9300.yaml > > index 206af44f2c43..7826a1749fcd 100644 > > --- a/Documentation/devicetree/bindings/iio/light/avago,apds9300.yaml > > +++ b/Documentation/devicetree/bindings/iio/light/avago,apds9300.yaml > > @@ -4,17 +4,26 @@ > > $id: http://devicetree.org/schemas/iio/light/avago,apds9300.yaml# > > $schema: http://devicetree.org/meta-schemas/core.yaml# > > > > -title: Avago APDS9300 ambient light sensor > > +title: Avago Gesture, RGB, ALS and Proximity sensors > > > > maintainers: > > - Jonathan Cameron <jic23@kernel.org> > > + - Matt Ranostay <matt.ranostay@konsulko.com> Also: <matt.ranostay@konsulko.com>: host aspmx.l.google.com said: 550-5.1.1 The email account that you tried to reach does not exist.
On 19/10/2023 10:04, Subhajit Ghosh wrote: > Squashing Avago (Broadcom) APDS9300 and APDS9960 schemas into one > file and removing the other. Please answer: why? > Link: https://lore.kernel.org/all/4e785d2e-d310-4592-a75a-13549938dcef@linaro.org/ > > Signed-off-by: Subhajit Ghosh <subhajit.ghosh@tweaklogic.com> > --- > .../bindings/iio/light/avago,apds9300.yaml | 35 ++++++++++++--- > .../bindings/iio/light/avago,apds9960.yaml | 44 ------------------- > 2 files changed, 29 insertions(+), 50 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml > > diff --git a/Documentation/devicetree/bindings/iio/light/avago,apds9300.yaml b/Documentation/devicetree/bindings/iio/light/avago,apds9300.yaml > index 206af44f2c43..7826a1749fcd 100644 > --- a/Documentation/devicetree/bindings/iio/light/avago,apds9300.yaml > +++ b/Documentation/devicetree/bindings/iio/light/avago,apds9300.yaml > @@ -4,17 +4,26 @@ > $id: http://devicetree.org/schemas/iio/light/avago,apds9300.yaml# > $schema: http://devicetree.org/meta-schemas/core.yaml# > > -title: Avago APDS9300 ambient light sensor > +title: Avago Gesture, RGB, ALS and Proximity sensors > > maintainers: > - Jonathan Cameron <jic23@kernel.org> > + - Matt Ranostay <matt.ranostay@konsulko.com> > > description: | > - Datasheet at https://www.avagotech.com/docs/AV02-1077EN > + Avago (Broadcom) optical and proximity sensors with I2C interfaces. > + Datasheet at https://docs.broadcom.com/doc/AV02-1077EN > + Datasheet at https://docs.broadcom.com/doc/AV02-4191EN > > properties: > compatible: > - const: avago,apds9300 > + oneOf: > + - items: > + - const: avago,apds9300 > + - const: avago,apds9960 Why? Commit msg does not explain this. > + - enum: > + - avago,apds9300 > + - avago,apds9960 > > reg: > maxItems: 1 > @@ -22,14 +31,28 @@ properties: > interrupts: > maxItems: 1 > > -additionalProperties: false > - > required: > - compatible > - reg > > +allOf: > + - $ref: ../common.yaml# > + - if: > + properties: > + compatible: > + contains: > + enum: > + - avago,apds9960 > + then: > + required: > + - interrupts Why? This wasn't in original binding. > + > +additionalProperties: false > + > examples: > - | > + #include <dt-bindings/interrupt-controller/irq.h> > + > i2c { > #address-cells = <1>; > #size-cells = <0>; > @@ -38,7 +61,7 @@ examples: > compatible = "avago,apds9300"; > reg = <0x39>; > interrupt-parent = <&gpio2>; > - interrupts = <29 8>; > + interrupts = <29 IRQ_TYPE_LEVEL_LOW>; Separate patch please. You are doing way too many unexpected and not explained changes. Best regards, Krzysztof
On 19/10/23 19:21, Conor Dooley wrote: > On Thu, Oct 19, 2023 at 06:34:37PM +1030, Subhajit Ghosh wrote: >> Squashing Avago (Broadcom) APDS9300 and APDS9960 schemas into one >> file and removing the other. > >> Link: https://lore.kernel.org/all/4e785d2e-d310-4592-a75a-13549938dcef@linaro.org/ > > "Yes, they look similar. I will combine them all in a single yaml file in > the next revision. Thank you Krzysztof." > > Yet this is a follow-up patch, not a version 2. The original patches > seem to not have been applied, so I am not sure why you didn't send a > v2? > > Cheers, > Conor. Sorry, I should have put a longer description and a longer commit message. That patch series adds a new driver - apds9306 which is separate to this patch. As per Krzysztof's comments, first operation is to merge the existing apds9300 and apds9960 schemas. This patch is the first operation. Second operation will be to add apds9306 support on top of that. I will explain more on Krzysztof's comments. Thank you for reviewing. Regards, Subhajit Ghosh
> Also: > <matt.ranostay@konsulko.com>: host aspmx.l.google.com said: > 550-5.1.1 The email account that you tried to reach does not exist. Thanks Conor for pointing this out. Can you please help me out with this? get_maintainer.pl suggested me to add this email ID. Regards, Subhajit Ghosh
On 19/10/23 19:50, Krzysztof Kozlowski wrote: > On 19/10/2023 10:04, Subhajit Ghosh wrote: >> Squashing Avago (Broadcom) APDS9300 and APDS9960 schemas into one >> file and removing the other. > > Please answer: why? Apologies for not providing detailed explanation. Link: https://lore.kernel.org/all/4e785d2e-d310-4592-a75a-13549938dcef@linaro.org/ As per your comments on the patch series in the above link and as per my understanding, I have to do two operations: 1. Squash existing apds9300 schema and apds9960 schema as they look similar. 2. Add apds9306 (work in progress) support after that (which belongs to my original patch series). This patch is the first operation. >> >> +allOf: >> + - $ref: ../common.yaml# >> + - if: >> + properties: >> + compatible: >> + contains: >> + enum: >> + - avago,apds9960 >> + then: >> + required: >> + - interrupts > > Why? This wasn't in original binding. I am not sure about this. I went through the driver code and found out that probe() of apds9300 handles both situations whether interrupt bindings are provided or not, whereas, apds9960 requires an interrupt binding for probe() to be successful. I thought it would be appropriate to add that in the schema. > > Separate patch please. > > You are doing way too many unexpected and not explained changes. Sure. Thank you for reviewing. Regards, Subhajit Ghosh.
On Thu, 19 Oct 2023 21:24:09 +1030 Subhajit Ghosh <subhajit.ghosh@tweaklogic.com> wrote: > > Also: > > <matt.ranostay@konsulko.com>: host aspmx.l.google.com said: > > 550-5.1.1 The email account that you tried to reach does not exist. > Thanks Conor for pointing this out. Can you please help me out with this? > get_maintainer.pl suggested me to add this email ID. Matt has moved job, I've messaged him to find out if he has a new preferred email address. J > > Regards, > Subhajit Ghosh >
On Thu, Oct 19, 2023 at 09:20:12PM +1030, Subhajit Ghosh wrote: > On 19/10/23 19:21, Conor Dooley wrote: > > On Thu, Oct 19, 2023 at 06:34:37PM +1030, Subhajit Ghosh wrote: > > > Squashing Avago (Broadcom) APDS9300 and APDS9960 schemas into one > > > file and removing the other. > > > > > Link: https://lore.kernel.org/all/4e785d2e-d310-4592-a75a-13549938dcef@linaro.org/ > > > > "Yes, they look similar. I will combine them all in a single yaml file in > > the next revision. Thank you Krzysztof." > > > > Yet this is a follow-up patch, not a version 2. The original patches > > seem to not have been applied, so I am not sure why you didn't send a > > v2? > > > > Cheers, > > Conor. > > Sorry, I should have put a longer description and a longer commit message. > That patch series adds a new driver - apds9306 which is separate to this > patch. As per Krzysztof's comments, first operation is to merge the existing > apds9300 and apds9960 schemas. This patch is the first operation. > > Second operation will be to add apds9306 support on top of that. I will > explain more on Krzysztof's comments. Thank you for reviewing. Ahh apologies then. The best course of action would likely be to include the patch merging the two bindings in your series adding the third user.
>> Sorry, I should have put a longer description and a longer commit message. >> That patch series adds a new driver - apds9306 which is separate to this >> patch. As per Krzysztof's comments, first operation is to merge the existing >> apds9300 and apds9960 schemas. This patch is the first operation. >> >> Second operation will be to add apds9306 support on top of that. I will >> explain more on Krzysztof's comments. Thank you for reviewing. > > Ahh apologies then. The best course of action would likely be to include > the patch merging the two bindings in your series adding the third user. No worries. Sure. You can reject this patch then. I will add my changes in the main apds9306 patch series. Regards, Subhajit Ghosh
On 19/10/2023 13:16, Subhajit Ghosh wrote: > On 19/10/23 19:50, Krzysztof Kozlowski wrote: >> On 19/10/2023 10:04, Subhajit Ghosh wrote: >>> Squashing Avago (Broadcom) APDS9300 and APDS9960 schemas into one >>> file and removing the other. >> >> Please answer: why? > Apologies for not providing detailed explanation. > Link: https://lore.kernel.org/all/4e785d2e-d310-4592-a75a-13549938dcef@linaro.org/ > As per your comments on the patch series in the above link and as per my understanding, > I have to do two operations: > 1. Squash existing apds9300 schema and apds9960 schema as they look similar. > 2. Add apds9306 (work in progress) support after that (which belongs to my original patch series). > This patch is the first operation. Answer in the commit. The commits should answer to the question: why are you doing it? >>> >>> +allOf: >>> + - $ref: ../common.yaml# >>> + - if: >>> + properties: >>> + compatible: >>> + contains: >>> + enum: >>> + - avago,apds9960 >>> + then: >>> + required: >>> + - interrupts >> >> Why? This wasn't in original binding. > I am not sure about this. I went through the driver code and found out that probe() Not explained in commit msg. > of apds9300 handles both situations whether interrupt bindings are provided or not, whereas, > apds9960 requires an interrupt binding for probe() to be successful. I thought it would > be appropriate to add that in the schema. Not explained in commit msg. Best regards, Krzysztof
On Thu, 19 Oct 2023 12:21:20 +0100 Jonathan Cameron <Jonathan.Cameron@Huawei.com> wrote: > On Thu, 19 Oct 2023 21:24:09 +1030 > Subhajit Ghosh <subhajit.ghosh@tweaklogic.com> wrote: > > > > Also: > > > <matt.ranostay@konsulko.com>: host aspmx.l.google.com said: > > > 550-5.1.1 The email account that you tried to reach does not exist. > > Thanks Conor for pointing this out. Can you please help me out with this? > > get_maintainer.pl suggested me to add this email ID. > > Matt has moved job, I've messaged him to find out if he has a new preferred > email address. > +CC address Matt suggested using going forwards. > J > > > > Regards, > > Subhajit Ghosh > > >
On Fri, Oct 20, 2023 at 08:28:04AM +0100, Jonathan Cameron wrote: > On Thu, 19 Oct 2023 12:21:20 +0100 > Jonathan Cameron <Jonathan.Cameron@Huawei.com> wrote: > > > On Thu, 19 Oct 2023 21:24:09 +1030 > > Subhajit Ghosh <subhajit.ghosh@tweaklogic.com> wrote: > > > > > > Also: > > > > <matt.ranostay@konsulko.com>: host aspmx.l.google.com said: > > > > 550-5.1.1 The email account that you tried to reach does not exist. > > > Thanks Conor for pointing this out. Can you please help me out with this? > > > get_maintainer.pl suggested me to add this email ID. > > > > Matt has moved job, I've messaged him to find out if he has a new preferred > > email address. > > > +CC address Matt suggested using going forwards. Matt, can you please update your contact information in the various places where that is relevant? A mailmap entry would likely be a good idea too. Cheers, Conor.
>> > +CC address Matt suggested using going forwards. > >> J Sure. Thanks Jonathan. Regards, Subhajit Ghosh
>> of apds9300 handles both situations whether interrupt bindings are provided or not, whereas, >> apds9960 requires an interrupt binding for probe() to be successful. I thought it would >> be appropriate to add that in the schema. > > Not explained in commit msg. > > Best regards, > Krzysztof > Yes, I will add all these point in my next commit message in apds9306 patch series rather than a separate patch as suggested by Conor. Regards, Subhajit Ghosh
diff --git a/Documentation/devicetree/bindings/iio/light/avago,apds9300.yaml b/Documentation/devicetree/bindings/iio/light/avago,apds9300.yaml index 206af44f2c43..7826a1749fcd 100644 --- a/Documentation/devicetree/bindings/iio/light/avago,apds9300.yaml +++ b/Documentation/devicetree/bindings/iio/light/avago,apds9300.yaml @@ -4,17 +4,26 @@ $id: http://devicetree.org/schemas/iio/light/avago,apds9300.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Avago APDS9300 ambient light sensor +title: Avago Gesture, RGB, ALS and Proximity sensors maintainers: - Jonathan Cameron <jic23@kernel.org> + - Matt Ranostay <matt.ranostay@konsulko.com> description: | - Datasheet at https://www.avagotech.com/docs/AV02-1077EN + Avago (Broadcom) optical and proximity sensors with I2C interfaces. + Datasheet at https://docs.broadcom.com/doc/AV02-1077EN + Datasheet at https://docs.broadcom.com/doc/AV02-4191EN properties: compatible: - const: avago,apds9300 + oneOf: + - items: + - const: avago,apds9300 + - const: avago,apds9960 + - enum: + - avago,apds9300 + - avago,apds9960 reg: maxItems: 1 @@ -22,14 +31,28 @@ properties: interrupts: maxItems: 1 -additionalProperties: false - required: - compatible - reg +allOf: + - $ref: ../common.yaml# + - if: + properties: + compatible: + contains: + enum: + - avago,apds9960 + then: + required: + - interrupts + +additionalProperties: false + examples: - | + #include <dt-bindings/interrupt-controller/irq.h> + i2c { #address-cells = <1>; #size-cells = <0>; @@ -38,7 +61,7 @@ examples: compatible = "avago,apds9300"; reg = <0x39>; interrupt-parent = <&gpio2>; - interrupts = <29 8>; + interrupts = <29 IRQ_TYPE_LEVEL_LOW>; }; }; ... diff --git a/Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml b/Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml deleted file mode 100644 index f06e0fda5629..000000000000 --- a/Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml +++ /dev/null @@ -1,44 +0,0 @@ -# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) -%YAML 1.2 ---- -$id: http://devicetree.org/schemas/iio/light/avago,apds9960.yaml# -$schema: http://devicetree.org/meta-schemas/core.yaml# - -title: Avago APDS9960 gesture/RGB/ALS/proximity sensor - -maintainers: - - Matt Ranostay <matt.ranostay@konsulko.com> - -description: | - Datasheet at https://www.avagotech.com/docs/AV02-4191EN - -properties: - compatible: - const: avago,apds9960 - - reg: - maxItems: 1 - - interrupts: - maxItems: 1 - -additionalProperties: false - -required: - - compatible - - reg - -examples: - - | - i2c { - #address-cells = <1>; - #size-cells = <0>; - - light-sensor@39 { - compatible = "avago,apds9960"; - reg = <0x39>; - interrupt-parent = <&gpio1>; - interrupts = <16 1>; - }; - }; -...