iio: temperature: ltc2983: small improvements
Nuno Sa
maintainerv5 cover iio: temperature: ltc2983: small improvements
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/[email protected]/
---
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á
Nuno Sa
maintainerPATCH v5 1/2 dt-bindings: iio: temperature: ltc2983: document power supply
Add a property for the VDD power supply regulator.
--- Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml +4 -0
@@ -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>;
Signature · 1 line
2.44.0
Nuno Sa
maintainerPATCH v5 2/2 iio: temperature: ltc2983: support vdd regulator
In reply to Nuno SaAdd support for the power supply regulator.
--- drivers/iio/temperature/ltc2983.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/iio/temperature/ltc2983.c +5 -0
@@ -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);
Signature · 1 line
2.44.0
Quoted 4 lines · On Thu, 4 Apr 2024 10:58:16 +0200 Nuno Sa <[email protected]> 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
Quoted 22 lines
---
Changes in v5:
- Dropped patches 1,2,5 and 6.
- Link to v4: https://lore.kernel.org/all/[email protected]/---
Nuno Sa (2):
dt-bindings: iio: temperature: ltc2983: document power supply
iio: temperature: ltc2983: support vdd regulatorDocumentation/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á