2024-02-15 20:48:21

by Marco Felsch

[permalink] [raw]
Subject: [PATCH 1/2] dt-bindings: iio: ti,tmp117: add vcc supply binding

From: Thomas Haemmerle <[email protected]>

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 <[email protected]>
Signed-off-by: Marco Felsch <[email protected]>
---
.../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



2024-02-15 20:48:28

by Marco Felsch

[permalink] [raw]
Subject: [PATCH 2/2] iio: temperature: tmp117: add support for vcc-supply

From: Thomas Haemmerle <[email protected]>

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

Signed-off-by: Thomas Haemmerle <[email protected]>
Signed-off-by: Marco Felsch <[email protected]>
---
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


2024-02-16 08:20:59

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: iio: ti,tmp117: add vcc supply binding

On 15/02/2024 21:47, Marco Felsch wrote:
> From: Thomas Haemmerle <[email protected]>
>
> 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 <[email protected]>
> Signed-off-by: Marco Felsch <[email protected]>

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


2024-02-16 09:36:07

by Marco Felsch

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: iio: ti,tmp117: add vcc supply binding

On 24-02-16, Krzysztof Kozlowski wrote:
> On 15/02/2024 21:47, Marco Felsch wrote:
> > From: Thomas Haemmerle <[email protected]>
> >
> > 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 <[email protected]>
> > Signed-off-by: Marco Felsch <[email protected]>
>
> 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
>
>