IIO: Mroe of to generic fw conversions.
Subsystems (7)
Jonathan Cameron
maintainercover IIO: Mroe of to generic fw conversions.
From: Jonathan Cameron <[email protected]>
Nothing particularly special about this series, just a few more drifvers converted and related header and Kconfig dependency cleanups.
For now I'm focussing mostly on standalone parts rather than those integrated in SoCs.
Any feedback welcome.
Thanks,
Jonathan
Jonathan Cameron (12):
iio:dac:ad5755: Switch to generic firmware properties. iio:dac:ad5758: Drop unused of specific headers. iio:dac:dpot-dac: Swap of.h for mod_devicetable.h iio:dac:lpc18xx_dac: Swap from of* to mod_devicetable.h iio:pot:mcp41010: Switch to generic firmware properties. iio:light:cm3605: Switch to generic firmware properties. iio:adc:max9611: Switch to generic firmware properties. iio:adc:mcp3911: Switch to generic firmware properties. iio:adc:ti-adc12138: Switch to generic firmware properties. iio:adc:envelope-detector: Switch from of headers to mod_devicetable.h iio:adc:ti-ads124s08: Drop dependency on OF. iio:adc/dac:Kconfig: Update to drop OF dependencies.
drivers/iio/adc/Kconfig | 6 ++-- drivers/iio/adc/envelope-detector.c | 3 +- drivers/iio/adc/max9611.c | 20 ++++++------ drivers/iio/adc/mcp3911.c | 8 +++-- drivers/iio/adc/ti-adc12138.c | 9 ++---- drivers/iio/adc/ti-ads124s08.c | 3 +- drivers/iio/dac/Kconfig | 1 - drivers/iio/dac/ad5755.c | 47 ++++++++++------------------ drivers/iio/dac/ad5758.c | 3 +- drivers/iio/dac/dpot-dac.c | 2 +- drivers/iio/dac/lpc18xx_dac.c | 3 +- drivers/iio/light/cm3605.c | 6 ++-- drivers/iio/potentiometer/mcp41010.c | 6 ++-- 13 files changed, 47 insertions(+), 70 deletions(-)
Signature · 1 line
2.34.1
Jonathan Cameron
maintainerPATCH 1/12 iio:dac:ad5755: Switch to generic firmware properties.
From: Jonathan Cameron <[email protected]>
Done by inspection only. Mostly completely mechanical with the exception of a few places where default value handling is cleaner done by first setting the value, then calling the firmware reading function but and not checking the return value, as opposed to reading firmware then setting the default if an error occurs.
Part of general attempt to move all of IIO over to generic device properties, both to enable other firmware types and to remove drivers that can be the source of of_ specific behaviour in new drivers.
--- drivers/iio/dac/ad5755.c | 47 ++++++++++++++-------------------------- 1 file changed, 16 insertions(+), 31 deletions(-)
drivers/iio/dac/ad5755.c +16 -31
@@ -13,7 +13,7 @@#include <linux/slab.h> #include <linux/sysfs.h> #include <linux/delay.h> -#include <linux/of.h> +#include <linux/property.h> #include <linux/iio/iio.h> #include <linux/iio/sysfs.h> #include <linux/platform_data/ad5755.h>
@@ -111,7 +111,6 @@ enum ad5755_type { ID_AD5737, }; -#ifdef CONFIG_OF static const int ad5755_dcdc_freq_table[][2 ] = { {250000 , AD5755_DC_DC_FREQ_250kHZ }, {410000 , AD5755_DC_DC_FREQ_410kHZ },
@@ -154,7 +153,6 @@ static const int ad5755_slew_step_table[][2] = { { 2, AD5755_SLEW_STEP_SIZE_2 }, { 1, AD5755_SLEW_STEP_SIZE_1 }, }; -#endifstatic int ad5755_write_unlocked (struct iio_dev *indio_dev,unsigned int reg,unsigned int val)
@@ -604,11 +602,9 @@ static const struct ad5755_platform_data ad5755_default_pdata = { }, }; -#ifdef CONFIG_OF -static struct ad5755_platform_data *ad5755_parse_dt (struct device *dev) +static struct ad5755_platform_data *ad5755_parse_fw (struct device *dev) { -struct device_node *np = dev->of_node; -struct device_node *pp; +struct fwnode_handle *pp;struct ad5755_platform_data *pdata;unsigned int tmp;unsigned int tmparray[3 ];
@@ -619,15 +615,13 @@ static struct ad5755_platform_data *ad5755_parse_dt(struct device *dev)return NULL ; pdata->ext_dc_dc_compenstation_resistor = -of_property_read_bool (np,"adi,ext-dc-dc-compenstation-resistor" ); +device_property_read_bool (dev,"adi,ext-dc-dc-compenstation-resistor" ); -if (!of_property_read_u32 (np,"adi,dc-dc-phase" , &tmp)) - pdata->dc_dc_phase = tmp; -else - pdata->dc_dc_phase =AD5755_DC_DC_PHASE_ALL_SAME_EDGE ; + pdata->dc_dc_phase =AD5755_DC_DC_PHASE_ALL_SAME_EDGE ; +device_property_read_u32 (dev,"adi,dc-dc-phase" , &pdata->dc_dc_phase); pdata->dc_dc_freq = AD5755_DC_DC_FREQ_410kHZ; -if (!of_property_read_u32 (np,"adi,dc-dc-freq-hz" , &tmp)) { +if (!device_property_read_u32 (dev,"adi,dc-dc-freq-hz" , &tmp)) {for (i =0 ; i <ARRAY_SIZE (ad5755_dcdc_freq_table); i++) {if (tmp == ad5755_dcdc_freq_table[i][0 ]) { pdata->dc_dc_freq = ad5755_dcdc_freq_table[i][1 ];
@@ -641,7 +635,7 @@ static struct ad5755_platform_data *ad5755_parse_dt(struct device *dev) } pdata->dc_dc_maxv =AD5755_DC_DC_MAXV_23V ; -if (!of_property_read_u32 (np,"adi,dc-dc-max-microvolt" , &tmp)) { +if (!device_property_read_u32 (dev,"adi,dc-dc-max-microvolt" , &tmp)) {for (i =0 ; i <ARRAY_SIZE (ad5755_dcdc_maxv_table); i++) {if (tmp == ad5755_dcdc_maxv_table[i][0 ]) { pdata->dc_dc_maxv = ad5755_dcdc_maxv_table[i][1 ];
@@ -654,25 +648,23 @@ static struct ad5755_platform_data *ad5755_parse_dt(struct device *dev) } devnr =0 ; -for_each_child_of_node (np, pp) { +device_for_each_child_node (dev, pp) {if (devnr >=AD5755_NUM_CHANNELS ) {dev_err (dev,"There are too many channels defined in DT\n" ); goto error_out; } -if (!of_property_read_u32 (pp,"adi,mode" , &tmp)) - pdata->dac[devnr].mode = tmp; -else - pdata->dac[devnr].mode = AD5755_MODE_CURRENT_4mA_20mA; + pdata->dac[devnr].mode = AD5755_MODE_CURRENT_4mA_20mA; +fwnode_property_read_u32 (pp,"adi,mode" , &pdata->dac[devnr].mode); pdata->dac[devnr].ext_current_sense_resistor = -of_property_read_bool (pp,"adi,ext-current-sense-resistor" ); +fwnode_property_read_bool (pp,"adi,ext-current-sense-resistor" ); pdata->dac[devnr].enable_voltage_overrange = -of_property_read_bool (pp,"adi,enable-voltage-overrange" ); +fwnode_property_read_bool (pp,"adi,enable-voltage-overrange" ); -if (!of_property_read_u32_array (pp,"adi,slew" , tmparray,3 )) { +if (!fwnode_property_read_u32_array (pp,"adi,slew" , tmparray,3 )) { pdata->dac[devnr].slew.enable = tmparray[0 ]; pdata->dac[devnr].slew.rate = AD5755_SLEW_RATE_64k;
@@ -715,13 +707,6 @@ static struct ad5755_platform_data *ad5755_parse_dt(struct device *dev)devm_kfree (dev, pdata);return NULL ; } -#else -static -struct ad5755_platform_data *ad5755_parse_dt (struct device *dev) -{ -return NULL ; -} -#endif static int ad5755_probe (struct spi_device *spi) {
@@ -751,8 +736,8 @@ static int ad5755_probe(struct spi_device *spi)mutex_init (&st->lock); -if (spi->dev.of_node) - pdata =ad5755_parse_dt (&spi->dev); +if (dev_fwnode (&spi->dev)) + pdata =ad5755_parse_fw (&spi->dev);else pdata = spi->dev.platform_data;
Signature · 1 line
2.34.1
Re: [PATCH 01/12] iio:dac:ad5755: Switch to generic firmware properties.
drivers/iio/dac/ad5755.c static int ad5755_probe(struct spi_device *spi) · line 742
Quoted 12 lines · Jonathan Cameron
static int ad5755_probe(struct spi_device *spi) {drivers/iio/dac/ad5755.c +2
-2@@ -751,8 +736,8 @@ static int ad5755_probe(struct spi_device *spi)mutex_init (&st->lock); -if (spi->dev.of_node) - pdata =ad5755_parse_dt (&spi->dev); +if (dev_fwnode (&spi->dev)) + pdata =ad5755_parse_fw (&spi->dev);else pdata = spi->dev.platform_data;
Considering that it is possible to supply fw_node data through platform files we as well just completely drop platform_data support. And make the platform data struct local to this file.
Jonathan Cameron
maintainerRe: [PATCH 01/12] iio:dac:ad5755: Switch to generic firmware properties.
Quoted 7 lines · On Sun, 28 Nov 2021 20:40:33 +0100 Lars-Peter Clausen <[email protected]> wrote:
Quoted 6 lines · Jonathan Cameron
static int ad5755_probe(struct spi_device *spi) {drivers/iio/dac/ad5755.c +0
-0@@ -751,8 +736,8 @@ static int ad5755_probe(struct spi_device *spi)mutex_init (&st->lock);
Quoted 10 lines
drivers/iio/dac/ad5755.c static int ad5755_probe(struct spi_device *spi) · line 742
Quoted 6 lines
drivers/iio/dac/ad5755.c +2
-2-if (spi->dev.of_node) - pdata =ad5755_parse_dt (&spi->dev); +if (dev_fwnode (&spi->dev)) + pdata =ad5755_parse_fw (&spi->dev);else pdata = spi->dev.platform_data;Considering that it is possible to supply
fw_nodedata through platform files we as well just completely dropplatform_datasupport. And make the platform data struct local to this file.
Good point. I'm in two minds about whether there is any advantage in leaving the enum definitions in the platform_data header.
They aren't used in the dt binding (which includes an unrelated header - I'll fix that as well..), so I'm not sure what the logic of exposing them for other firmware bindings would be...
I'll squash them directly into the c file for now and we can always put them back in a header if it turns out someone needs them later.
Jonathan
Jonathan Cameron
maintainerPATCH 2/12 iio:dac:ad5758: Drop unused of specific headers.
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
These have never been used in this driver. What is used is in mod_devicetable.h so add that include (struct of_device_id)
--- drivers/iio/dac/ad5758.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/iio/dac/ad5758.c +1 -2
@@ -10,9 +10,8 @@#include <linux/delay.h> #include <linux/kernel.h> #include <linux/module.h> +#include <linux/mod_devicetable.h> #include <linux/property.h> -#include <linux/of.h> -#include <linux/of_device.h> #include <linux/spi/spi.h> #include <linux/gpio/consumer.h>
Signature · 1 line
2.34.1
Jonathan Cameron
maintainerPATCH 3/12 iio:dac:dpot-dac: Swap of.h for mod_devicetable.h
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
This driver never used anything in the of specific header. It just wants the struct of_device_id from mod_devicetable.h.
--- drivers/iio/dac/dpot-dac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/dac/dpot-dac.c +1 -1
@@ -30,7 +30,7 @@#include <linux/iio/consumer.h> #include <linux/iio/iio.h> #include <linux/module.h> -#include <linux/of.h> +#include <linux/mod_devicetable.h> #include <linux/platform_device.h> #include <linux/regulator/consumer.h>
Signature · 1 line
2.34.1
Re: [PATCH 03/12] iio:dac:dpot-dac: Swap of.h for mod_devicetable.h
Quoted 7 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
This driver never used anything in the of specific header. It just wants the struct
of_device_idfrommod_devicetable.h.Signed-off-by Jonathan Cameron <[email protected]>Cc Peter Rosin <[email protected]>
Cheers,
Peter
Jonathan Cameron
maintainerPATCH 4/12 iio:dac:lpc18xx_dac: Swap from of* to mod_devicetable.h
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
This driver never used anything from the of specific headers. mod_devicetable.h provides the struct of_device_id definition.
--- drivers/iio/dac/lpc18xx_dac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/iio/dac/lpc18xx_dac.c +1 -2
@@ -16,9 +16,8 @@#include <linux/io.h> #include <linux/iopoll.h> #include <linux/module.h> +#include <linux/mod_devicetable.h> #include <linux/mutex.h> -#include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/regulator/consumer.h>
Signature · 1 line
2.34.1
Jonathan Cameron
maintainerPATCH 5/12 iio:pot:mcp41010: Switch to generic firmware properties.
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
In this case it was only of_device_get_match_data() + header update. This enables use of other firmware types with no other changes, such as ACPI via the PRP0001 route.
--- drivers/iio/potentiometer/mcp41010.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/potentiometer/mcp41010.c +3 -3
@@ -21,9 +21,9 @@#include <linux/iio/iio.h> #include <linux/iio/types.h> #include <linux/module.h> +#include <linux/mod_devicetable.h> #include <linux/mutex.h> -#include <linux/of.h> -#include <linux/of_device.h> +#include <linux/property.h> #include <linux/spi/spi.h> #define MCP41010_MAX_WIPERS 2
@@ -146,7 +146,7 @@ static int mcp41010_probe(struct spi_device *spi) data =iio_priv (indio_dev);spi_set_drvdata (spi, indio_dev); data->spi = spi; - data->cfg =of_device_get_match_data (&spi->dev); + data->cfg =device_get_match_data (&spi->dev);if (!data->cfg) data->cfg = &mcp41010_cfg[spi_get_device_id (spi)->driver_data];
Signature · 1 line
2.34.1
Jonathan Cameron
maintainerPATCH 6/12 iio:light:cm3605: Switch to generic firmware properties.
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
This enables use of other firmware types with minimal driver changes. Part of an ongoing effort to move all IIO drivers over to generic accessors in order to reduce the chance of of_* versions being copied into new drivers. Also updated the headers to reflect this change including using mod_devicetable.h for struct of_device_id definition rather than going via of.h
--- drivers/iio/light/cm3605.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/light/cm3605.c +3 -3
@@ -10,6 +10,7 @@*/ #include <linux/module.h> +#include <linux/mod_devicetable.h> #include <linux/iio/iio.h> #include <linux/iio/sysfs.h> #include <linux/iio/events.h>
@@ -18,7 +19,7 @@#include <linux/init.h> #include <linux/leds.h> #include <linux/platform_device.h> -#include <linux/of.h> +#include <linux/property.h> #include <linux/regulator/consumer.h> #include <linux/gpio/consumer.h> #include <linux/interrupt.h>
@@ -156,7 +157,6 @@ static int cm3605_probe(struct platform_device *pdev)struct cm3605 *cm3605;struct iio_dev *indio_dev;struct device *dev = &pdev->dev; -struct device_node *np = dev->of_node;enum iio_chan_type ch_type;u32 rset;int irq;
@@ -171,7 +171,7 @@ static int cm3605_probe(struct platform_device *pdev) cm3605->dev = dev; cm3605->dir =IIO_EV_DIR_FALLING ; - ret =of_property_read_u32 (np,"capella,aset-resistance-ohms" , &rset); + ret =device_property_read_u32 (dev,"capella,aset-resistance-ohms" , &rset);if (ret) {dev_info (dev,"no RSET specified, assuming 100K\n" ); rset =100000 ;
Signature · 1 line
2.34.1
Re: [PATCH 06/12] iio:light:cm3605: Switch to generic firmware properties.
Quoted 11 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
This enables use of other firmware types with minimal driver changes. Part of an ongoing effort to move all IIO drivers over to generic accessors in order to reduce the chance of of_* versions being copied into new drivers. Also updated the headers to reflect this change including using
mod_devicetable.hfor structof_device_iddefinition rather than going viaof.hSigned-off-by Jonathan Cameron <[email protected]>Cc Linus Walleij <[email protected]>
Yours,
Linus Walleij
Jonathan Cameron
maintainerPATCH 7/12 iio:adc:max9611: Switch to generic firmware properties.
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
Note the handling of the device tree node in this driver was somewhat unusual. I have cleaned that up whilst also moving over to generic properties.
Part of a general attempt to move all IIO drivers over to generic firmware properties both as a general improvement and to avoid sources of cut and paste into future drivers.
--- drivers/iio/adc/max9611.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-)
drivers/iio/adc/max9611.c +9 -11
@@ -22,7 +22,8 @@#include <linux/iio/iio.h> #include <linux/iio/sysfs.h> #include <linux/module.h> -#include <linux/of_device.h> +#include <linux/mod_devicetable.h> +#include <linux/property.h> #define DRIVER_NAME "max9611"
@@ -513,11 +514,9 @@ static int max9611_probe(struct i2c_client *client, const struct i2c_device_id *id) {const char *const shunt_res_prop ="shunt-resistor-micro-ohms" ; -const struct device_node *of_node = client->dev.of_node; -const struct of_device_id *of_id = -of_match_device (max9611_of_table, &client->dev);struct max9611_dev *max9611;struct iio_dev *indio_dev; +struct device *dev = &client->dev;unsigned int of_shunt;int ret;
@@ -528,15 +527,14 @@ static int max9611_probe(struct i2c_client *client,i2c_set_clientdata (client, indio_dev); max9611 =iio_priv (indio_dev); - max9611->dev = &client->dev; + max9611->dev = dev; max9611->i2c_client = client;mutex_init (&max9611->lock); - ret =of_property_read_u32 (of_node, shunt_res_prop, &of_shunt); + ret =device_property_read_u32 (dev, shunt_res_prop, &of_shunt);if (ret) { -dev_err (&client->dev, -"Missing %s property for %pOF node\n" , - shunt_res_prop, of_node); +dev_err (dev,"Missing %s property for %pfw node\n" , + shunt_res_prop,dev_fwnode (dev));return ret; } max9611->shunt_resistor_uohm = of_shunt;
@@ -545,13 +543,13 @@ static int max9611_probe(struct i2c_client *client,if (ret)return ret; - indio_dev->name = of_id->data; + indio_dev->name =device_get_match_data (dev); indio_dev->modes =INDIO_DIRECT_MODE ; indio_dev->info = &indio_info; indio_dev->channels = max9611_channels; indio_dev->num_channels =ARRAY_SIZE (max9611_channels); -return devm_iio_device_register (&client->dev, indio_dev); +return devm_iio_device_register (dev, indio_dev); }static struct i2c_driver max9611_driver = {
Signature · 1 line
2.34.1
Jonathan Cameron
maintainerPATCH 8/12 iio:adc:mcp3911: Switch to generic firmware properties.
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
This allows use of the driver with other types of firmware such as ACPI PRP0001 based probing.
Also part of a general attempt to remove direct use of of_ specific accessors from IIO.
Added an include for mod_devicetable.h whilst here to cover the struct of_device_id definition.
--- drivers/iio/adc/mcp3911.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/iio/adc/mcp3911.c +5 -3
@@ -10,6 +10,8 @@#include <linux/err.h> #include <linux/iio/iio.h> #include <linux/module.h> +#include <linux/mod_devicetable.h> +#include <linux/property.h> #include <linux/regulator/consumer.h> #include <linux/spi/spi.h>
@@ -200,12 +202,12 @@ static const struct iio_info mcp3911_info = { .write_raw = mcp3911_write_raw, }; -static int mcp3911_config (struct mcp3911 *adc,struct device_node *of_node) +static int mcp3911_config (struct mcp3911 *adc,struct device *dev) {u32 configreg;int ret; -of_property_read_u32 (of_node,"device-addr" , &adc->dev_addr); +device_property_read_u32 (dev,"device-addr" , &adc->dev_addr);if (adc->dev_addr >3 ) { dev_err(&adc->spi->dev, "invalid device address (%i). Must be in range 0-3.\n",
@@ -289,7 +291,7 @@ static int mcp3911_probe(struct spi_device *spi) } } - ret =mcp3911_config (adc, spi->dev.of_node); + ret =mcp3911_config (adc, &spi->dev);if (ret) goto clk_disable;
Signature · 1 line
2.34.1
Jonathan Cameron
maintainerPATCH 9/12 iio:adc:ti-adc12138: Switch to generic firmware properties.
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
This enables using the driver with other firmware types such as ACPI via PRP0001.
Also part of a general attempt to move IIO drivers over to generic properties to avoid opportunities for cut and paste.
--- drivers/iio/adc/ti-adc12138.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/iio/adc/ti-adc12138.c +3 -6
@@ -11,6 +11,7 @@#include <linux/interrupt.h> #include <linux/completion.h> #include <linux/clk.h> +#include <linux/property.h> #include <linux/spi/spi.h> #include <linux/iio/iio.h> #include <linux/iio/buffer.h>
@@ -430,8 +431,8 @@ static int adc12138_probe(struct spi_device *spi)return -EINVAL ; } - ret =of_property_read_u32 (spi->dev.of_node,"ti,acquisition-time" , - &adc->acquisition_time); + ret =device_property_read_u32 (&spi->dev,"ti,acquisition-time" , + &adc->acquisition_time);if (ret) adc->acquisition_time =10 ;
@@ -517,8 +518,6 @@ static int adc12138_remove(struct spi_device *spi)return 0 ; } -#ifdef CONFIG_OF -static const struct of_device_id adc12138_dt_ids[] = { { .compatible ="ti,adc12130" , }, { .compatible ="ti,adc12132" , },
@@ -527,8 +526,6 @@ static const struct of_device_id adc12138_dt_ids[] = { };MODULE_DEVICE_TABLE (of, adc12138_dt_ids); -#endif -static const struct spi_device_id adc12138_id[] = { {"adc12130" , adc12130 }, {"adc12132" , adc12132 },
Signature · 1 line
2.34.1
Jonathan Cameron
maintainerPATCH 10/12 iio:adc:envelope-detector: Switch from of headers to mod_devicetable.h
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
There is nothing directly using of specific interfces in this driver, so lets not include the headers.
--- drivers/iio/adc/envelope-detector.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/iio/adc/envelope-detector.c +1 -2
@@ -31,14 +31,13 @@#include <linux/err.h> #include <linux/kernel.h> #include <linux/module.h> +#include <linux/mod_devicetable.h> #include <linux/mutex.h> #include <linux/iio/consumer.h> #include <linux/iio/iio.h> #include <linux/iio/sysfs.h> #include <linux/interrupt.h> #include <linux/irq.h> -#include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/spinlock.h> #include <linux/workqueue.h>
Signature · 1 line
2.34.1
Re: [PATCH 10/12] iio:adc:envelope-detector: Switch from of headers to mod_devicetable.h
Quoted 3 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
There is nothing directly using of specific interfces in this driver,
interfaces
Quoted 4 lines
so lets not include the headers.
Signed-off-by Jonathan Cameron <[email protected]>Cc Peter Rosin <[email protected]>
Cheers,
Peter
Jonathan Cameron
maintainerPATCH 11/12 iio:adc:ti-ads124s08: Drop dependency on OF.
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
Nothing in this driver depends on OF firmware so drop the dependency and update the headers to remove the false impression such a dependency exists.
--- drivers/iio/adc/Kconfig | 2 +- drivers/iio/adc/ti-ads124s08.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/iio/adc/Kconfig +1 -1
@@ -1166,7 +1166,7 @@ config TI_ADS8688 config TI_ADS124S08 tristate "Texas Instruments ADS124S08" - depends on SPI && OF + depends on SPI help If you say yes here you get support for Texas Instruments ADS124S08 and ADS124S06 ADC chips
drivers/iio/adc/ti-ads124s08.c +1 -2
@@ -8,8 +8,7 @@#include <linux/device.h> #include <linux/kernel.h> #include <linux/module.h> -#include <linux/of.h> -#include <linux/of_gpio.h> +#include <linux/mod_devicetable.h> #include <linux/slab.h> #include <linux/sysfs.h>
Signature · 1 line
2.34.1
Jonathan Cameron
maintainerPATCH 12/12 iio:adc/dac:Kconfig: Update to drop OF dependencies.
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
We could probably drop a lot more of these, but for now this removes unnecessary restrictions on stand alone ADC devices.
--- drivers/iio/adc/Kconfig | 4 ++-- drivers/iio/dac/Kconfig | 1 - 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/iio/adc/Kconfig +2 -2
@@ -1146,7 +1146,7 @@ config TI_ADS7950 config TI_ADS8344 tristate "Texas Instruments ADS8344" - depends on SPI && OF + depends on SPI help If you say yes here you get support for Texas Instruments ADS8344 ADC chips
@@ -1156,7 +1156,7 @@ config TI_ADS8344 config TI_ADS8688 tristate "Texas Instruments ADS8688" - depends on SPI && OF + depends on SPI help If you say yes here you get support for Texas Instruments ADS8684 and and ADS8688 ADC chips
drivers/iio/dac/Kconfig +0 -1
@@ -329,7 +329,6 @@ config MAX517 config MAX5821 tristate "Maxim MAX5821 DAC driver" depends on I2C - depends on OF help Say yes here to build support for Maxim MAX5821 10 bits DAC.
Signature · 1 line
2.34.1