Message ID | 20220615145357.2370044-2-sravanhome@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | Add support for mp2733 battery charger | expand |
On Wed, 15 Jun 2022 16:53:52 +0200 Saravanan Sekar <sravanhome@gmail.com> wrote: > Input voltage channel enum is compared against iio address instead > of the channel. > > Fixes: 7abd9fb64682 ("iio: adc: mp2629: Add support for mp2629 ADC driver") > Signed-off-by: Saravanan Sekar <sravanhome@gmail.com> > Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> So how do you want to handle this? If I take it as a separate fix it will take a while to get upstream so that the later part of this series can be applied on top of it. If the fix isn't super urgent, then perhaps we just queue it up with the rest of the series and Lee picks up through MFD? On basis we might go that way. Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Also, this probably wants a stable tag. Thanks, Jonathan > --- > drivers/iio/adc/mp2629_adc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iio/adc/mp2629_adc.c b/drivers/iio/adc/mp2629_adc.c > index aca084f1e78a..e7fbfe92e884 100644 > --- a/drivers/iio/adc/mp2629_adc.c > +++ b/drivers/iio/adc/mp2629_adc.c > @@ -73,7 +73,7 @@ static int mp2629_read_raw(struct iio_dev *indio_dev, > if (ret) > return ret; > > - if (chan->address == MP2629_INPUT_VOLT) > + if (chan->channel == MP2629_INPUT_VOLT) > rval &= GENMASK(6, 0); > *val = rval; > return IIO_VAL_INT;
On 18/06/22 18:23, Jonathan Cameron wrote: Hello Jonathan, > On Wed, 15 Jun 2022 16:53:52 +0200 > Saravanan Sekar <sravanhome@gmail.com> wrote: > >> Input voltage channel enum is compared against iio address instead >> of the channel. >> >> Fixes: 7abd9fb64682 ("iio: adc: mp2629: Add support for mp2629 ADC driver") >> Signed-off-by: Saravanan Sekar <sravanhome@gmail.com> >> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> > > So how do you want to handle this? If I take it as a separate fix it will > take a while to get upstream so that the later part of this series can be > applied on top of it. > > If the fix isn't super urgent, then perhaps we just queue it up with the > rest of the series and Lee picks up through MFD? > Thanks for the review. It is not urgent to integrate now, may wait for Lee to take along with the series. > On basis we might go that way. > > Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > Also, this probably wants a stable tag. > > Thanks, > > Jonathan > >> --- >> drivers/iio/adc/mp2629_adc.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/iio/adc/mp2629_adc.c b/drivers/iio/adc/mp2629_adc.c >> index aca084f1e78a..e7fbfe92e884 100644 >> --- a/drivers/iio/adc/mp2629_adc.c >> +++ b/drivers/iio/adc/mp2629_adc.c >> @@ -73,7 +73,7 @@ static int mp2629_read_raw(struct iio_dev *indio_dev, >> if (ret) >> return ret; >> >> - if (chan->address == MP2629_INPUT_VOLT) >> + if (chan->channel == MP2629_INPUT_VOLT) >> rval &= GENMASK(6, 0); >> *val = rval; >> return IIO_VAL_INT; > Thanks, Saravanan
diff --git a/drivers/iio/adc/mp2629_adc.c b/drivers/iio/adc/mp2629_adc.c index aca084f1e78a..e7fbfe92e884 100644 --- a/drivers/iio/adc/mp2629_adc.c +++ b/drivers/iio/adc/mp2629_adc.c @@ -73,7 +73,7 @@ static int mp2629_read_raw(struct iio_dev *indio_dev, if (ret) return ret; - if (chan->address == MP2629_INPUT_VOLT) + if (chan->channel == MP2629_INPUT_VOLT) rval &= GENMASK(6, 0); *val = rval; return IIO_VAL_INT;