[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZAXoeCHcrFdf3rC/@smile.fi.intel.com>
Date: Mon, 6 Mar 2023 15:19:52 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Mike Looijmans <mike.looijmans@...ic.nl>
Cc: Jonathan Cameron <jic23@...nel.org>, devicetree@...r.kernel.org,
linux-iio@...r.kernel.org,
Caleb Connolly <caleb.connolly@...aro.org>,
ChiYuan Huang <cy_huang@...htek.com>,
ChiaEn Wu <chiaen_wu@...htek.com>,
Cosmin Tanislav <demonsingur@...il.com>,
Ibrahim Tilki <Ibrahim.Tilki@...log.com>,
Lars-Peter Clausen <lars@...afoo.de>,
Ramona Bolboaca <ramona.bolboaca@...log.com>,
William Breathitt Gray <william.gray@...aro.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/2] iio: adc: Add TI ADS1100 and ADS1000
On Mon, Mar 06, 2023 at 01:56:15PM +0100, Mike Looijmans wrote:
> On 06-03-2023 13:11, Andy Shevchenko wrote:
> > On Sat, Mar 04, 2023 at 05:57:51PM +0000, Jonathan Cameron wrote:
> > > On Tue, 28 Feb 2023 07:31:51 +0100
> > > Mike Looijmans <mike.looijmans@...ic.nl> wrote:
...
> So I propose this code:
>
> if (gain <= 0 || gain > 8)
Maybe BIT(0) and BIT(3) will be more explicit.
Otherwise I'm fine with it.
> return -EINVAL;
>
> regval = ffs(gain) - 1;
> ads1100_set_config_bits(data, ADS1100_PGA_MASK, regval);
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists