* [PATCH v2] iio: adc: nxp-sar-adc: use field_get() for EOC bit check [not found] <your-message-id> @ 2026-04-10 21:41 ` Piyush Patle 2026-04-11 14:23 ` Daniel Lezcano 0 siblings, 1 reply; 4+ messages in thread From: Piyush Patle @ 2026-04-10 21:41 UTC (permalink / raw) To: Jonathan Cameron, linux-iio Cc: David Lechner, Nuno Sá, Andy Shevchenko, Daniel Lezcano, Alexandru-Catalin Ionita, Felix Gu, linux-kernel Use field_get() here now that runtime-mask support exists, and drop the obsolete TODO. Since NXP_SAR_ADC_EOC_CH(c) is BIT(c), the resulting !-test is semantically identical. No functional change. Reviewed-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Piyush Patle <piyushpatle228@gmail.com> --- drivers/iio/adc/nxp-sar-adc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/iio/adc/nxp-sar-adc.c b/drivers/iio/adc/nxp-sar-adc.c index 58103bf16aff..d6c2a0d50bb4 100644 --- a/drivers/iio/adc/nxp-sar-adc.c +++ b/drivers/iio/adc/nxp-sar-adc.c @@ -316,11 +316,7 @@ static int nxp_sar_adc_read_data(struct nxp_sar_adc *info, unsigned int chan) ceocfr = readl(NXP_SAR_ADC_CEOCFR0(info->regs)); - /* - * FIELD_GET() can not be used here because EOC_CH is not constant. - * TODO: Switch to field_get() when it will be available. - */ - if (!(NXP_SAR_ADC_EOC_CH(chan) & ceocfr)) + if (!field_get(NXP_SAR_ADC_EOC_CH(chan), ceocfr)) return -EIO; cdr = readl(NXP_SAR_ADC_CDR(info->regs, chan)); -- 2.43.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] iio: adc: nxp-sar-adc: use field_get() for EOC bit check 2026-04-10 21:41 ` [PATCH v2] iio: adc: nxp-sar-adc: use field_get() for EOC bit check Piyush Patle @ 2026-04-11 14:23 ` Daniel Lezcano 2026-04-19 17:00 ` Piyush Patle 0 siblings, 1 reply; 4+ messages in thread From: Daniel Lezcano @ 2026-04-11 14:23 UTC (permalink / raw) To: Piyush Patle, Jonathan Cameron, linux-iio Cc: David Lechner, Nuno Sá, Andy Shevchenko, Daniel Lezcano, Alexandru-Catalin Ionita, Felix Gu, linux-kernel On 4/10/26 23:41, Piyush Patle wrote: > Use field_get() here now that runtime-mask support exists, and drop > the obsolete TODO. Since NXP_SAR_ADC_EOC_CH(c) is BIT(c), the > resulting !-test is semantically identical. > > No functional change. > > Reviewed-by: David Lechner <dlechner@baylibre.com> > Signed-off-by: Piyush Patle <piyushpatle228@gmail.com> Acked-by: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com> > --- > drivers/iio/adc/nxp-sar-adc.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/drivers/iio/adc/nxp-sar-adc.c b/drivers/iio/adc/nxp-sar-adc.c > index 58103bf16aff..d6c2a0d50bb4 100644 > --- a/drivers/iio/adc/nxp-sar-adc.c > +++ b/drivers/iio/adc/nxp-sar-adc.c > @@ -316,11 +316,7 @@ static int nxp_sar_adc_read_data(struct nxp_sar_adc *info, unsigned int chan) > > ceocfr = readl(NXP_SAR_ADC_CEOCFR0(info->regs)); > > - /* > - * FIELD_GET() can not be used here because EOC_CH is not constant. > - * TODO: Switch to field_get() when it will be available. > - */ > - if (!(NXP_SAR_ADC_EOC_CH(chan) & ceocfr)) > + if (!field_get(NXP_SAR_ADC_EOC_CH(chan), ceocfr)) > return -EIO; > > cdr = readl(NXP_SAR_ADC_CDR(info->regs, chan)); ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] iio: adc: nxp-sar-adc: use field_get() for EOC bit check 2026-04-11 14:23 ` Daniel Lezcano @ 2026-04-19 17:00 ` Piyush Patle 2026-04-20 13:10 ` Jonathan Cameron 0 siblings, 1 reply; 4+ messages in thread From: Piyush Patle @ 2026-04-19 17:00 UTC (permalink / raw) To: Jonathan Cameron Cc: linux-iio, David Lechner, Nuno Sá, Andy Shevchenko, Daniel Lezcano, Alexandru-Catalin Ionita, Felix Gu, linux-kernel On Sat, Apr 11, 2026 at 7:53 PM Daniel Lezcano <daniel.lezcano@oss.qualcomm.com> wrote: > > On 4/10/26 23:41, Piyush Patle wrote: > > Use field_get() here now that runtime-mask support exists, and drop > > the obsolete TODO. Since NXP_SAR_ADC_EOC_CH(c) is BIT(c), the > > resulting !-test is semantically identical. > > > > No functional change. > > > > Reviewed-by: David Lechner <dlechner@baylibre.com> > > Signed-off-by: Piyush Patle <piyushpatle228@gmail.com> > > Acked-by: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com> > > > --- > > drivers/iio/adc/nxp-sar-adc.c | 6 +----- > > 1 file changed, 1 insertion(+), 5 deletions(-) > > > > diff --git a/drivers/iio/adc/nxp-sar-adc.c b/drivers/iio/adc/nxp-sar-adc.c > > index 58103bf16aff..d6c2a0d50bb4 100644 > > --- a/drivers/iio/adc/nxp-sar-adc.c > > +++ b/drivers/iio/adc/nxp-sar-adc.c > > @@ -316,11 +316,7 @@ static int nxp_sar_adc_read_data(struct nxp_sar_adc *info, unsigned int chan) > > > > ceocfr = readl(NXP_SAR_ADC_CEOCFR0(info->regs)); > > > > - /* > > - * FIELD_GET() can not be used here because EOC_CH is not constant. > > - * TODO: Switch to field_get() when it will be available. > > - */ > > - if (!(NXP_SAR_ADC_EOC_CH(chan) & ceocfr)) > > + if (!field_get(NXP_SAR_ADC_EOC_CH(chan), ceocfr)) > > return -EIO; > > > > cdr = readl(NXP_SAR_ADC_CDR(info->regs, chan)); > Hi, Gentle ping on this patch. I’d appreciate any feedback whenever you get time, or let me know if I should resend/rework anything. Regards, Piyush ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] iio: adc: nxp-sar-adc: use field_get() for EOC bit check 2026-04-19 17:00 ` Piyush Patle @ 2026-04-20 13:10 ` Jonathan Cameron 0 siblings, 0 replies; 4+ messages in thread From: Jonathan Cameron @ 2026-04-20 13:10 UTC (permalink / raw) To: Piyush Patle Cc: linux-iio, David Lechner, Nuno Sá, Andy Shevchenko, Daniel Lezcano, Alexandru-Catalin Ionita, Felix Gu, linux-kernel On Sun, 19 Apr 2026 22:30:19 +0530 Piyush Patle <piyushpatle228@gmail.com> wrote: > On Sat, Apr 11, 2026 at 7:53 PM Daniel Lezcano > <daniel.lezcano@oss.qualcomm.com> wrote: > > > > On 4/10/26 23:41, Piyush Patle wrote: > > > Use field_get() here now that runtime-mask support exists, and drop > > > the obsolete TODO. Since NXP_SAR_ADC_EOC_CH(c) is BIT(c), the > > > resulting !-test is semantically identical. > > > > > > No functional change. > > > > > > Reviewed-by: David Lechner <dlechner@baylibre.com> > > > Signed-off-by: Piyush Patle <piyushpatle228@gmail.com> > > > > Acked-by: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com> Applied. Thanks, J > > > > > --- > > > drivers/iio/adc/nxp-sar-adc.c | 6 +----- > > > 1 file changed, 1 insertion(+), 5 deletions(-) > > > > > > diff --git a/drivers/iio/adc/nxp-sar-adc.c b/drivers/iio/adc/nxp-sar-adc.c > > > index 58103bf16aff..d6c2a0d50bb4 100644 > > > --- a/drivers/iio/adc/nxp-sar-adc.c > > > +++ b/drivers/iio/adc/nxp-sar-adc.c > > > @@ -316,11 +316,7 @@ static int nxp_sar_adc_read_data(struct nxp_sar_adc *info, unsigned int chan) > > > > > > ceocfr = readl(NXP_SAR_ADC_CEOCFR0(info->regs)); > > > > > > - /* > > > - * FIELD_GET() can not be used here because EOC_CH is not constant. > > > - * TODO: Switch to field_get() when it will be available. > > > - */ > > > - if (!(NXP_SAR_ADC_EOC_CH(chan) & ceocfr)) > > > + if (!field_get(NXP_SAR_ADC_EOC_CH(chan), ceocfr)) > > > return -EIO; > > > > > > cdr = readl(NXP_SAR_ADC_CDR(info->regs, chan)); > > > > Hi, > Gentle ping on this patch. > > I’d appreciate any feedback whenever you get time, or let me know if I > should resend/rework anything. > > Regards, > Piyush ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-04-20 13:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <your-message-id>
2026-04-10 21:41 ` [PATCH v2] iio: adc: nxp-sar-adc: use field_get() for EOC bit check Piyush Patle
2026-04-11 14:23 ` Daniel Lezcano
2026-04-19 17:00 ` Piyush Patle
2026-04-20 13:10 ` Jonathan Cameron
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox