aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-generic.c
AgeCommit message (Collapse)AuthorFilesLines
2015-07-27gpio: generic: support input-only chipsRabin Vincent1-3/+20
Allow chips to indicates that they are input-only and thus cannot set the output value. This will be used by the gpio-etraxfs driver. Signed-off-by: Rabin Vincent <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2015-07-16gpio: generic: add get_direction supportPhilipp Zabel1-0/+18
Allow to determine the current direction configuration by reading back from the direction register. Signed-off-by: Philipp Zabel <[email protected]> Acked-by: Alexandre Courbot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2015-05-11gpio: gpio-generic: add flag to read out output value from reg_setVladimir Zapolskiy1-3/+19
The change introduces BGPIOF_READ_OUTPUT_REG_SET flag for gpio-generic GPIO chip implementation, which allows to get correct configured value from reg_set register, input value is still get from reg_dat. Signed-off-by: Vladimir Zapolskiy <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2015-01-19gpio-generic: add bgpio_set_multiple functionsRojhalat Ibrahim1-0/+76
Add set_multiple functions to the generic driver for memory-mapped GPIO controllers to improve performance when setting multiple outputs simultaneously. Signed-off-by: Rojhalat Ibrahim <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-07-22gpio: remove all usage of gpio_remove retval in driver/gpioabdoulaye berthe1-1/+2
Signed-off-by: abdoulaye berthe <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-05-23gpio: generic: add request function pointerAnthony Fee1-0/+9
gpiolib will require all gpio drivers to expicitly set the request function pointer in the future. To encourage gpio driver developers to adhere to this standard gpio-generic.c now sets this function pointer. Signed-off-by: Anthony Fee <[email protected]> Acked-by: Alexandre Courbot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-18gpio: generic: Use platform_device_id->driver_data field for driver flagsAlexander Shiyan1-7/+9
Signed-off-by: Alexander Shiyan <[email protected]> Reviewed-by: Alexandre Courbot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-02-06gpio: generic: clamp retured value to [0,1]Linus Walleij1-1/+1
The generic GPIO would return 0 for low generic GPIO, and something != 0 for high GPIO. Let's make this sane by clamping the returned value to [0,1]. Reported-by: Evgeny Boger <[email protected]> Reviewed-by: Alexandre Courbot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-02-06gpio: generic: Add label to platform dataPawel Moll1-0/+2
When registering more than one platform device, it is useful to set the gpio chip label in the platform data. Signed-off-by: Pawel Moll <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-04-11GPIO: gpio-generic: remove kfree() from bgpio_remove callAlexander Shiyan1-5/+1
Memory for basic-mmio-gpio driver is allocated by the driver using it, whether it's the generic GPIO driver itself or another driver. In either case, the owner shall allocate and free the struct bgpio_chip it is using, preferably using a managed resource. Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-04-10gpio: gpio-generic: Add 16 and 32 bit big endian byte order supportAndreas Larsson1-9/+47
There is no general support for 64-bit big endian accesses, so that is left unsupported. Signed-off-by: Andreas Larsson <[email protected]> Acked-by: Anton Vorontsov <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2012-11-28gpio: remove use of __devexitBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <[email protected]> Cc: Grant Likely <[email protected]> Acked-by: Linus Walleij <[email protected]> Cc: Peter Tyser <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-28gpio: remove use of __devinitBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <[email protected]> Cc: Grant Likely <[email protected]> Cc: Peter Tyser <[email protected]> Cc: Santosh Shilimkar <[email protected]> Cc: Kevin Hilman <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-28gpio: remove use of __devexit_pBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <[email protected]> Cc: Grant Likely <[email protected]> Cc: Peter Tyser <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-19gpio/generic: initialize basic_mmio_gpio shadow variables properlyShawn Guo1-5/+11
It fixes the issue in gpio-generic that commit fb14921 (gpio/mxc: add missing initialization of basic_mmio_gpio shadow variables) manged to fix in gpio-mxc driver, so that other platform specific drivers do not suffer from the same problem over and over again. Changes since v1: * Turn the last parameter of bgpio_init() "bool big_endian" into "unsigned long flags" and give those really quirky hardwares a chance to tell that reg_set and reg_dir are unreadable. Signed-off-by: Shawn Guo <[email protected]> [grant.likely: Fix big-endian usage to explicitly set BBGPIOF_BIG_ENDIAN] Signed-off-by: Grant Likely <[email protected]>
2012-01-02gpio: Convert GPIO drivers to module_platform_driverMark Brown1-11/+1
Where appropriate factor out some boilerplate code for platform device registration into module_platform_driver. Drivers that don't use the standard module_init initcall haven't been converted. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2011-09-14drivers/gpio/gpio-generic.c: fix build errorsRussell King1-10/+5
Building a kernel with hotplug disabled results in a link failure: `bgpio_remove' referenced in section `___ksymtab_gpl+bgpio_remove' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o This is because of bgpio_remove() is exported. It is illegal to export symbols which are discarded either at link time or as part of an init/exit section. Fix this by dropping the __devexit attributation from bgpio_remove(). Also drop the __devinit attributation from bgpio_init(). Signed-off-by: Russell King <[email protected]> Cc: Grant Likely <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-06-06gpio: reorganize driversGrant Likely1-0/+548
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 <[email protected]>