> Looking at kernel_restart_prepare(), we set SYSTEM_REBOOT in normal
> context, specifically it just did a blocking notifier call.
>
> So no, you'll have to combine the two.
I see now. Combining the two is still readable, but I'll abstract this
away into some 'i2c_is_atomic_xfer_mode()' helper
> > "This matches the use cases for atomic I2C transfers I have seen so far:
> > very late communication (mostly to a PMIC) to powerdown or reboot the
> > system."
>
> Ah, sorry, I missed that.
>
> > And yes, I would never recommend a HW design to use I2C for shutting
> > down/rebooting. But suc
On Wed, Mar 27, 2019 at 10:12:56PM +0100, Wolfram Sang wrote:
> Commit cea443a81c9c ("i2c: Support i2c_transfer in atomic contexts")
> added in_atomic() to the I2C core. However, the use of in_atomic()
> outside of core kernel code is discouraged and was already[1] when this
> code was added in ear
3 matches
Mail list logo