Re: [PATCH v3 1/2] iio: adc: ti-ads112c14: add support for I2C CRC8

Andy Shevchenko <[email protected]>
Newsgroups org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel
Organization Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo
Message-ID <[email protected]>
On Sat, Aug 15, 2026 at 02:35:08AM +0100, Jonathan Cameron wrote:
> On Fri, 7 Aug 2026 16:18:40 -0500
> David Lechner <[email protected]> wrote:
> > On 8/6/26 8:08 PM, Andy Shevchenko wrote:
> > > On Mon, Jul 27, 2026 at 09:09:50AM -0500, David Lechner (TI) wrote:  

...

> > >> +static int ads112c14_i2c_add_driver(struct i2c_driver *driver)
> > >> +{
> > >> +	crc8_populate_msb(ads112c14_crc8_table, ADS112C14_I2C_CRC8_POLYNOMIAL);
> > >> +
> > >> +	return i2c_add_driver(driver);
> > >> +}
> > >> +
> > >>  static struct i2c_driver ads112c14_driver = {
> > >>  	.driver = {
> > >>  		.name = "ads112c14",

> > >>  	.probe = ads112c14_probe,
> > >>  	.id_table = ads112c14_id,
> > >>  };
> > >> -module_i2c_driver(ads112c14_driver);
> > >> +module_driver(ads112c14_driver, ads112c14_i2c_add_driver, i2c_del_driver);
> > > 
> > > This is not needed if you call crc8_populate_msb() from the probe using
> > > DO_ONCE_SLEEPABLE().
> > 
> > Good idea, but this series got picked up already.
> > 
> Follow up is fine.  DO_ONCE_SLEEPABLE() is a new one to me, and indeed looks rather
> useful for this sort of thing.

But please, double check that _SLEEPABLE() may be used there. In 8250
for some reason (and I don't know why, perhaps each of the DO_ONCE()
has to be commented) I used non-sleepable variant.

-- 
With Best Regards,
Andy Shevchenko
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.