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>
This commit is contained in:
parent
17fe12a2fe
commit
9ac075972b
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user