how to perform i2c transaction with disabled irq?
Greg KH
greg at kroah.com
Thu Apr 30 07:20:47 EDT 2020
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 implemented?
> 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
More information about the Kernelnewbies
mailing list