ti,ads7950 device tree bindings
Subsystems (2)
cover ti,ads7950 device tree bindings
This series adds device tree bindings for the TI ADS7950 family of A/DC chips. The series includes the bindings documentation and some fixes to the iio driver to make it work with the device tree bindings.
FYI, the ads7950 driver has not made it into mainline yet, so no worries about breaking anyone with these changes.
David Lechner (3):
DT/bindings: Add bindings for TI ADS7950 A/DC chips
iio: adc: ti-ads7950: Drop "ti-" prefix from module name
iio: adc: ti-ads7950: Change regulator matching string to "vref"
.../devicetree/bindings/iio/adc/ti-ads7950.txt | 23 ++++++++++++++++ drivers/iio/adc/ti-ads7950.c | 32 +++++++++++----------- 2 files changed, 39 insertions(+), 16 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/adc/ti-ads7950.txt
Signature · 1 line
2.7.4
PATCH 1/3 DT/bindings: Add bindings for TI ADS7950 A/DC chips
This adds device tree bindings for the TI ADS7950 family of A/DC chips.
--- .../devicetree/bindings/iio/adc/ti-ads7950.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/ti-ads7950.txt
Documentation/devicetree/bindings/iio/adc/ti-ads7950.txt new file +23 -0
@@ -0,0 +1,23 @@ +* Texas Instruments ADS7950 family of A/DC chips + +Required properties: + - compatible: Must be one of "ti,ads7950", "ti,ads7951", "ti,ads7952", + "ti,ads7953", "ti,ads7954", "ti,ads7955", "ti,ads7956", "ti,ads7957", + "ti,ads7958", "ti,ads7959", "ti,ads7960", or "ti,ads7961" + - reg: SPI chip select number for the device + - #io-channel-cells: Must be 1 as per ../iio-bindings.txt + - vref-supply: phandle to a regulator node that supplies the 2.5V or 5V + reference voltage + +Recommended properties: + - spi-max-frequency: Definition as per + Documentation/devicetree/bindings/spi/spi-bus.txt + +Example: +adc@0 { + compatible = "ti,ads7957"; + reg = <0>; + #io-channel-cells = <1>; + vref-supply = <&refin_supply>; + spi-max-frequency = <10000000>; +};
Signature · 1 line
2.7.4
PATCH 2/3 iio: adc: ti-ads7950: Drop "ti-" prefix from module name
In reply to David LechnerThis drops the "ti-" prefix from the module name. It makes the module name consistent with other iio ti-ads* drivers and it makes the driver work with device tree (the spi subsystem drops the "ti," prefix when matching compatible strings from device tree).
Tested working on LEGO MINDSTORMS EV3 with the following device tree node:
adc@3 {
compatible = "ti,ads7957";
reg = <3>;
#io-channel-cells = <1>;
spi-max-frequency = <10000000>;
vref-supply = <&adc_ref>;
};--- drivers/iio/adc/ti-ads7950.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
drivers/iio/adc/ti-ads7950.c +13 -13
@@ -459,25 +459,25 @@ static int ti_ads7950_remove(struct spi_device *spi) }static const struct spi_device_id ti_ads7950_id[] = { - {"ti-ads7950" ,TI_ADS7950 }, - {"ti-ads7951" ,TI_ADS7951 }, - {"ti-ads7952" ,TI_ADS7952 }, - {"ti-ads7953" ,TI_ADS7953 }, - {"ti-ads7954" ,TI_ADS7954 }, - {"ti-ads7955" ,TI_ADS7955 }, - {"ti-ads7956" ,TI_ADS7956 }, - {"ti-ads7957" ,TI_ADS7957 }, - {"ti-ads7958" ,TI_ADS7958 }, - {"ti-ads7959" ,TI_ADS7959 }, - {"ti-ads7960" ,TI_ADS7960 }, - {"ti-ads7961" ,TI_ADS7961 }, + {"ads7950" ,TI_ADS7950 }, + {"ads7951" ,TI_ADS7951 }, + {"ads7952" ,TI_ADS7952 }, + {"ads7953" ,TI_ADS7953 }, + {"ads7954" ,TI_ADS7954 }, + {"ads7955" ,TI_ADS7955 }, + {"ads7956" ,TI_ADS7956 }, + {"ads7957" ,TI_ADS7957 }, + {"ads7958" ,TI_ADS7958 }, + {"ads7959" ,TI_ADS7959 }, + {"ads7960" ,TI_ADS7960 }, + {"ads7961" ,TI_ADS7961 }, { } };MODULE_DEVICE_TABLE (spi, ti_ads7950_id);static struct spi_driver ti_ads7950_driver = { .driver = { - .name ="ti-ads7950" , + .name ="ads7950" , }, .probe = ti_ads7950_probe, .remove = ti_ads7950_remove,
Signature · 1 line
2.7.4
PATCH 3/3 iio: adc: ti-ads7950: Change regulator matching string to "vref"
In reply to David LechnerThis changes the reference voltage regulator matching string from "refin" to "vref". This is to be consistent with other A/DC chips that also use "vref-supply" in their device tree bindings.
--- drivers/iio/adc/ti-ads7950.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/adc/ti-ads7950.c +3 -3
@@ -411,15 +411,15 @@ static int ti_ads7950_probe(struct spi_device *spi)spi_message_init_with_transfers (&st->scan_single_msg, st->scan_single_xfer,3 ); - st->reg =devm_regulator_get (&spi->dev,"refin" ); + st->reg =devm_regulator_get (&spi->dev,"vref" );if (IS_ERR (st->reg)) { -dev_err (&spi->dev,"Failed get get regulator \"refin\"\n" ); +dev_err (&spi->dev,"Failed get get regulator \"vref\"\n" );return PTR_ERR (st->reg); } ret =regulator_enable (st->reg);if (ret) { -dev_err (&spi->dev,"Failed to enable regulator \"refin\"\n" ); +dev_err (&spi->dev,"Failed to enable regulator \"vref\"\n" );return ret; }
Signature · 1 line
2.7.4
Jonathan Cameron
maintainerRe: [PATCH 2/3] iio: adc: ti-ads7950: Drop "ti-" prefix from module name
In reply to David LechnerQuoted 15 lines · David Lechner
This drops the "ti-" prefix from the module name. It makes the module name consistent with other iio ti-ads* drivers and it makes the driver work with device tree (the spi subsystem drops the "ti," prefix when matching compatible strings from device tree).
Tested working on LEGO MINDSTORMS EV3 with the following device tree node:
adc@3 { compatible = "ti,ads7957"; reg = <3>; #io-channel-cells = <1>; spi-max-frequency = <10000000>; vref-supply = <&adc_ref>; };
Quoted 1 line
Signed-off-by David Lechner <david-nq/r/kbU++upp/[email protected]>
What worries me here is that we might break existing setups. I agree we should have gotten this 'right' in the first place, but can we fix it now. Not so sure. We'd be better off perhaps adding an of_device_id table with the write entries for device tree.
Quoted 38 lines
--- drivers/iio/adc/ti-ads7950.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)drivers/iio/adc/ti-ads7950.c +12
-12@@ -459,25 +459,25 @@ static int ti_ads7950_remove(struct spi_device *spi) }static const struct spi_device_id ti_ads7950_id[] = { - {"ti-ads7950" ,TI_ADS7950 }, - {"ti-ads7951" ,TI_ADS7951 }, - {"ti-ads7952" ,TI_ADS7952 }, - {"ti-ads7953" ,TI_ADS7953 }, - {"ti-ads7954" ,TI_ADS7954 }, - {"ti-ads7955" ,TI_ADS7955 }, - {"ti-ads7956" ,TI_ADS7956 }, - {"ti-ads7957" ,TI_ADS7957 }, - {"ti-ads7958" ,TI_ADS7958 }, - {"ti-ads7959" ,TI_ADS7959 }, - {"ti-ads7960" ,TI_ADS7960 }, - {"ti-ads7961" ,TI_ADS7961 }, + {"ads7950" ,TI_ADS7950 }, + {"ads7951" ,TI_ADS7951 }, + {"ads7952" ,TI_ADS7952 }, + {"ads7953" ,TI_ADS7953 }, + {"ads7954" ,TI_ADS7954 }, + {"ads7955" ,TI_ADS7955 }, + {"ads7956" ,TI_ADS7956 }, + {"ads7957" ,TI_ADS7957 }, + {"ads7958" ,TI_ADS7958 }, + {"ads7959" ,TI_ADS7959 }, + {"ads7960" ,TI_ADS7960 }, + {"ads7961" ,TI_ADS7961 }, { }
drivers/iio/adc/ti-ads7950.c static int ti_ads7950_remove(struct spi_device *spi) · line 483
Quoted 10 lines
drivers/iio/adc/ti-ads7950.c +1
-1};MODULE_DEVICE_TABLE (spi, ti_ads7950_id);static struct spi_driver ti_ads7950_driver = { .driver = { - .name ="ti-ads7950" , + .name ="ads7950" , }, .probe = ti_ads7950_probe, .remove = ti_ads7950_remove,
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Jonathan Cameron
maintainerRe: [PATCH 3/3] iio: adc: ti-ads7950: Change regulator matching string to "vref"
In reply to David LechnerQuoted 7 lines · David Lechner
This changes the reference voltage regulator matching string from "refin" to "vref". This is to be consistent with other A/DC chips that also use "vref-supply" in their device tree bindings.
Signed-off-by David Lechner <david-nq/r/kbU++upp/[email protected]>--- drivers/iio/adc/ti-ads7950.c | 6 +++---
Again, we missed this before and it would have been nice to have had it as vref (which is matches the datasheet). The question becomes how do we handle this going forward with no risk of breaking existing device trees. We may have to do an optional get on one name and then a non optional on the second. It's ugly, but would fix this up in a 'safe' way.
Jonathan
Quoted 26 lines
1 file changed, 3 insertions(+), 3 deletions(-)drivers/iio/adc/ti-ads7950.c +3
-3@@ -411,15 +411,15 @@ static int ti_ads7950_probe(struct spi_device *spi)spi_message_init_with_transfers (&st->scan_single_msg, st->scan_single_xfer,3 ); - st->reg =devm_regulator_get (&spi->dev,"refin" ); + st->reg =devm_regulator_get (&spi->dev,"vref" );if (IS_ERR (st->reg)) { -dev_err (&spi->dev,"Failed get get regulator \"refin\"\n" ); +dev_err (&spi->dev,"Failed get get regulator \"vref\"\n" );return PTR_ERR (st->reg); } ret =regulator_enable (st->reg);if (ret) { -dev_err (&spi->dev,"Failed to enable regulator \"refin\"\n" ); +dev_err (&spi->dev,"Failed to enable regulator \"vref\"\n" );return ret; }
Jonathan Cameron
maintainerRe: [PATCH 1/3] DT/bindings: Add bindings for TI ADS7950 A/DC chips
In reply to David LechnerQuoted 3 lines · David Lechner
This adds device tree bindings for the TI ADS7950 family of A/DC chips.
Signed-off-by David Lechner <david-nq/r/kbU++upp/[email protected]>
This is in of itself good, but we may need to have some deprecated elements to continue supporting what was implicitly happening with the missnaming so as to avoid accidentally breaking someone's device tree.
Jonathan
Quoted 35 lines
--- .../devicetree/bindings/iio/adc/ti-ads7950.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/ti-ads7950.txtDocumentation/devicetree/bindings/iio/adc/ti-ads7950.txt new file +23
-0@@ -0,0 +1,23 @@ +* Texas Instruments ADS7950 family of A/DC chips + +Required properties: + - compatible: Must be one of "ti,ads7950", "ti,ads7951", "ti,ads7952", + "ti,ads7953", "ti,ads7954", "ti,ads7955", "ti,ads7956", "ti,ads7957", + "ti,ads7958", "ti,ads7959", "ti,ads7960", or "ti,ads7961" + - reg: SPI chip select number for the device + - #io-channel-cells: Must be 1 as per ../iio-bindings.txt + - vref-supply: phandle to a regulator node that supplies the 2.5V or 5V + reference voltage + +Recommended properties: + - spi-max-frequency: Definition as per + Documentation/devicetree/bindings/spi/spi-bus.txt + +Example: +adc@0 { + compatible = "ti,ads7957"; + reg = <0>; + #io-channel-cells = <1>; + vref-supply = <&refin_supply>; + spi-max-frequency = <10000000>; +};
Re: [PATCH 1/3] DT/bindings: Add bindings for TI ADS7950 A/DC chips
Quoted 9 lines · Jonathan Cameron
Quoted 3 lines · David Lechner
This adds device tree bindings for the TI ADS7950 family of A/DC chips.
Signed-off-by David Lechner <david-nq/r/kbU++upp/[email protected]>This is in of itself good, but we may need to have some deprecated elements to continue supporting what was implicitly happening with the missnaming so as to avoid accidentally breaking someone's device tree.
As I mentioned in my cover letter, this driver, as far as I can tell, only exists in your testing branch, so I find it highly unlikely that we would be breaking anyone. It is not in mainline and it is not even in linux-next.
Quoted 37 lines
Jonathan
Quoted 35 lines
--- .../devicetree/bindings/iio/adc/ti-ads7950.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/ti-ads7950.txtDocumentation/devicetree/bindings/iio/adc/ti-ads7950.txt new file +23
-0@@ -0,0 +1,23 @@ +* Texas Instruments ADS7950 family of A/DC chips + +Required properties: + - compatible: Must be one of "ti,ads7950", "ti,ads7951", "ti,ads7952", + "ti,ads7953", "ti,ads7954", "ti,ads7955", "ti,ads7956", "ti,ads7957", + "ti,ads7958", "ti,ads7959", "ti,ads7960", or "ti,ads7961" + - reg: SPI chip select number for the device + - #io-channel-cells: Must be 1 as per ../iio-bindings.txt + - vref-supply: phandle to a regulator node that supplies the 2.5V or 5V + reference voltage + +Recommended properties: + - spi-max-frequency: Definition as per + Documentation/devicetree/bindings/spi/spi-bus.txt + +Example: +adc@0 { + compatible = "ti,ads7957"; + reg = <0>; + #io-channel-cells = <1>; + vref-supply = <&refin_supply>; + spi-max-frequency = <10000000>; +};
Re: [PATCH 2/3] iio: adc: ti-ads7950: Drop "ti-" prefix from module name
In reply to Jonathan CameronQuoted 16 lines · Jonathan Cameron
Quoted 15 lines · David Lechner
This drops the "ti-" prefix from the module name. It makes the module name consistent with other iio ti-ads* drivers and it makes the driver work with device tree (the spi subsystem drops the "ti," prefix when matching compatible strings from device tree).
Tested working on LEGO MINDSTORMS EV3 with the following device tree node:
adc@3 { compatible = "ti,ads7957"; reg = <3>; #io-channel-cells = <1>; spi-max-frequency = <10000000>; vref-supply = <&adc_ref>; };
Quoted 5 lines
Quoted 1 line
Signed-off-by David Lechner <[email protected]>What worries me here is that we might break existing setups. I agree we should have gotten this 'right' in the first place, but can we fix it now. Not so sure. We'd be better off perhaps adding an
of_device_idtable with the write entries for device tree.
As far as I can tell, this driver only exists in your testing branch. Does that really mean that it is too late to get it right?
Quoted 49 lines
Quoted 48 lines
--- drivers/iio/adc/ti-ads7950.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)drivers/iio/adc/ti-ads7950.c +13
-13@@ -459,25 +459,25 @@ static int ti_ads7950_remove(struct spi_device *spi) }static const struct spi_device_id ti_ads7950_id[] = { - {"ti-ads7950" ,TI_ADS7950 }, - {"ti-ads7951" ,TI_ADS7951 }, - {"ti-ads7952" ,TI_ADS7952 }, - {"ti-ads7953" ,TI_ADS7953 }, - {"ti-ads7954" ,TI_ADS7954 }, - {"ti-ads7955" ,TI_ADS7955 }, - {"ti-ads7956" ,TI_ADS7956 }, - {"ti-ads7957" ,TI_ADS7957 }, - {"ti-ads7958" ,TI_ADS7958 }, - {"ti-ads7959" ,TI_ADS7959 }, - {"ti-ads7960" ,TI_ADS7960 }, - {"ti-ads7961" ,TI_ADS7961 }, + {"ads7950" ,TI_ADS7950 }, + {"ads7951" ,TI_ADS7951 }, + {"ads7952" ,TI_ADS7952 }, + {"ads7953" ,TI_ADS7953 }, + {"ads7954" ,TI_ADS7954 }, + {"ads7955" ,TI_ADS7955 }, + {"ads7956" ,TI_ADS7956 }, + {"ads7957" ,TI_ADS7957 }, + {"ads7958" ,TI_ADS7958 }, + {"ads7959" ,TI_ADS7959 }, + {"ads7960" ,TI_ADS7960 }, + {"ads7961" ,TI_ADS7961 }, { } };MODULE_DEVICE_TABLE (spi, ti_ads7950_id);static struct spi_driver ti_ads7950_driver = { .driver = { - .name ="ti-ads7950" , + .name ="ads7950" , }, .probe = ti_ads7950_probe, .remove = ti_ads7950_remove,
Re: [PATCH 3/3] iio: adc: ti-ads7950: Change regulator matching string to "vref"
In reply to Jonathan CameronQuoted 8 lines · Jonathan Cameron
Quoted 7 lines · David Lechner
This changes the reference voltage regulator matching string from "refin" to "vref". This is to be consistent with other A/DC chips that also use "vref-supply" in their device tree bindings.
Signed-off-by David Lechner <david-nq/r/kbU++upp/[email protected]>--- drivers/iio/adc/ti-ads7950.c | 6 +++---
Quoted 7 lines
Again, we missed this before and it would have been nice to have had it as vref (which is matches the datasheet). The question becomes how do we handle this going forward with no risk of breaking existing device trees. We may have to do an optional get on one name and then a non optional on the second. It's ugly, but would fix this up in a 'safe' way.
Again, I don't think it is too late since this driver only exists in the iio/testing branch.
Quoted 28 lines
Jonathan
Quoted 26 lines
1 file changed, 3 insertions(+), 3 deletions(-)drivers/iio/adc/ti-ads7950.c +3
-3@@ -411,15 +411,15 @@ static int ti_ads7950_probe(struct spi_device *spi)spi_message_init_with_transfers (&st->scan_single_msg, st->scan_single_xfer,3 ); - st->reg =devm_regulator_get (&spi->dev,"refin" ); + st->reg =devm_regulator_get (&spi->dev,"vref" );if (IS_ERR (st->reg)) { -dev_err (&spi->dev,"Failed get get regulator \"refin\"\n" ); +dev_err (&spi->dev,"Failed get get regulator \"vref\"\n" );return PTR_ERR (st->reg); } ret =regulator_enable (st->reg);if (ret) { -dev_err (&spi->dev,"Failed to enable regulator \"refin\"\n" ); +dev_err (&spi->dev,"Failed to enable regulator \"vref\"\n" );return ret; }
Jonathan Cameron
maintainerRe: [PATCH 1/3] DT/bindings: Add bindings for TI ADS7950 A/DC chips
In reply to David LechnerQuoted 11 lines · David Lechner
Quoted 9 lines · Jonathan Cameron
Quoted 3 lines · David Lechner
This adds device tree bindings for the TI ADS7950 family of A/DC chips.
Signed-off-by David Lechner <[email protected]>This is in of itself good, but we may need to have some deprecated elements to continue supporting what was implicitly happening with the missnaming so as to avoid accidentally breaking someone's device tree.
Quoted 4 lines
As I mentioned in my cover letter, this driver, as far as I can tell, only exists in your testing branch, so I find it highly unlikely that we would be breaking anyone. It is not in mainline and it is not even in linux-next.
Oops, I not only have a memory like a goldfish, I clearly didn't read your cover letter either.
Applied to the togreg branch of iio.git and pushed out as testing.
The driver will hit next before this does but will get into mainline in the same ultimate pull request unless something weird happens so that's all fine.
Jonathan
Quoted 42 lines
Quoted 37 lines
Jonathan
Quoted 35 lines
--- .../devicetree/bindings/iio/adc/ti-ads7950.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/ti-ads7950.txtDocumentation/devicetree/bindings/iio/adc/ti-ads7950.txt new file +23
-0@@ -0,0 +1,23 @@ +* Texas Instruments ADS7950 family of A/DC chips + +Required properties: + - compatible: Must be one of "ti,ads7950", "ti,ads7951", "ti,ads7952", + "ti,ads7953", "ti,ads7954", "ti,ads7955", "ti,ads7956", "ti,ads7957", + "ti,ads7958", "ti,ads7959", "ti,ads7960", or "ti,ads7961" + - reg: SPI chip select number for the device + - #io-channel-cells: Must be 1 as per ../iio-bindings.txt + - vref-supply: phandle to a regulator node that supplies the 2.5V or 5V + reference voltage + +Recommended properties: + - spi-max-frequency: Definition as per + Documentation/devicetree/bindings/spi/spi-bus.txt + +Example: +adc@0 { + compatible = "ti,ads7957"; + reg = <0>; + #io-channel-cells = <1>; + vref-supply = <&refin_supply>; + spi-max-frequency = <10000000>; +};Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Jonathan Cameron
maintainerRe: [PATCH 2/3] iio: adc: ti-ads7950: Drop "ti-" prefix from module name
In reply to David LechnerQuoted 18 lines · David Lechner
Quoted 17 lines · Jonathan Cameron
Quoted 16 lines · David Lechner
This drops the "ti-" prefix from the module name. It makes the module name consistent with other iio ti-ads* drivers and it makes the driver work with device tree (the spi subsystem drops the "ti," prefix when matching compatible strings from device tree).
Tested working on LEGO MINDSTORMS EV3 with the following device tree node:
adc@3 { compatible = "ti,ads7957"; reg = <3>; #io-channel-cells = <1>; spi-max-frequency = <10000000>; vref-supply = <&adc_ref>; };Signed-off-by David Lechner <[email protected]>
Quoted 8 lines
Quoted 4 lines
What worries me here is that we might break existing setups. I agree we should have gotten this 'right' in the first place, but can we fix it now. Not so sure. We'd be better off perhaps adding an
of_device_idtable with the write entries for device tree.As far as I can tell, this driver only exists in your testing branch. Does that really mean that it is too late to get it right?
Gah! I have a memory like a goldfish.
Excellent point - we can and should do this asap.
Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.
Thanks,
Jonathan
Quoted 54 lines
Quoted 49 lines
Quoted 48 lines
--- drivers/iio/adc/ti-ads7950.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)drivers/iio/adc/ti-ads7950.c +13
-13@@ -459,25 +459,25 @@ static int ti_ads7950_remove(struct spi_device *spi) }static const struct spi_device_id ti_ads7950_id[] = { - {"ti-ads7950" ,TI_ADS7950 }, - {"ti-ads7951" ,TI_ADS7951 }, - {"ti-ads7952" ,TI_ADS7952 }, - {"ti-ads7953" ,TI_ADS7953 }, - {"ti-ads7954" ,TI_ADS7954 }, - {"ti-ads7955" ,TI_ADS7955 }, - {"ti-ads7956" ,TI_ADS7956 }, - {"ti-ads7957" ,TI_ADS7957 }, - {"ti-ads7958" ,TI_ADS7958 }, - {"ti-ads7959" ,TI_ADS7959 }, - {"ti-ads7960" ,TI_ADS7960 }, - {"ti-ads7961" ,TI_ADS7961 }, + {"ads7950" ,TI_ADS7950 }, + {"ads7951" ,TI_ADS7951 }, + {"ads7952" ,TI_ADS7952 }, + {"ads7953" ,TI_ADS7953 }, + {"ads7954" ,TI_ADS7954 }, + {"ads7955" ,TI_ADS7955 }, + {"ads7956" ,TI_ADS7956 }, + {"ads7957" ,TI_ADS7957 }, + {"ads7958" ,TI_ADS7958 }, + {"ads7959" ,TI_ADS7959 }, + {"ads7960" ,TI_ADS7960 }, + {"ads7961" ,TI_ADS7961 }, { } };MODULE_DEVICE_TABLE (spi, ti_ads7950_id);static struct spi_driver ti_ads7950_driver = { .driver = { - .name ="ti-ads7950" , + .name ="ads7950" , }, .probe = ti_ads7950_probe, .remove = ti_ads7950_remove,Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Jonathan Cameron
maintainerRe: [PATCH 3/3] iio: adc: ti-ads7950: Change regulator matching string to "vref"
In reply to David LechnerQuoted 17 lines · David Lechner
Quoted 8 lines · Jonathan Cameron
Quoted 7 lines · David Lechner
This changes the reference voltage regulator matching string from "refin" to "vref". This is to be consistent with other A/DC chips that also use "vref-supply" in their device tree bindings.
Signed-off-by David Lechner <[email protected]>--- drivers/iio/adc/ti-ads7950.c | 6 +++---Quoted 7 lines
Again, we missed this before and it would have been nice to have had it as vref (which is matches the datasheet). The question becomes how do we handle this going forward with no risk of breaking existing device trees. We may have to do an optional get on one name and then a non optional on the second. It's ugly, but would fix this up in a 'safe' way.
Quoted 1 line
Again, I don't think it is too late since this driver only exists in the iio/testing branch.
Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.
Thanks,
Jonathan
Quoted 34 lines
Quoted 29 lines
Jonathan
Quoted 26 lines
1 file changed, 3 insertions(+), 3 deletions(-)drivers/iio/adc/ti-ads7950.c +3
-3@@ -411,15 +411,15 @@ static int ti_ads7950_probe(struct spi_device *spi)spi_message_init_with_transfers (&st->scan_single_msg, st->scan_single_xfer,3 ); - st->reg =devm_regulator_get (&spi->dev,"refin" ); + st->reg =devm_regulator_get (&spi->dev,"vref" );if (IS_ERR (st->reg)) { -dev_err (&spi->dev,"Failed get get regulator \"refin\"\n" ); +dev_err (&spi->dev,"Failed get get regulator \"vref\"\n" );return PTR_ERR (st->reg); } ret =regulator_enable (st->reg);if (ret) { -dev_err (&spi->dev,"Failed to enable regulator \"refin\"\n" ); +dev_err (&spi->dev,"Failed to enable regulator \"vref\"\n" );return ret; }Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Jonathan Cameron
maintainerQuoted 7 lines · David Lechner
This series adds device tree bindings for the TI ADS7950 family of A/DC chips. The series includes the bindings documentation and some fixes to the iio driver to make it work with the device tree bindings.
FYI, the ads7950 driver has not made it into mainline yet, so no worries about breaking anyone with these changes.
And here's the bit I failed to read!
As an extra point, could you confirm what /sys/bus/iio/iio\:deviceX/name for this one reads? I have a feeling this is another case of what Lars has been pointing out in other drivers this morning. That name should be the device part number..
Thanks,
Jonathan
Quoted 10 lines
David Lechner (3):
DT/bindings: Add bindings for TI ADS7950 A/DC chips
iio: adc: ti-ads7950: Drop "ti-" prefix from module name
iio: adc: ti-ads7950: Change regulator matching string to "vref".../devicetree/bindings/iio/adc/ti-ads7950.txt | 23 ++++++++++++++++ drivers/iio/adc/ti-ads7950.c | 32 +++++++++++----------- 2 files changed, 39 insertions(+), 16 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/adc/ti-ads7950.txt
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 5 lines · Jonathan Cameron
Quoted 4 lines · David Lechner
This series adds device tree bindings for the TI ADS7950 family of A/DC chips. The series includes the bindings documentation and some fixes to the iio driver to make it work with the device tree bindings.
Quoted 9 lines
Quoted 3 lines
FYI, the ads7950 driver has not made it into mainline yet, so no worries about breaking anyone with these changes.
And here's the bit I failed to read!
As an extra point, could you confirm what /sys/bus/iio/iio\:deviceX/name for this one reads? I have a feeling this is another case of what Lars has been pointing out in other drivers this morning. That name should be the device part number..
cat /sys/bus/iio/devices/iio\:device0/name
ads7957
This is the part number for the specific chip I am using. So, I am guessing that it is correct unless it is supposed to be upper case or something like that.
Quoted 14 lines
Thanks,
Jonathan
Quoted 10 lines
David Lechner (3):
DT/bindings: Add bindings for TI ADS7950 A/DC chips
iio: adc: ti-ads7950: Drop "ti-" prefix from module name
iio: adc: ti-ads7950: Change regulator matching string to "vref".../devicetree/bindings/iio/adc/ti-ads7950.txt | 23 ++++++++++++++++ drivers/iio/adc/ti-ads7950.c | 32 +++++++++++----------- 2 files changed, 39 insertions(+), 16 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/adc/ti-ads7950.txt
Re: [PATCH 1/3] DT/bindings: Add bindings for TI ADS7950 A/DC chips
In reply to David LechnerQuoted 7 lines · David Lechner
This adds device tree bindings for the TI ADS7950 family of A/DC chips.
Signed-off-by David Lechner <david-nq/r/kbU++upp/[email protected]>--- .../devicetree/bindings/iio/adc/ti-ads7950.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/ti-ads7950.txt
Jonathan Cameron
maintainerQuoted 16 lines · David Lechner
Quoted 5 lines · Jonathan Cameron
Quoted 4 lines · David Lechner
This series adds device tree bindings for the TI ADS7950 family of A/DC chips. The series includes the bindings documentation and some fixes to the iio driver to make it work with the device tree bindings.
Quoted 9 lines
Quoted 3 lines
FYI, the ads7950 driver has not made it into mainline yet, so no worries about breaking anyone with these changes.
And here's the bit I failed to read!
As an extra point, could you confirm what /sys/bus/iio/iio\:deviceX/name for this one reads? I have a feeling this is another case of what Lars has been pointing out in other drivers this morning. That name should be the device part number..
Quoted 6 lines
cat /sys/bus/iio/devices/iio\:device0/name
ads7957This is the part number for the specific chip I am using. So, I am guessing that it is correct unless it is supposed to be upper case or something like that.
Cool. Spot on.
Quoted 16 lines
Quoted 15 lines
Thanks,
Jonathan
Quoted 10 lines
David Lechner (3):
DT/bindings: Add bindings for TI ADS7950 A/DC chips
iio: adc: ti-ads7950: Drop "ti-" prefix from module name
iio: adc: ti-ads7950: Change regulator matching string to "vref".../devicetree/bindings/iio/adc/ti-ads7950.txt | 23 ++++++++++++++++ drivers/iio/adc/ti-ads7950.c | 32 +++++++++++----------- 2 files changed, 39 insertions(+), 16 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/adc/ti-ads7950.txt