public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/2] iio: temperature: ltc2983: small improvements
@ 2024-04-04  8:58 Nuno Sa
  2024-04-04  8:58 ` [PATCH v5 1/2] dt-bindings: iio: temperature: ltc2983: document power supply Nuno Sa
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nuno Sa @ 2024-04-04  8:58 UTC (permalink / raw)
  To: linux-iio, devicetree
  Cc: Jonathan Cameron, Lars-Peter Clausen, Michael Hennerich,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Krzysztof Kozlowski

Hi Jonathan,

As suggested by you, v5 only has the regulator stuff. I'll send another
series for the new dev_errp_helper().

---
Changes in v5:
- Dropped patches 1,2,5 and 6.
- Link to v4: https://lore.kernel.org/all/20240328-ltc2983-misc-improv-v4-0-0cc428c07cd5@analog.com/

---
Nuno Sa (2):
      dt-bindings: iio: temperature: ltc2983: document power supply
      iio: temperature: ltc2983: support vdd regulator

 Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml | 4 ++++
 drivers/iio/temperature/ltc2983.c                                  | 5 +++++
 2 files changed, 9 insertions(+)
---
base-commit: 6020ca4de8e5404b20f15a6d9873cd6eb5f6d8d6
change-id: 20240222-ltc2983-misc-improv-1c7a78ece93f
--

Thanks!
- Nuno Sá


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

* [PATCH v5 1/2] dt-bindings: iio: temperature: ltc2983: document power supply
  2024-04-04  8:58 [PATCH v5 0/2] iio: temperature: ltc2983: small improvements Nuno Sa
@ 2024-04-04  8:58 ` Nuno Sa
  2024-04-04  8:58 ` [PATCH v5 2/2] iio: temperature: ltc2983: support vdd regulator Nuno Sa
  2024-04-06 15:49 ` [PATCH v5 0/2] iio: temperature: ltc2983: small improvements Jonathan Cameron
  2 siblings, 0 replies; 4+ messages in thread
From: Nuno Sa @ 2024-04-04  8:58 UTC (permalink / raw)
  To: linux-iio, devicetree
  Cc: Jonathan Cameron, Lars-Peter Clausen, Michael Hennerich,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Krzysztof Kozlowski

Add a property for the VDD power supply regulator.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
---
 Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml
index dbb85135fd66..312febeeb3bb 100644
--- a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml
+++ b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml
@@ -57,6 +57,8 @@ properties:
   interrupts:
     maxItems: 1
 
+  vdd-supply: true
+
   adi,mux-delay-config-us:
     description: |
       Extra delay prior to each conversion, in addition to the internal 1ms
@@ -460,6 +462,7 @@ required:
   - compatible
   - reg
   - interrupts
+  - vdd-supply
 
 additionalProperties: false
 
@@ -489,6 +492,7 @@ examples:
             #address-cells = <1>;
             #size-cells = <0>;
 
+            vdd-supply = <&supply>;
             interrupts = <20 IRQ_TYPE_EDGE_RISING>;
             interrupt-parent = <&gpio>;
 

-- 
2.44.0


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

* [PATCH v5 2/2] iio: temperature: ltc2983: support vdd regulator
  2024-04-04  8:58 [PATCH v5 0/2] iio: temperature: ltc2983: small improvements Nuno Sa
  2024-04-04  8:58 ` [PATCH v5 1/2] dt-bindings: iio: temperature: ltc2983: document power supply Nuno Sa
@ 2024-04-04  8:58 ` Nuno Sa
  2024-04-06 15:49 ` [PATCH v5 0/2] iio: temperature: ltc2983: small improvements Jonathan Cameron
  2 siblings, 0 replies; 4+ messages in thread
From: Nuno Sa @ 2024-04-04  8:58 UTC (permalink / raw)
  To: linux-iio, devicetree
  Cc: Jonathan Cameron, Lars-Peter Clausen, Michael Hennerich,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley

Add support for the power supply regulator.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
---
 drivers/iio/temperature/ltc2983.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/iio/temperature/ltc2983.c b/drivers/iio/temperature/ltc2983.c
index 3c4524d57b8e..24d19f3c7292 100644
--- a/drivers/iio/temperature/ltc2983.c
+++ b/drivers/iio/temperature/ltc2983.c
@@ -16,6 +16,7 @@
 #include <linux/module.h>
 #include <linux/property.h>
 #include <linux/regmap.h>
+#include <linux/regulator/consumer.h>
 #include <linux/spi/spi.h>
 
 #include <asm/byteorder.h>
@@ -1597,6 +1598,10 @@ static int ltc2983_probe(struct spi_device *spi)
 	if (ret)
 		return ret;
 
+	ret = devm_regulator_get_enable(&spi->dev, "vdd");
+	if (ret)
+		return ret;
+
 	gpio = devm_gpiod_get_optional(&st->spi->dev, "reset", GPIOD_OUT_HIGH);
 	if (IS_ERR(gpio))
 		return PTR_ERR(gpio);

-- 
2.44.0


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

* Re: [PATCH v5 0/2] iio: temperature: ltc2983: small improvements
  2024-04-04  8:58 [PATCH v5 0/2] iio: temperature: ltc2983: small improvements Nuno Sa
  2024-04-04  8:58 ` [PATCH v5 1/2] dt-bindings: iio: temperature: ltc2983: document power supply Nuno Sa
  2024-04-04  8:58 ` [PATCH v5 2/2] iio: temperature: ltc2983: support vdd regulator Nuno Sa
@ 2024-04-06 15:49 ` Jonathan Cameron
  2 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2024-04-06 15:49 UTC (permalink / raw)
  To: Nuno Sa
  Cc: linux-iio, devicetree, Lars-Peter Clausen, Michael Hennerich,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Krzysztof Kozlowski

On Thu, 4 Apr 2024 10:58:16 +0200
Nuno Sa <nuno.sa@analog.com> wrote:

> Hi Jonathan,
> 
> As suggested by you, v5 only has the regulator stuff. I'll send another
> series for the new dev_errp_helper().
Applied.

Thanks,

Jonathan

> 
> ---
> Changes in v5:
> - Dropped patches 1,2,5 and 6.
> - Link to v4: https://lore.kernel.org/all/20240328-ltc2983-misc-improv-v4-0-0cc428c07cd5@analog.com/
> 
> ---
> Nuno Sa (2):
>       dt-bindings: iio: temperature: ltc2983: document power supply
>       iio: temperature: ltc2983: support vdd regulator
> 
>  Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml | 4 ++++
>  drivers/iio/temperature/ltc2983.c                                  | 5 +++++
>  2 files changed, 9 insertions(+)
> ---
> base-commit: 6020ca4de8e5404b20f15a6d9873cd6eb5f6d8d6
> change-id: 20240222-ltc2983-misc-improv-1c7a78ece93f
> --
> 
> Thanks!
> - Nuno Sá
> 


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

end of thread, other threads:[~2024-04-06 15:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-04  8:58 [PATCH v5 0/2] iio: temperature: ltc2983: small improvements Nuno Sa
2024-04-04  8:58 ` [PATCH v5 1/2] dt-bindings: iio: temperature: ltc2983: document power supply Nuno Sa
2024-04-04  8:58 ` [PATCH v5 2/2] iio: temperature: ltc2983: support vdd regulator Nuno Sa
2024-04-06 15:49 ` [PATCH v5 0/2] iio: temperature: ltc2983: small improvements Jonathan Cameron

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