Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 0ff56cd8 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Grant Likely
Browse files

gpio/sx150x: Do not access I2C from mask/unmask functions



irq_chip->irq_mask/unmask are called with interrupts disabled and
irq_desc->lock held. So we cannot access i2c from this context. That's
what irq_bus_sync_unlock() is for.

Store the masked information in the chip data structure and update the
i2c bus from the irq_bus_sync_unlock() callback.

This does not need a while(pending) loop because the update to this is
always serialized via the bus lock, so we never have more than one pin
update pending.

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Gregory Bean <gbean@codeaurora.org>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Lennert Buytenhek <buytenh@secretlab.ca>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 0b782531
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment