Re: [PATCH v3 1/2] iio: adc: ti-ads112c14: add support for I2C CRC8
From: Andy Shevchenko
Date: Mon Aug 17 2026 - 03:47:30 EST
On Sat, Aug 15, 2026 at 02:35:08AM +0100, Jonathan Cameron wrote:
> On Fri, 7 Aug 2026 16:18:40 -0500
> David Lechner <dlechner@xxxxxxxxxxxx> 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