On Mon, Jul 11, 2022 at 2:38 PM Nuno Sá <nuno.sa@xxxxxxxxxx> wrote: > > First version of the series can be found here: > > https://lore.kernel.org/linux-iio/20220610084545.547700-1-nuno.sa@xxxxxxxxxx/ I'm under the impression that I gave tags for some of these patches when they were the part of the bigger series. Am I wrong? In any case for patch 6-14, Reviewed-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx> > v2 changes: > > [1/15] > * Fix typo and added more description in the commit message. > > [3/15] > * Remove superfluous code; > * Commit message spell fixes and added more details; > * Improved error handling (this is the most significant change in this > version. More details on the commit message). > > [4/15] > * Drop the 'ugly' parent_lookup flag. With the new error handling, > we can use -ENODEV to infer if we should proceed or not with the > lookup. > > [5/15]: > * Moved some local declarations up so long lines first; > * Use 'bus_find_device_by_fwnode()'; > * Proper ordering in includes. > * Adapted error handling in '__fwnode_iio_channel_get_by_name()' taking > ACPI into account and when 'name' is given but index < 0. It seems that > ACPI code can actually return -ENOENT with index < 0 for which case we > should continue the search. Not sure if a check in ACPI ('if (index < 0) > return -EINVAL;) like is done in OF would make sense... > > [12/15]: > * Use 'device_property_count_u64()' to get the number of diff channels. > So no need for 'magic' divisions by 2 (no idea why I haven't done like > this in the first place). > > [15/15] > * Fix wrong conversion of 'if (ptr != NULL)' to 'if (!ptr)'. > > Special note for patch 3/15 where -ENODEV is still used despite some talks > about using -ENOENT and hence, be more in line with firmware code. The > reason I kept it was to be consistent with the rest of the file. I'd say > that if we want to move to -ENOENT we should do it in a separate patch > and for the complete file. > > Nuno Sá (15): > iio: inkern: only release the device node when done with it > iio: inkern: fix return value in devm_of_iio_channel_get_by_name() > iio: inkern: only return error codes in iio_channel_get_*() APIs > iio: inkern: split of_iio_channel_get_by_name() > iio: inkern: move to fwnode properties > thermal: qcom: qcom-spmi-adc-tm5: convert to IIO fwnode API > iio: adc: ingenic-adc: convert to IIO fwnode interface > iio: adc: ab8500-gpadc: convert to device properties > iio: adc: at91-sama5d2_adc: convert to device properties > iio: adc: qcom-pm8xxx-xoadc: convert to device properties > iio: adc: qcom-spmi-vadc: convert to device properties > iio: adc: qcom-spmi-adc5: convert to device properties > iio: adc: stm32-adc: convert to device properties > iio: inkern: remove OF dependencies > iio: inkern: fix coding style warnings > > drivers/iio/adc/ab8500-gpadc.c | 27 +-- > drivers/iio/adc/at91-sama5d2_adc.c | 30 +-- > drivers/iio/adc/ingenic-adc.c | 8 +- > drivers/iio/adc/qcom-pm8xxx-xoadc.c | 58 +++-- > drivers/iio/adc/qcom-spmi-adc5.c | 63 +++--- > drivers/iio/adc/qcom-spmi-vadc.c | 44 ++-- > drivers/iio/adc/stm32-adc.c | 121 +++++----- > drivers/iio/inkern.c | 271 +++++++++++++---------- > drivers/thermal/qcom/qcom-spmi-adc-tm5.c | 3 +- > include/linux/iio/consumer.h | 28 +-- > include/linux/iio/iio.h | 8 +- > 11 files changed, 347 insertions(+), 314 deletions(-) > > -- > 2.37.0 > -- With Best Regards, Andy Shevchenko