summaryrefslogtreecommitdiff
path: root/drivers/gpio/sx150x.c
AgeCommit message (Collapse)AuthorFilesLines
2011-03-25gpio: Fold irq_set_chip/irq_set_handler to irq_set_chip_and_handlerThomas Gleixner1-2/+1
Converted with coccinelle. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Grant Likely <grant.likely@secretlab.ca> LKML-Reference: <20110324212509.118888535@linutronix.de>
2011-03-25gpio: Cleanup genirq namespaceThomas Gleixner1-5/+5
Converted with coccinelle. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Grant Likely <grant.likely@secretlab.ca> LKML-Reference: <20110324212509.025730689@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-02-22gpio/sx150x: Do not access I2C from mask/unmask functionsThomas Gleixner1-17/+37
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: Thomas 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: Grant Likely <grant.likely@secretlab.ca>
2011-01-13gpio: sx150x: irq_data conversionLennert Buytenhek1-23/+23
Converts irq_chips and flow handlers over to the new struct irq_data based irq_chip functions. Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Cc: Gregory Bean <gbean@codeaurora.org> Tested-by: Rohit Vaswani <rvaswani@codeaurora.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-09gpio: sx150x: correct and refine reset-on-probe behaviorGregory Bean1-5/+21
Replace the arbitrary software-reset call from the device-probe method, because: - It is defective. To work correctly, it should be two byte writes, not a single word write. As it stands, it does nothing. - Some devices with sx150x expanders installed have their NRESET pins ganged on the same line, so resetting one causes the others to reset - not a nice thing to do arbitrarily! - The probe, usually taking place at boot, implies a recent hard-reset, so a software reset at this point is just a waste of energy anyway. Therefore, make it optional, defaulting to off, as this will match the common case of probing at powerup and also matches the current broken no-op behavior. Signed-off-by: Gregory Bean <gbean@codeaurora.org> Reviewed-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11gpio: sx150x: add Semtech I2C sx150x gpio expander driverGregory Bean1-0/+645
Add support for Semtech SX150-series I2C GPIO expanders. Compatible models include: 8 bits: sx1508q 16 bits: sx1509q Signed-off-by: Gregory Bean <gbean@codeaurora.org> Cc: David Brownell <david-b@pacbell.net> Cc: Jean Delvare <khali@linux-fr.org> Cc: Trilok Soni <tsoni@codeaurora.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>