Hi Uli, On Mon, Sep 28, 2020 at 6:09 PM Ulrich Hecht <uli+renesas@xxxxxxxx> wrote: > Implements atomic transfers to fix reboot/shutdown on r8a7790 Lager and > similar boards. > > Signed-off-by: Ulrich Hecht <uli+renesas@xxxxxxxx> > Tested-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx> > Tested-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> > --- > > Hi! > > Another minor change in the atomic code path in start_ch() as suggested by > Geert. All power management-related issues have been decided to be solved > outside this driver, so we should be done here. > > CU > Uli > > > Changes since v3: > - cut atomic_xfer code path short in start_ch() Thanks for the update! > --- a/drivers/i2c/busses/i2c-sh_mobile.c > +++ b/drivers/i2c/busses/i2c-sh_mobile.c > +static int sh_mobile_i2c_xfer_atomic(struct i2c_adapter *adapter, > + struct i2c_msg *msgs, > + int num) > +{ > + struct sh_mobile_i2c_data *pd = i2c_get_adapdata(adapter); To make sure external conditions are satisfied, and we never deadlock, as discussed in v3? if (pd->dev->power.is_suspended) return -EPERM; /* any other suitable error code? */ > + > + pd->atomic_xfer = true; > + return sh_mobile_xfer(pd, msgs, num); > +} Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds