summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNuno Sá <nuno.sa@analog.com>2022-07-15 14:28:55 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-08-15 23:29:59 +0200
commit9ac075972bd25c83a922d3b9548cbe952248bd8f (patch)
treedb36bd365ca7e71993cbbc127b7be75deaef607a
parentthermal: qcom: qcom-spmi-adc-tm5: convert to IIO fwnode API (diff)
downloadlinux-9ac075972bd25c83a922d3b9548cbe952248bd8f.tar.xz
linux-9ac075972bd25c83a922d3b9548cbe952248bd8f.zip
iio: adc: ingenic-adc: convert to IIO fwnode interface
Move from 'of_xlate()' to 'fwnode_xlate()'. The end goal is to completely drop OF from the IIO inkernel interface. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220715122903.332535-8-nuno.sa@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r--drivers/iio/adc/ingenic-adc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/iio/adc/ingenic-adc.c b/drivers/iio/adc/ingenic-adc.c
index bf5c03c34f84..9e08f3abeea6 100644
--- a/drivers/iio/adc/ingenic-adc.c
+++ b/drivers/iio/adc/ingenic-adc.c
@@ -719,12 +719,12 @@ static int ingenic_adc_read_raw(struct iio_dev *iio_dev,
}
}
-static int ingenic_adc_of_xlate(struct iio_dev *iio_dev,
- const struct of_phandle_args *iiospec)
+static int ingenic_adc_fwnode_xlate(struct iio_dev *iio_dev,
+ const struct fwnode_reference_args *iiospec)
{
int i;
- if (!iiospec->args_count)
+ if (!iiospec->nargs)
return -EINVAL;
for (i = 0; i < iio_dev->num_channels; ++i)
@@ -743,7 +743,7 @@ static const struct iio_info ingenic_adc_info = {
.write_raw = ingenic_adc_write_raw,
.read_raw = ingenic_adc_read_raw,
.read_avail = ingenic_adc_read_avail,
- .of_xlate = ingenic_adc_of_xlate,
+ .fwnode_xlate = ingenic_adc_fwnode_xlate,
};
static int ingenic_adc_buffer_enable(struct iio_dev *iio_dev)