Message ID | 20240121051735.32246-3-subhajit.ghosh@tweaklogic.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-31968-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp2385566dyb; Sun, 21 Jan 2024 21:57:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IHwI4NSg0RPxIrG5234IMReJoHclBBVH21Cs1z4IW2tBq0pyy6TkOUBlh1x6jCW9xO/4rQx X-Received: by 2002:a17:906:1301:b0:a2d:2379:5a59 with SMTP id w1-20020a170906130100b00a2d23795a59mr3689423ejb.69.1705903022285; Sun, 21 Jan 2024 21:57:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705903022; cv=pass; d=google.com; s=arc-20160816; b=0toVmy7NoMAUmcmUIvXhV/C6e9cS0RXSYNLdITltYEQ6M+LNgq7Pl918WD+hB7d5WR nCtisaTY5ve8JfFzFUhQBwrMwjPFC9bmfbwddG6Dy8lFAxYS59cAMDz8NG98CwbzE115 o/e/T6AaaF1cRADYwYwVveqrQ3lf/O6QksGm8fBIvvucQ8kGMdExpHG52Bd8HF3avpKj rvO+zXHuGFnSGXkqHmmnPBvT4AqadgmY4Amr0Aw5yBfiJK6Y8vLNlenr2DAfDVCFhA5R PFVGWIUKg1szOxLW9OlzGiRInzhJj+MJ0ROKItPxU4Nz8jhrKs8W2LuunjT3VSU6WlAp vgWg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=IbZe2AzIkKy+l4ATOd5FQ3m1RMu6EicdGaUIFG7TJls=; fh=UmVHA2HXJwJd6uESM8v9C81mqF3XC2ufORF7x4MKwek=; b=pj5PtjcO3H+WKfkX1+VWwMqvTHWLjQ8H5RalhMrWFcX5KPL19Pkfdg5KRRw+zIL3Ip Akdy6U/fSTv3vISx/pKC9LoaFZ44uNTrGwF3/XRX9OeZUBnvZxyFpCMVWWmqTP5D8/YF fWokbth2+2ZuYV1oyZguff/6DSV+59Fep8PlsFmW0EMWSBL7RoIoerwZyshMkM0yaNtE KRA7VSh6OPLVXQcvNoRDKjXD1YDjSBbAd/62R4WO1r7Ayf6J/oVb4uCWMr6BUUKOulAV wQefRH1ydwybK66xqupHDZuihKx8AR/wdNckywGlbt9O8M/Mr6UvHe7EhpJMQlA4nWdc icHw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tweaklogic.com header.s=google header.b="HU/Tvzsn"; arc=pass (i=1 spf=pass spfdomain=tweaklogic.com dkim=pass dkdomain=tweaklogic.com); spf=pass (google.com: domain of linux-kernel+bounces-31968-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31968-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id b9-20020a170906708900b00a26e48fd0dbsi10014059ejk.577.2024.01.21.21.57.02 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jan 2024 21:57:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31968-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@tweaklogic.com header.s=google header.b="HU/Tvzsn"; arc=pass (i=1 spf=pass spfdomain=tweaklogic.com dkim=pass dkdomain=tweaklogic.com); spf=pass (google.com: domain of linux-kernel+bounces-31968-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31968-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 1CB371F22588 for <ouuuleilei@gmail.com>; Sun, 21 Jan 2024 05:18:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5584436AE7; Sun, 21 Jan 2024 05:18:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tweaklogic.com header.i=@tweaklogic.com header.b="HU/Tvzsn" Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 40F983611A for <linux-kernel@vger.kernel.org>; Sun, 21 Jan 2024 05:17:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705814281; cv=none; b=lH0HAMKTmzJE/wMjL/di4DFFExFznl89IjkLOeJEgWgzKg/Aq9lZ4bFsZBPYqMtjtDf+vF+YwrwxQMn8DytJ45hIstXlVyic4rU9DbmMqqsEtHAWqaKS+2OeWKV2N/WLJ7BcYD+Afpa3pAJQ+IbwjYaYU/zehVtWK+5de2CoMtI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705814281; c=relaxed/simple; bh=9PPgyl4c02AhR7tsdj/3jHF5jJWRSgTdQEG0MfhuJW4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=pR6V5hforp+TUpkmN0DXhMTvATmOX/kZvszvpz5nKlD+KmFM05dp7sb9+0hgQTvE1TPcPvXYOMYQXWQ+oA/sHfzUCPGkg6z3vFlAKJLDjRYqG35j1uqDlczVH77E0WXofjQ9Tiew6M5FvGa0s+yMWu3dTGrKUIaXPhDmQe20nVs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tweaklogic.com; spf=pass smtp.mailfrom=tweaklogic.com; dkim=pass (2048-bit key) header.d=tweaklogic.com header.i=@tweaklogic.com header.b=HU/Tvzsn; arc=none smtp.client-ip=209.85.210.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tweaklogic.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tweaklogic.com Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-6da9c834646so2170812b3a.3 for <linux-kernel@vger.kernel.org>; Sat, 20 Jan 2024 21:17:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tweaklogic.com; s=google; t=1705814278; x=1706419078; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IbZe2AzIkKy+l4ATOd5FQ3m1RMu6EicdGaUIFG7TJls=; b=HU/TvzsnK5Fq+1Re4RIUSjQogNCvsbQ/PcWz66oY/FNGgUZkO6WYaALZMeTH5uMHp4 BcnGJ12iXlEjsD5Ck527bHmP8wMyRIWUGSlXC/ToZFyhL92Yqk8JDhQGSeWrbEv82ZN8 dX8etNCuRenb+Z4qWmcZh6Be4OFXV/vm2Bed1vYJ+NnI8Awf5V5g0Pzh4ivSSkVovDsj arA0i2CuagxyoSq0jjh5hMyn3eohYk5dFkvxLIaGLsE2j0HH4cGvd1A82lcSH2CQKJHz DPftZ9/SX8tJgn+B/MEFrI3hHHE0QhaGFu73Ubz32F88jXrDmkoPgW2OhguH7rzMle+O 1NYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705814278; x=1706419078; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IbZe2AzIkKy+l4ATOd5FQ3m1RMu6EicdGaUIFG7TJls=; b=M08jbZ+c8aqXg1YmyS29jwfGrdgDCSvNqx4hiNC+zeyzw+WqOpfx21Vi0LwaAqau/Z MgRLd8HFkVNMHBPd5fJxX9+HcbR2tz5hRE2sk0KqNxIfbyBRN4y85FcILlwKUMOl0Y45 blWr9eson+G4OgZZoCkumML2HGAjtb6TAPBcHB1lqf0RDAU9dQm4oiTe2Ihhd37jR/FP 8WW+q8sfYwCSgg0a1qlUPJ7uZQtiBQ3iWSu64wF21PpaIWFjfGJ0ZmdmeTW/HaNMhQ70 qGnNDgMWfQqx4wna7Q65hgpGMxN5O4UeAAWUeJ5eXPF9rzzbgG55LAsc5Q1JxzLsdRnW BiQg== X-Gm-Message-State: AOJu0Yxr5I5BdSCoEWDuElYWcJQucte0D0YPxt+j43KXHzgsyK+xsV81 uxe/dQZ+CFdVPDiUZN9o6i8DSQG9cJjMM1yVNlZl3BqRAfLmSzOMBvyF9n25g20= X-Received: by 2002:aa7:9d1e:0:b0:6da:b959:3782 with SMTP id k30-20020aa79d1e000000b006dab9593782mr3416555pfp.35.1705814278565; Sat, 20 Jan 2024 21:17:58 -0800 (PST) Received: from localhost.localdomain (2403-580d-82f4-0-3fa1-f9ce-6074-3bab.ip6.aussiebb.net. [2403:580d:82f4:0:3fa1:f9ce:6074:3bab]) by smtp.gmail.com with ESMTPSA id f6-20020a056a000b0600b006d96d034befsm7547196pfu.30.2024.01.20.21.17.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jan 2024 21:17:58 -0800 (PST) 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>, Matti Vaittinen <mazziesaccount@gmail.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Marek Vasut <marex@denx.de>, Anshul Dalal <anshulusr@gmail.com>, Javier Carrasco <javier.carrasco.cruz@gmail.com> Cc: Subhajit Ghosh <subhajit.ghosh@tweaklogic.com>, Matt Ranostay <matt@ranostay.sg>, Stefan Windfeldt-Prytz <stefan.windfeldt-prytz@axis.com>, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 2/3] dt-bindings: iio: light: Avago APDS9306 Date: Sun, 21 Jan 2024 15:47:33 +1030 Message-Id: <20240121051735.32246-3-subhajit.ghosh@tweaklogic.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240121051735.32246-1-subhajit.ghosh@tweaklogic.com> References: <20240121051735.32246-1-subhajit.ghosh@tweaklogic.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788714952054805715 X-GMAIL-MSGID: 1788768967764939057 |
Series |
Support for Avago APDS9306 Ambient Light Sensor
|
|
Commit Message
Subhajit Ghosh
Jan. 21, 2024, 5:17 a.m. UTC
Adding device tree support for APDS9306 Ambient Light Sensor.
Updating datasheet hyperlinks.
Adding interrupt definition macro and header file.
Adding vdd-supply property.
Signed-off-by: Subhajit Ghosh <subhajit.ghosh@tweaklogic.com>
---
v2 -> v5:
- Implemented changes as per previous reviews:
Link: https://lore.kernel.org/lkml/20231028142944.7e210eb6@jic23-huawei/
Link: https://lore.kernel.org/lkml/22e9e5e9-d26a-46e9-8986-5062bbfd72ec@linaro.org/
---
.../bindings/iio/light/avago,apds9300.yaml | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
Comments
On 21/01/2024 06:17, Subhajit Ghosh wrote: > Adding device tree support for APDS9306 Ambient Light Sensor. > Updating datasheet hyperlinks. > Adding interrupt definition macro and header file. > Adding vdd-supply property. Why? Do other devices have it? > required: > @@ -33,6 +37,8 @@ required: > > examples: > - | > + #include <dt-bindings/interrupt-controller/irq.h> > + > i2c { > #address-cells = <1>; > #size-cells = <0>; > @@ -41,7 +47,8 @@ examples: > compatible = "avago,apds9300"; > reg = <0x39>; > interrupt-parent = <&gpio2>; > - interrupts = <29 8>; > + interrupts = <29 IRQ_TYPE_LEVEL_LOW>; Separate change. Best regards, Krzysztof
On 22/1/24 02:06, Jonathan Cameron wrote: > On Sun, 21 Jan 2024 15:47:33 +1030 > Subhajit Ghosh <subhajit.ghosh@tweaklogic.com> wrote: > >> Adding device tree support for APDS9306 Ambient Light Sensor. >> Updating datasheet hyperlinks. >> Adding interrupt definition macro and header file. > > This is an unrelated change, so should probably be in a separate patch. Understood. > >> Adding vdd-supply property. > > This one is reasonable to have in same patch as the new device addition > as, whilst I assume it's valid for the existing devices, you are adding it > to incorporate something that device also has. > Could also be a separate precursor patch. > >> >> >> description: | >> - Datasheet: https://www.avagotech.com/docs/AV02-1077EN >> - Datasheet: https://www.avagotech.com/docs/AV02-4191EN >> + Datasheet: https://docs.broadcom.com/doc/AV02-1077EN >> + Datasheet: https://docs.broadcom.com/doc/AV02-4191EN >> + Datasheet: https://docs.broadcom.com/doc/AV02-4755EN > > Old links seem to still work, so why the change? My bad. I will revert to keep things simple. No reason, just thought of updating. Thanks for the review. Regards, Subhajit Ghosh
On 22/1/24 20:21, Krzysztof Kozlowski wrote: > On 21/01/2024 06:17, Subhajit Ghosh wrote: >> Adding device tree support for APDS9306 Ambient Light Sensor. >> Updating datasheet hyperlinks. >> Adding interrupt definition macro and header file. >> Adding vdd-supply property. > > Why? Do other devices have it? Are you referring to vdd-supply? No, I guess, haven't checked actually. If other devices don't have, can you suggest the best way to handle that? > > >> required: >> @@ -33,6 +37,8 @@ required: >> >> examples: >> - | >> + #include <dt-bindings/interrupt-controller/irq.h> >> + >> i2c { >> #address-cells = <1>; >> #size-cells = <0>; >> @@ -41,7 +47,8 @@ examples: >> compatible = "avago,apds9300"; >> reg = <0x39>; >> interrupt-parent = <&gpio2>; >> - interrupts = <29 8>; >> + interrupts = <29 IRQ_TYPE_LEVEL_LOW>; > > Separate change. Understood. > > Best regards, > Krzysztof > Regards, Subhajit Ghosh
On 22/01/2024 11:07, Subhajit Ghosh wrote: > On 22/1/24 20:21, Krzysztof Kozlowski wrote: >> On 21/01/2024 06:17, Subhajit Ghosh wrote: >>> Adding device tree support for APDS9306 Ambient Light Sensor. >>> Updating datasheet hyperlinks. >>> Adding interrupt definition macro and header file. >>> Adding vdd-supply property. >> >> Why? Do other devices have it? > Are you referring to vdd-supply? No, I guess, haven't checked actually. > If other devices don't have, can you suggest the best way to handle that? Commit msg should explain that. I assume all devices need it, so just like Jonathan suggested: this might be separate patch. Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/iio/light/avago,apds9300.yaml b/Documentation/devicetree/bindings/iio/light/avago,apds9300.yaml index c610780346e8..bee73a590424 100644 --- a/Documentation/devicetree/bindings/iio/light/avago,apds9300.yaml +++ b/Documentation/devicetree/bindings/iio/light/avago,apds9300.yaml @@ -4,19 +4,21 @@ $id: http://devicetree.org/schemas/iio/light/avago,apds9300.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Avago Gesture/RGB/ALS/Proximity sensors +title: Avago (Broadcom) Gesture/RGB/ALS/Proximity sensors maintainers: - Subhajit Ghosh <subhajit.ghosh@tweaklogic.com> description: | - Datasheet: https://www.avagotech.com/docs/AV02-1077EN - Datasheet: https://www.avagotech.com/docs/AV02-4191EN + Datasheet: https://docs.broadcom.com/doc/AV02-1077EN + Datasheet: https://docs.broadcom.com/doc/AV02-4191EN + Datasheet: https://docs.broadcom.com/doc/AV02-4755EN properties: compatible: enum: - avago,apds9300 + - avago,apds9306 - avago,apds9960 reg: @@ -25,6 +27,8 @@ properties: interrupts: maxItems: 1 + vdd-supply: true + additionalProperties: false required: @@ -33,6 +37,8 @@ required: examples: - | + #include <dt-bindings/interrupt-controller/irq.h> + i2c { #address-cells = <1>; #size-cells = <0>; @@ -41,7 +47,8 @@ examples: compatible = "avago,apds9300"; reg = <0x39>; interrupt-parent = <&gpio2>; - interrupts = <29 8>; + interrupts = <29 IRQ_TYPE_LEVEL_LOW>; + vdd-supply = <®ulator_3v3>; }; }; ...