aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio
AgeCommit message (Collapse)Author
2012-04-25snowball: igloo copy port of gpio driver supportPer Forlin
Signed-off-by: Per Forlin <per.forlin@linaro.org>
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>
2010-12-16gpio: Add Multi-Function-Pin configuration driver for Marvell SoCsPrafulla Wadaskar
Most of the Marvell SoCs has Multi Function Pin (MFP) configuration registers For ex. ARMADA100. These registers are programmed to expose the specific functionality associated with respective SoC Pins This driver provides configuration APIs, using them, configuration need to be done in board specific code for ex- following code configures MFPs 107 and 108 for UART_TX/RX functionality int board_early_init_f(void) { u32 mfp_cfg[] = { /* Console on UART1 */ MFP107_UART1_RXD, MFP108_UART1_TXD, MFP_EOC /*End of configureation*/ }; /* configure MFP's */ mfp_config(mfp_cfg); return 0; } Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2010-11-17Switch from archive libraries to partial linkingSebastien Carlier
Before this commit, weak symbols were not overridden by non-weak symbols found in archive libraries when linking with recent versions of binutils. As stated in the System V ABI, "the link editor does not extract archive members to resolve undefined weak symbols". This commit changes all Makefiles to use partial linking (ld -r) instead of creating library archives, which forces all symbols to participate in linking, allowing non-weak symbols to override weak symbols as intended. This approach is also used by Linux, from which the gmake function cmd_link_o_target (defined in config.mk and used in all Makefiles) is inspired. The name of each former library archive is preserved except for extensions which change from ".a" to ".o". This commit updates references accordingly where needed, in particular in some linker scripts. This commit reveals board configurations that exclude some features but include source files that depend these disabled features in the build, resulting in undefined symbols. Known such cases include: - disabling CMD_NET but not CMD_NFS; - enabling CONFIG_OF_LIBFDT but not CONFIG_QE. Signed-off-by: Sebastien Carlier <sebastien.carlier@gmail.com>
2010-09-29Use common function to set GPIOs for MX3 and MX5Stefano Babic
The patch adds support for setting gpios to the MX51 processor and change name to the corresponding functions for MX31. In this way, it is possible to get rid of nasty #ifdef switches related to the processor type. Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-08-26ARMV7: S5P: rename from CONFIG_S5PC1XX to CONFIG_S5PMinkyu Kang
Use the same configuration around S5P SoCs. (s5pc100, s5pc110, s5pc210 and so on) Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2010-07-24cmd_usage(): simplify return code handlingWolfgang Denk
Lots of code use this construct: cmd_usage(cmdtp); return 1; Change cmd_usage() let it return 1 - then we can replace all these ocurrances by return cmd_usage(cmdtp); This fixes a few places with incorrect return code handling, too. Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-07-04Make sure that argv[] argument pointers are not modified.Wolfgang Denk
The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
2010-06-14s5pc1xx: gpio: bug fix at gpio_set_pull functionMinkyu Kang
When set to PULL_NONE, gpio_set_pull function is returned without write the register. This patch fixed it. Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2010-04-30MX31: add accessor function to get a gpioStefano Babic
The patch adds an accessor function to get the value of a gpio. Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-04-30SAMSUNG: make s5p common gpio functionsMinkyu Kang
Because of s5pc1xx gpio is same as s5p seires SoC, move gpio functions to drvier/gpio/ and modify structure's name from s5pc1xx_ to s5p_. Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2010-02-12add a new AT91 GPIO driverJens Scharsig
* add a real AT91 GPIO driver instead of header inline code * resolve the mixing of port and pins * change board config files to use new driver * add macros to gpio to realize backward compatibility Signed-off-by: Jens Scharsig <js_at_ng@scharsoft.de>
2010-01-23Kirkwood: Upgated licencing for files imported from linux source to GPLv2 or ↵Prafulla Wadaskar
later These are few files directly imported from Linux kernel source. Those are not modifyed at all ar per strategy. These files contains source with GPLv2 only whereas u-boot expects GPLv2 or latter These files are updated for the same from prior permission from original writes Acked-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2009-07-23Kirkwood: add Marvell Kirkwood gpio driverDieter Kiermaier
Signed-off-by: Dieter Kiermaier <dk-arm-linux@gmx.de> Acked-by: Prafulla Wadaskar <prafulla@marvell.com> Tested-by: Heiko Schocher <hs@denx.de>
2009-06-12General help message cleanupWolfgang Denk
Many of the help messages were not really helpful; for example, many commands that take no arguments would not print a correct synopsis line, but "No additional help available." which is not exactly wrong, but not helpful either. Commit ``Make "usage" messages more helpful.'' changed this partially. But it also became clear that lots of "Usage" and "Help" messages (fields "usage" and "help" in struct cmd_tbl_s respective) were actually redundant. This patch cleans this up - for example: Before: => help dtt dtt - Digital Thermometer and Thermostat Usage: dtt - Read temperature from digital thermometer and thermostat. After: => help dtt dtt - Read temperature from Digital Thermometer and Thermostat Usage: dtt Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-02-24i.MX31: add a simple gpio driverGuennadi Liakhovetski
This is a minimal driver, so far only managing output. It will be used by the mxc_spi.c driver. Signed-off-by: Guennadi Liakhovetski <lg@denx.de> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-01-28Command usage cleanupPeter Tyser
Remove command name from all command "usage" fields and update common/command.c to display "name - usage" instead of just "usage". Also remove newlines from command usage fields. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>