summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-pca953x.c
Commit message (Collapse)AuthorAgeFilesLines
* gpio: pca953x: Staticise pca953x_get_altdata()Mark Brown2011-11-211-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>
* Merge branch 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds2011-11-151-7/+4Star
|\ | | | | | | | | | | | | | | * '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
| * gpio: pca953x: propagate the errno from the chip_init functionsWolfram Sang2011-10-291-6/+5Star
| | | | | | | | | | | | | | | | | | | | 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>
| * gpio: pca953x: remove unneeded check for chip typeWolfram Sang2011-10-291-3/+1Star
| | | | | | | | | | | | | | | | | | | | | | 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>
* | gpio-pca953x: fix gpio_baseHartmut Knaack2011-10-131-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>
* gpio/pca953x: Deprecate meaningless device-tree bindingsDavid Jander2011-06-161-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>
* gpio/pca953x: Remove dynamic platform data pointerDavid Jander2011-06-161-49/+28Star
| | | | | | | | | | | 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>
* gpio/pca953x: Fix IRQ support.David Jander2011-06-161-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>
* gpio/pca953x: Fix warning of enabled interrupts in handlerDavid Jander2011-06-081-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>
* gpio/pca953x: Interrupt pin is active-lowDavid Jander2011-06-081-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>
* gpio/pca953x: Fix IRQ support.David Jander2011-06-081-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>
* gpio: reorganize driversGrant Likely2011-06-061-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>