summaryrefslogtreecommitdiff
path: root/drivers/gpio
AgeCommit message (Collapse)Author
2012-10-08GPIO: pca953x: fix error reportingLaurence Withers
Use the standard CMD_RET_* constants to clearly report errors from the pca953x command. In addition, print error messages when I2C communication fails. Signed-off-by: Laurence Withers <lwithers@guralp.com>
2012-10-08GPIO: pca953x: fix spelling in helpLaurence Withers
Signed-off-by: Laurence Withers <lwithers@guralp.com>
2012-10-03ARM : Add GPIO Driver and IOMUX definition for S3C2440Gabriel Huau
It's now possible to use the gpio driver interface for s3c2440. This patch add iomux definitions too. Signed-off-by: Gabriel Huau <contact@huau-gabriel.fr>
2012-09-10Tegra: Change Tegra20 to Tegra in common code, prep for T30Tom Warren
Convert TEGRA20_ defines to either TEGRA_ or NV_PA_ where appropriate. Convert tegra20_ source file and function names to tegra_, also. Upcoming Tegra30 port will use common code/defines/names where possible. Signed-off-by: Tom Warren <twarren@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com>
2012-09-01gpio: add gpio api support to mx27 (v4)trem
The gpio api has been tested on an armadeus apf27. Signed-off-by: Philippe Reynes <tremyfr@yahoo.fr> Acked-by: Stefano Babic <sbabic@denx.de>
2012-09-01mxc: Make gpio_get_value() use PSRBenoît Thébaudeau
gpio_get_value() should use PSR like Linux, not DR, because DR does not always reflect the pin state, while PSR does. This is especially useful to detect a short circuit on a GPIO pin configured as output, or to read the level of a pin controlled by a non-GPIO IOMUX function. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Stefano Babic <sbabic@denx.de> Acked-by: Stefano Babic <sbabic@denx.de>
2012-09-01tegra20: rename tegra2 -> tegra20Allen Martin
This is make naming consistent with the kernel and devicetree and in preparation of pulling out the common tegra20 code. Signed-off-by: Allen Martin <amartin@nvidia.com> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Tested-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Tom Warren <twarren@nvidia.com>
2012-09-01ARM: add basic support for the Broadcom BCM2835 SoCStephen Warren
This SoC is used in the Raspberry Pi, for example. For more details, see: http://www.broadcom.com/products/BCM2835 http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf. Initial support is enough to boot to a serial console, execute a minimal set of U-Boot commands, download data over a serial port, and boot a Linux kernel. No storage or network drivers are implemented. GPIO driver originally by Vikram Narayanan <vikram186@gmail.com> with many fixes from myself. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
2012-09-01snowball: Add support for ux500 based snowball boardMathieu J. Poirier
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: John Rigby <john.rigby@linaro.org> Acked-by: Tom Rini <trini@ti.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Conflicts: drivers/gpio/Makefile
2012-09-01mxs: prefix register acessor macros with 'mxs' prefixOtavio Salvador
As the register accessing mode is the same for all i.MXS SoCs we ought to use 'mxs' prefix intead of 'mx28'. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2012-09-01dm: Move OMAP GPIO driver to drivers/gpio/Marek Vasut
Signed-off-by: Marek Vasut <marex@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Albert Aribaud <albert.u.boot@aribaud.net> Cc: U-Boot DM <u-boot-dm@lists.denx.de> Cc: Tom Rini <trini@ti.com> Acked-by: Tom Rini <trini@ti.com> Signed-off-by: Tom Rini <trini@ti.com>
2012-08-08sh: Add support pin function control using GPIONobuhiro Iwamatsu
Renesas SH and R-Mobile set up device using PFC. This provide the framework. Most codes were brought from linux kernel. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2012-07-07GPIO: Add SPEAr GPIO driverStefan Roese
Tested on x600 (SPEAr600). Signed-off-by: Stefan Roese <sr@denx.de>
2012-07-07ATMEL/PIO: Enable new feature of PIO on Atmel deviceBo Shen
Enable new PIO feature supported by Atmel SoC. Using CPU_HAS_PIO3 micro to enable PIO new feature. Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2012-07-07gpio: tegra2: rename tegra2_gpio.* to tegra_gpio.*Tom Warren
In anticipation of Tegra3 support, continue removing/renaming Tegra2-specific files. No functional changes (yet). Updated copyrights to 2012. Signed-off-by: Tom Warren <twarren@nvidia.com>
2012-05-15i.MX25: This architecture has a GPIO4 tooTimo Ketola
Signed-off-by: Timo Ketola <timo@exertus.fi> Acked-by: Stefano Babic <sbabic@denx.de>
2012-04-16imx: Return gpio_set_value in gpio_direction_outputVikram Narayanan
Return gpio_set_value in gpio_direction_output. Earlier it returned 0 and ignored gpio_set_value's return value. Signed-off-by: Vikram Narayanan <vikram186@gmail.com> Acked-by: Stefano Babic <sbabic@denx.de>
2012-04-16imx: Use GPIO_TO_PORT macro in the gpio driver instead of (gpio >> 5)Vikram Narayanan
Use the defined GPIO_TO_PORT macro. Remove gpio >> 5 references. Signed-off-by: Vikram Narayanan <vikram186@gmail.com> Acked-by: Stefano Babic <sbabic@denx.de>
2012-04-16imx: Add GPIO_TO_PORT macro in the mxc_gpio driverVikram Narayanan
Add GPIO_TO_PORT macro in the mxc_gpio.c driver Signed-off-by: Vikram Narayanan <vikram186@gmail.com> Acked-by: Stefano Babic <sbabic@denx.de>
2012-03-26Renamed mx28_register to mx28_register_32 to prepare for mx28_register_8Robert Delien
This patch renames mx28_register to mx28_register_32 in order to prepare for the introduction of an 8-bit register, mx28_register_8. Signed-off-by: Robert Delien <robert@delien.nl> Acked-by: Marek Vasut <marex@denx.de> Tested-by: Marek Vasut <marex@denx.de>
2012-03-12sandbox: gpio: add basic driver for simulating GPIOsSimon Glass
This provides a way of simulating GPIOs by setting values which are seen by the normal gpio_get/set_value() calls. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-09mpc83xx: Add a GPIO driver for the MPC83XX familyJoe Hershberger
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Cc: Joe Hershberger <joe.hershberger@gmail.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2012-01-09gpio: Replace ARM gpio.h with the common API in include/asm-genericJoe Hershberger
ARM boards should use the generic GPIO API This means changing gpio to unsigned type Remove the unused gpio_toggle() function which is not part of the API Comment that free should not modify pin state Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Cc: Joe Hershberger <joe.hershberger@gmail.com> fixed merge conflict in da8xx_gpio.c, tegra2_gpio.c, and extended to the new mxs_gpio.c. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
2011-12-09i.mx: mxc_gpio: add the i.mx6q supportJason Liu
Signed-off-by: Jason Liu <jason.hui@linaro.org> Cc: Stefano Babic <sbabic@denx.de> Acked-by: Stefano Babic <sbabic@denx.de>
2011-12-09tegra2: Use new GPIO APIs in gpio_config_uart()Stephen Warren
... rather than open-coding the register accesses. However, gpio_request() typically stores the "label" parameter in a global data structure. This causes problems when called from gpio_config_uart(), since the code is running before relocation. To solve this, pass a NULL string to gpio_request(), and modify gpio_request() not to touch the string if it's NULL. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
2011-12-09drivers/gpio/da8xx_gpio.c: Fix build warningAnatolij Gustschin
Fix: da8xx_gpio.c: In function 'gpio_toggle_value': da8xx_gpio.c:208:23: warning: variable 'bank' set but not used [-Wunused-but-set-variable] Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-12-06M28: Fix OB1 bug in GPIO driverRobert Deliën
This patch fixes a small off-by-one bug in the GPIO driver for the mxs platform that allowed the selection gpio pins of one bank more than the SoC actually has. Signed-off-by: Robert Deliën <robert at delien.nl> Acked-by: Marek Vasut <marek.vasut@gmail.com> Acked-by: Marek Vasut <marek.vasut@gmail.com>
2011-11-21Merge branch 'sr@denx.de' of git://git.denx.de/u-boot-stagingWolfgang Denk
* 'sr@denx.de' of git://git.denx.de/u-boot-staging: Makefile: Add the missing dependency for spl target gpio: Adapt PCA9698 to standard GPIO API
2011-11-21Merge branch 'master' of git://git.denx.de/u-boot-niosWolfgang Denk
* 'master' of git://git.denx.de/u-boot-nios: nios2: Offer ft_board_setup() capability and call fdt_fixup_ethernet(). board/nios2-generic: Use altera_pio driver and remove board specific driver gpio: Add driver for Altera's PIO core nios2: Pseudo implement dcache_status/enable/disable()
2011-11-18gpio: Adapt PCA9698 to standard GPIO APIDirk Eibach
Signed-off-by: Dirk Eibach <eibach@gdsys.de> Acked-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Stefan Roese <sr@denx.de>
2011-11-11iMX28: Add GPIO controlMarek Vasut
Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
2011-10-28gpio: Add driver for Altera's PIO coreJoachim Foerster
This driver may handle multiple PIO cores and thus needs to be setup by calling the altera_pio_init() function within the early board setup routine. The driver comes with some extras, see below the copyleft header. Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com> Tested-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
2011-10-27gpio: mvmfp: reduce include platform fileLei Wen
Build pass with following config: dkb_config aspenite_config Signed-off-by: Lei Wen <leiwen@marvell.com>
2011-10-27ARM: kirkwood: reduce dependence of including platform fileLei Wen
For files like the drivers/serial/serial.c, it must include the platform file, as the CONFIG_SYS_NS16550_COM1 must reference to the definition in the platform definition files. Include the platform definition file in the config file, so that it would decouple the dependence for the driver files. Signed-off-by: Lei Wen <leiwen@marvell.com>
2011-10-22gpio: Add PCA9698 40-bit I2C I/O portDirk Eibach
Signed-off-by: Dirk Eibach <eibach@gdsys.de>
2011-10-17kw_gpio: fix error in kw_gpio_direction_inputHolger Brunck
The function kw_gpio_is_valid returns zero on success, so adapt the error check accordingly. Signed-off-by: Holger Brunck <holger.brunck@keymile.com> cc: Prafulla Wadaskar <prafulla@marvell.com> cc: Dieter Kiermaier <dk-arm-linux@gmx.de>
2011-09-30gpio: Add GPIO driver framework for Marvell SoCsAjay Bhargav
This patch adds generic GPIO driver framework support for Marvell SoCs. To enable GPIO driver define CONFIG_MARVELL_GPIO and for GPIO commands define CONFIG_CMD_GPIO in your board configuration file. Signed-off-by: Ajay Bhargav <ajay.bhargav@einfochips.com>
2011-09-11Minor coding style cleanup.Wolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-09-04i2c:gpio:s5p: I2C GPIO Software implementation (via soft_i2c)Łukasz Majewski
This patch adds support for software I2C for GONI and Universal C210 reference targets. It adds support for access to GPIOs by number, not as it is present, by bank and offset. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com> Cc: Heiko Schocher <hs@denx.de>
2011-09-04IMX: uniform GPIO interface using GPIO frameworkStefano Babic
IMX processors has a slightly different interface to access GPIOs and do not make use of the provided GPIO framework. The patch substitutes mxc_ specific functions and make use of the API in asm/gpio.h Signed-off-by: Stefano Babic <sbabic@denx.de>
2011-09-03gpio:samsung s5p_ suffix add for GPIO functionsŁukasz Majewski
This change is driven by need of general gpio_* functions, which as their parameter are accepting the GPIO pin number, NOT block and pin. This makes the code alike to omap, and allows for using more generic frameworks (e.g. software I2C). Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-08-03DA8xx: add generic GPIO driverLaurence Withers
Add a generic GPIO driver for the DaVinci DA8xx processors. It is turned on by defining CONFIG_DA8XX_GPIO and fulfills the generic GPIO interface specified in <asm/gpio.h> . The driver has support for both manipulating GPIO pins as well as automatically configuring the pin multiplexor registers to set the pin function to GPIO. Signed-off-by: Laurence Withers <lwithers@guralp.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2011-07-04GPIO: Tegra2: add GPIO driver for Tegra2Tom Warren
Signed-off-by: Tom Warren <twarren@nvidia.com>
2011-05-18AT91: change includes from asm/arch/io.h to asm/io.hReinhard Meyer
and remove the now unused asm/arch-at91/io.h Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2011-05-18AT91: fix related at91 driver filesReinhard Meyer
Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2011-05-11gpio: imx: Fix return value on errorFabio Estevam
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2011-04-27IMX: MX31: Cleanup include files and drop nasty #ifdef in driversStefano Babic
As exception among the i.MX processors, the i.MX31 has headers without general names (mx31-regs.h, mx31.h instead of imx-regs.h and clock.h). This requires several nasty #ifdef in the drivers to include the correct header. The patch cleans up the driver and renames the header files as for the other i.MX processors. Signed-off-by: Stefano Babic <sbabic@denx.de>
2011-02-21mvmfp: add MFP configuration support for PANTHEONLei Wen
This patch adds the Multiple Function Pin configuration support for Marvell PANTHEON SoCs Signed-off-by: Lei Wen <leiwen@marvell.com>
2011-02-02mxc_gpio: add support for MX53 processorLiu Hui-R64343
This patch add mxc_gpio support for Freescale MX53 processor Signed-off-by: Jason Liu <r64343@freescale.com>
2011-01-10pca953x: support 16-pin devicesChris Packham
This adds support for for the PCA9535/PCA9539 family of gpio devices which have 16 output pins. To let the driver know which devices are 16-pin it is necessary to define CONFIG_SYS_I2C_PCA953X_WIDTH in your board config file. This is used to create an array of {chip, ngpio} tuples that are used to determine the width of a particular chip. For backwards compatibility it is assumed that any chip not defined in CONFIG_SYS_I2C_PCA953X_WIDTH has 8 pins. Acked-by: Peter Tyser <ptyser@xes-inc.com> Tested-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>