how to perform i2c transaction with disabled irq?
Tomek The Messenger
tomekthemessenger at gmail.com
Thu Apr 30 10:13:34 EDT 2020
They are afraid that some peripheral device will report interrupt and after
board reset the peripheral device will be in some transient state if
handling of interrupt from peripheral device will be somewhere in the
middle interrupted by board reset. However in this case this is probably
uboot task to initialize peripheral devices from the beginning, switch them
and release from reset. Or another way is to shutdown peripheral devices
before reset, disable interrupts in their internal registers - at least
when /sbin/reboot is executed we see that before reset shutdown procedure
On Thu, Apr 30, 2020 at 1:20 PM Greg KH <greg at kroah.com> wrote:
> On Thu, Apr 30, 2020 at 01:11:06PM +0200, Tomek The Messenger wrote:
> > Hi
> > If I don't have disabled irqs I can use API i2c_smbus_write_byte in order
> > to perform i2c transaction.
> > But how to make i2c transaction if I have disabled irq? Is any built-in
> > function which lets such operation, where there is some polling
> > The background is that I do i2c transaction in restart handler (some i2c
> > transaction to hot swap controller) in order to reset board. And linux
> > before entering restart handler list disable interrupts. There is a
> > function to enable back interrupts but in company in which I am working
> > engineers reviewed it and said "it is not allowed, restart must be
> > performed when interrupts are disabled".
> Ask the engineers how you are supposed to use an interrupt driven device
> with interrupts disabled.
> good luck!
> greg k-h
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Kernelnewbies