aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-pca953x.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2011-11-21gpio: pca953x: Staticise pca953x_get_altdata()Mark Brown1-2/+2
It's not used outside of the driver so doesn't need to be exported, and sparse notices this and complains about it. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-15Merge branch 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds1-7/+4
* 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6: gpio: pca953x: propagate the errno from the chip_init functions gpio: pca953x: remove unneeded check for chip type gpio/omap: check return value from irq_alloc_generic_chip gpio/omap: replace MOD_REG_BIT macro with static inline
2011-10-29gpio: pca953x: propagate the errno from the chip_init functionsWolfram Sang1-6/+5
Initializing the chips may return with an error, but this error gets dropped in probe(). Propagate this further to the driver core. Also, simplify returning the error in one of the init functions. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-10-29gpio: pca953x: remove unneeded check for chip typeWolfram Sang1-3/+1
We can assume our own device_id table is correct, so remove checking if the chip type is valid. (The check was bogus anyway: If it found an invalid entry, it returned with 0!) This is in preparation for further cleanups. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-10-13gpio-pca953x: fix gpio_baseHartmut Knaack1-0/+1
gpio_base was set to 0 if no system platform data or open firmware platform data was provided. This led to conflicts, if any other gpiochip with a gpiobase of 0 was instantiated already. Setting it to -1 will automatically use the first one available. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-16gpio/pca953x: Deprecate meaningless device-tree bindingsDavid Jander1-2/+9
The property 'polarity' is handled by the GPIO core, and the 'gpio-base' should be assigned automatically. It is meaningless in the device-tree, since GPIO's are identified by the "chip-name"/offset pair. This way, the whole pca953x_get_alt_pdata() can hopefully soon go away. We still need to check whether we really want GPIO-interrupt functionality by simply looking if the I2C node has an interrupts property defined, since this property is not used for anything else. Signed-off-by: David Jander <david@protonic.nl> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-16gpio/pca953x: Remove dynamic platform data pointerDavid Jander1-49/+28
In the case that we obtain device-tree data to fill in platform_data, the new platform data struct was dynamically allocated, but the pointer to it was not used everywhere it should. It seems easier to fix this issue by removing the dynamic allocation altogether since its data is only used during driver probing. Signed-off-by: David Jander <david@protonic.nl> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-16gpio/pca953x: Fix IRQ support.David Jander1-1/+3
It seems that in the normal case, IRQ_NOREQUEST needs to be explicitly cleared, otherwise claiming the interrupt fails. In the case of sparse interrupts, the descriptor needs to be allocated first. Signed-off-by: David Jander <david@protonic.nl> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-08gpio/pca953x: Fix warning of enabled interrupts in handlerDavid Jander1-3/+3
When using nested threaded irqs, use handle_nested_irq(). This function does not call the chip handler, so no handler is set. Signed-off-by: David Jander <david@protonic.nl> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-08gpio/pca953x: Interrupt pin is active-lowDavid Jander1-1/+1
The interrupt pin of the PCA953x is active low, and on the rising edge no interrupt should be produced. Signed-off-by: David Jander <david@protonic.nl> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-08gpio/pca953x: Fix IRQ support.David Jander1-1/+5
It seems that in the normal case, IRQ_NOREQUEST needs to be explicitly cleared, otherwise claiming the interrupt fails. In the case of sparse interrupts, the descriptor needs to be allocated first. Signed-off-by: David Jander <david@protonic.nl> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-06gpio: reorganize driversGrant Likely1-0/+768
Sort the gpio makefile and enforce the naming convention gpio-*.c for gpio drivers. v2: cleaned up filenames in Kconfig and comment blocks v3: fixup use of BASIC_MMIO to GENERIC_GPIO for mxc Signed-off-by: Grant Likely <grant.likely@secretlab.ca>