Messages in this thread | | | Subject | Re: [PATCH V5 5/5] iio: adc: Clean up ADC code common to PMIC5 and PMIC7 | From | Jishnu Prakash <> | Date | Thu, 28 May 2020 22:19:01 +0530 |
| |
Hi Andy,
On 5/22/2020 9:11 PM, Andy Shevchenko wrote: > On Fri, May 22, 2020 at 5:25 PM Jishnu Prakash <jprakash@codeaurora.org> wrote: >> This commit includes the following changes: >> >> Add a common function used for read_raw callback for both PMIC5 >> and PMIC7 ADCs. >> >> Add exit function for ADC. >> >> Add info_property under adc_data to more efficiently distinguish >> PMIC5 and PMIC7 ADCs. > ... > >> - if (of_device_is_compatible(node, "qcom,spmi-adc7")) >> - indio_dev->info = &adc7_info; >> - else >> - indio_dev->info = &adc5_info; >> + platform_set_drvdata(pdev, adc); > Ping-pong style of series. Can we convert to .info before we introduce > above check for compatibility? Yes, I'll add the .info property in a different patch before adding the PMIC7 support, that way it can be used directly instead of the above check being removed. > >
| |