public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: iio: ti,tmp117: add vcc supply binding
@ 2024-02-15 20:47 Marco Felsch
  2024-02-15 20:47 ` [PATCH 2/2] iio: temperature: tmp117: add support for vcc-supply Marco Felsch
  2024-02-16  8:10 ` [PATCH 1/2] dt-bindings: iio: ti,tmp117: add vcc supply binding Krzysztof Kozlowski
  0 siblings, 2 replies; 4+ messages in thread
From: Marco Felsch @ 2024-02-15 20:47 UTC (permalink / raw)
  To: puranjay12, jic23, lars; +Cc: thomas.haemmerle, linux-iio, linux-kernel, kernel

From: Thomas Haemmerle <thomas.haemmerle@leica-geosystems.com>

Add the binding to specify the vcc supply. We can't make it required
since this would break the backward compatibility.

Signed-off-by: Thomas Haemmerle <thomas.haemmerle@leica-geosystems.com>
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
 .../devicetree/bindings/iio/temperature/ti,tmp117.yaml        | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml b/Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml
index 8c6d7735e875..cf7799c9734f 100644
--- a/Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml
+++ b/Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml
@@ -24,6 +24,9 @@ properties:
   reg:
     maxItems: 1
 
+  vcc-supply:
+    description: provide VCC power to the sensor.
+
 required:
   - compatible
   - reg
@@ -39,5 +42,6 @@ examples:
         tmp117@48 {
              compatible = "ti,tmp117";
              reg = <0x48>;
+             vcc-supply = <&pmic_reg_3v3>;
         };
     };
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] iio: temperature: tmp117: add support for vcc-supply
  2024-02-15 20:47 [PATCH 1/2] dt-bindings: iio: ti,tmp117: add vcc supply binding Marco Felsch
@ 2024-02-15 20:47 ` Marco Felsch
  2024-02-16  8:10 ` [PATCH 1/2] dt-bindings: iio: ti,tmp117: add vcc supply binding Krzysztof Kozlowski
  1 sibling, 0 replies; 4+ messages in thread
From: Marco Felsch @ 2024-02-15 20:47 UTC (permalink / raw)
  To: puranjay12, jic23, lars; +Cc: thomas.haemmerle, linux-iio, linux-kernel, kernel

From: Thomas Haemmerle <thomas.haemmerle@leica-geosystems.com>

Add support to specify the VCC supply which is required to power the
device.

Signed-off-by: Thomas Haemmerle <thomas.haemmerle@leica-geosystems.com>
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
 drivers/iio/temperature/tmp117.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/iio/temperature/tmp117.c b/drivers/iio/temperature/tmp117.c
index 059953015ae7..69328066811a 100644
--- a/drivers/iio/temperature/tmp117.c
+++ b/drivers/iio/temperature/tmp117.c
@@ -17,6 +17,7 @@
 #include <linux/kernel.h>
 #include <linux/limits.h>
 #include <linux/property.h>
+#include <linux/regulator/consumer.h>
 
 #include <linux/iio/iio.h>
 
@@ -152,6 +153,10 @@ static int tmp117_probe(struct i2c_client *client)
 	if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_WORD_DATA))
 		return -EOPNOTSUPP;
 
+	ret = devm_regulator_get_enable(&client->dev, "vcc");
+	if (ret)
+		return ret;
+
 	dev_id = i2c_smbus_read_word_swapped(client, TMP117_REG_DEVICE_ID);
 	if (dev_id < 0)
 		return dev_id;
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] dt-bindings: iio: ti,tmp117: add vcc supply binding
  2024-02-15 20:47 [PATCH 1/2] dt-bindings: iio: ti,tmp117: add vcc supply binding Marco Felsch
  2024-02-15 20:47 ` [PATCH 2/2] iio: temperature: tmp117: add support for vcc-supply Marco Felsch
@ 2024-02-16  8:10 ` Krzysztof Kozlowski
  2024-02-16  9:35   ` Marco Felsch
  1 sibling, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2024-02-16  8:10 UTC (permalink / raw)
  To: Marco Felsch, puranjay12, jic23, lars
  Cc: thomas.haemmerle, linux-iio, linux-kernel, kernel

On 15/02/2024 21:47, Marco Felsch wrote:
> From: Thomas Haemmerle <thomas.haemmerle@leica-geosystems.com>
> 
> Add the binding to specify the vcc supply. We can't make it required
> since this would break the backward compatibility.
> 
> Signed-off-by: Thomas Haemmerle <thomas.haemmerle@leica-geosystems.com>
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>

Please use scripts/get_maintainers.pl to get a list of necessary people
and lists to CC. It might happen, that command when run on an older
kernel, gives you outdated entries. Therefore please be sure you base
your patches on recent Linux kernel.

Tools like b4 or scripts/get_maintainer.pl provide you proper list of
people, so fix your workflow. Tools might also fail if you work on some
ancient tree (don't, instead use mainline), work on fork of kernel
(don't, instead use mainline) or you ignore some maintainers (really
don't). Just use b4 and everything should be fine, although remember
about `b4 prep --auto-to-cc` if you added new patches to the patchset.

You missed at least devicetree list (maybe more), so this won't be
tested by automated tooling. Performing review on untested code might be
a waste of time, thus I will skip this patch entirely till you follow
the process allowing the patch to be tested.

Please kindly resend and include all necessary To/Cc entries.


Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] dt-bindings: iio: ti,tmp117: add vcc supply binding
  2024-02-16  8:10 ` [PATCH 1/2] dt-bindings: iio: ti,tmp117: add vcc supply binding Krzysztof Kozlowski
@ 2024-02-16  9:35   ` Marco Felsch
  0 siblings, 0 replies; 4+ messages in thread
From: Marco Felsch @ 2024-02-16  9:35 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: puranjay12, jic23, lars, thomas.haemmerle, linux-iio,
	linux-kernel, kernel

On 24-02-16, Krzysztof Kozlowski wrote:
> On 15/02/2024 21:47, Marco Felsch wrote:
> > From: Thomas Haemmerle <thomas.haemmerle@leica-geosystems.com>
> > 
> > Add the binding to specify the vcc supply. We can't make it required
> > since this would break the backward compatibility.
> > 
> > Signed-off-by: Thomas Haemmerle <thomas.haemmerle@leica-geosystems.com>
> > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> 
> Please use scripts/get_maintainers.pl to get a list of necessary people
> and lists to CC. It might happen, that command when run on an older
> kernel, gives you outdated entries. Therefore please be sure you base
> your patches on recent Linux kernel.

Sure, sorry I forgot you guys. I was runing the script but only on the
driver not on the dt-bindings, since I was sending this series directly
from my git-branch without running git-format-patch nor..

> Tools like b4 or scripts/get_maintainer.pl provide you proper list of

using b4 either.

> people, so fix your workflow. Tools might also fail if you work on some
> ancient tree (don't, instead use mainline), work on fork of kernel
> (don't, instead use mainline) or you ignore some maintainers (really
> don't). Just use b4 and everything should be fine, although remember
> about `b4 prep --auto-to-cc` if you added new patches to the patchset.
> 
> You missed at least devicetree list (maybe more), so this won't be
> tested by automated tooling. Performing review on untested code might be
> a waste of time, thus I will skip this patch entirely till you follow
> the process allowing the patch to be tested.
> 
> Please kindly resend and include all necessary To/Cc entries.

Sure, I will do. Thank you for the response anyway.

Regards,
  Marco

> 
> 
> Best regards,
> Krzysztof
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-16  9:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-15 20:47 [PATCH 1/2] dt-bindings: iio: ti,tmp117: add vcc supply binding Marco Felsch
2024-02-15 20:47 ` [PATCH 2/2] iio: temperature: tmp117: add support for vcc-supply Marco Felsch
2024-02-16  8:10 ` [PATCH 1/2] dt-bindings: iio: ti,tmp117: add vcc supply binding Krzysztof Kozlowski
2024-02-16  9:35   ` Marco Felsch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox