summaryrefslogtreecommitdiffstats
path: root/drivers/gpio
Commit message (Collapse)AuthorAgeFilesLines
* Merge u-boot/master into u-boot-ti/masterTom Rini2013-03-112-2/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | In master we had already taken a patch to fix the davinci GPIO code for CONFIG_SOC_DM646X and in u-boot-ti we have additional patches to support DA830 (which is CONFIG_SOC_DA8XX && !CONFIG_SOC_DA850). Resolve these conflicts manually and comment the #else/#endif lines for clarity. Conflicts: arch/arm/include/asm/arch-davinci/gpio.h drivers/gpio/da8xx_gpio.c Signed-off-by: Tom Rini <trini@ti.com>
| * gpio: Build the da8xx_gpio code for the davinci644x deviceHolger Hans Peter Freyther2013-02-202-0/+5
| | | | | | | | | | | | | | The differences include the number of GPIOs and that one is not required to set the pinmux on request. Signed-off-by: Holger Hans Peter Freyther <holger@freyther.de>
* | da8xx: Add the missing pinmux for da830 to the gpio driverTomas Novotny2013-02-181-0/+133
|/ | | | | | | | | The pinmux was generated from linux/arch/arm/mach-davinci/da830.c as of kernel version 3.7.5. If the driver is used for the da850, then SoC variant must be specified by CONFIG_SOC_DA850. Signed-off-by: Tomas Novotny <tomas@novotny.cz> Cc: Tom Rini <trini@ti.com>
* Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'Albert ARIBAUD2013-01-081-7/+3
|\ | | | | | | | | This required manual merging drivers/mtd/nand/Makefile and adding am335x_evm support for CONFIG_SPL_NAND_DRIVERS
| * gpio: add gpio_is_valid() to omap_gpio APINikita Kiryanov2012-12-101-7/+3
| | | | | | | | | | | | | | Add gpio_is_valid() to omap_gpio API Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
* | Merge branch 'master' of git://git.denx.de/u-boot into resolveMinkyu Kang2012-12-102-0/+291
|\ \ | |/ |/| | | | | | | | | | | | | | | | | Conflicts: README board/samsung/universal_c210/universal.c drivers/misc/Makefile drivers/power/power_fsl.c include/configs/mx35pdk.h include/configs/mx53loco.h include/configs/seaboard.h
| * x86: gpio: Add additional GPIO banks to the ICH6 driverBill Richardson2012-12-061-62/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can generally trust the ICH to have GPIO Bank 0 (the first 32 pins) in the same place across all versions. This change adds two more banks, for up to 96 GPIOS. BUT: - Not all chipsets have the same number of GPIOs - Not all chipsets have the same number of GPIO banks - Not all chipsets put the additional banks at the same offset from GPIOBASE - There so many chipset variants that it's pretty much impossible to support them all, or even keep track of the new ones. So, although this adds suppport for the additional banks that seem to work for the particular variants of CougarPoint Mobile chipsets that we've tried, there's no chance it will support everything Intel produces. Good luck. Signed-off-by: Bill Richardson <wfrichar@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
| * x86: gpio: Add GPIO driver for Intel ICH6 and later.Bill Richardson2012-12-062-0/+243
| | | | | | | | | | | | | | | | | | Implement <asm-generic/gpio.h> functions for Intel ICH6 and later. Only GPIOs 0-31 are handled by this code. Signed-off-by: Bill Richardson <wfrichar@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
* | gpio:fix: Proper handling of GPIO subsystem parts at Samsung devicesŁukasz Majewski2012-11-151-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Now proper GPIO parts numbering is handled at Samsung devices. This fix is necessary for code using GPIO located at other banks than first. Test HW: - Exynos4210 - Trats - S5PC110 - goni 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>
* | mx6: use CONFIG_MX6 instead of CONFIG_MX6QTroy Kisky2012-11-101-3/+3
|/ | | | | | | | | | Use CONFIG_MX6 when the particular processor variant isn't important. Reserve the use of CONFIG_MX6Q to specifically test for quad cores variant. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* drivers/gpio/mpc83xx_gpio.c: sparse fixesKim Phillips2012-11-041-2/+2
| | | | | | | mpc83xx_gpio.c:166:26: warning: non-ANSI function declaration of function 'mpc83xx_gpio_init_f' mpc83xx_gpio.c:190:26: warning: non-ANSI function declaration of function 'mpc83xx_gpio_init_r' Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
* Tegra20: Move some include files to arch-tegra for sharing with Tegra30Tom Warren2012-10-151-1/+1
| | | | | | | | | | | The move is pretty straight-forward. ap20.h and tegra20.h were renamed to ap.h and tegra.h. Some files remain in arch-tegra20 but 'include' a file in 'arch-tegra' with #defines & structs that will be common between T20 and T30 HW. HW-specific #defines, etc. stay in the 'arch-tegra20' 'root' file. All boards build OK w/MAKEALL -s tegra20. Checkpatch.pl runs clean. Seaboard works OK. Signed-off-by: Tom Warren <twarren@nvidia.com>
* GPIO: pca953x: fix error reportingLaurence Withers2012-10-081-14/+35
| | | | | | | | 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>
* GPIO: pca953x: fix spelling in helpLaurence Withers2012-10-081-1/+1
| | | | Signed-off-by: Laurence Withers <lwithers@guralp.com>
* ARM : Add GPIO Driver and IOMUX definition for S3C2440Gabriel Huau2012-10-032-0/+96
| | | | | | | 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>
* Tegra: Change Tegra20 to Tegra in common code, prep for T30Tom Warren2012-09-101-4/+4
| | | | | | | | | | 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>
* gpio: add gpio api support to mx27 (v4)trem2012-09-011-3/+5
| | | | | | | 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>
* mxc: Make gpio_get_value() use PSRBenoît Thébaudeau2012-09-011-1/+1
| | | | | | | | | | | 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>
* tegra20: rename tegra2 -> tegra20Allen Martin2012-09-011-6/+6
| | | | | | | | | | 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>
* ARM: add basic support for the Broadcom BCM2835 SoCStephen Warren2012-09-012-0/+90
| | | | | | | | | | | | | | | | | 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>
* snowball: Add support for ux500 based snowball boardMathieu J. Poirier2012-09-012-0/+222
| | | | | | | | | | | 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
* mxs: prefix register acessor macros with 'mxs' prefixOtavio Salvador2012-09-011-8/+8
| | | | | | | 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>
* dm: Move OMAP GPIO driver to drivers/gpio/Marek Vasut2012-09-012-0/+244
| | | | | | | | | | 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>
* sh: Add support pin function control using GPIONobuhiro Iwamatsu2012-08-082-0/+630
| | | | | | | | 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>
* GPIO: Add SPEAr GPIO driverStefan Roese2012-07-072-0/+103
| | | | | | Tested on x600 (SPEAr600). Signed-off-by: Stefan Roese <sr@denx.de>
* ATMEL/PIO: Enable new feature of PIO on Atmel deviceBo Shen2012-07-071-2/+123
| | | | | | | | 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>
* gpio: tegra2: rename tegra2_gpio.* to tegra_gpio.*Tom Warren2012-07-072-2/+2
| | | | | | | | 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>
* i.MX25: This architecture has a GPIO4 tooTimo Ketola2012-05-151-1/+2
| | | | | Signed-off-by: Timo Ketola <timo@exertus.fi> Acked-by: Stefano Babic <sbabic@denx.de>
* imx: Return gpio_set_value in gpio_direction_outputVikram Narayanan2012-04-161-2/+1
| | | | | | | | 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>
* imx: Use GPIO_TO_PORT macro in the gpio driver instead of (gpio >> 5)Vikram Narayanan2012-04-161-4/+4
| | | | | | | 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>
* imx: Add GPIO_TO_PORT macro in the mxc_gpio driverVikram Narayanan2012-04-161-0/+1
| | | | | | | 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>
* Renamed mx28_register to mx28_register_32 to prepare for mx28_register_8Robert Delien2012-03-261-8/+8
| | | | | | | | | 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>
* sandbox: gpio: add basic driver for simulating GPIOsSimon Glass2012-03-122-0/+210
| | | | | | | | 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>
* mpc83xx: Add a GPIO driver for the MPC83XX familyJoe Hershberger2012-01-092-0/+200
| | | | | | 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>
* gpio: Replace ARM gpio.h with the common API in include/asm-genericJoe Hershberger2012-01-096-218/+229
| | | | | | | | | | | | | | | | 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>
* i.mx: mxc_gpio: add the i.mx6q supportJason Liu2011-12-091-2/+2
| | | | | | Signed-off-by: Jason Liu <jason.hui@linaro.org> Cc: Stefano Babic <sbabic@denx.de> Acked-by: Stefano Babic <sbabic@denx.de>
* tegra2: Use new GPIO APIs in gpio_config_uart()Stephen Warren2011-12-091-2/+4
| | | | | | | | | | | | | | | ... 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>
* drivers/gpio/da8xx_gpio.c: Fix build warningAnatolij Gustschin2011-12-091-3/+0
| | | | | | | | | 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>
* M28: Fix OB1 bug in GPIO driverRobert Deliën2011-12-061-1/+1
| | | | | | | | 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>
* Merge branch 'sr@denx.de' of git://git.denx.de/u-boot-stagingWolfgang Denk2011-11-211-21/+41
|\ | | | | | | | | | | * '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
| * gpio: Adapt PCA9698 to standard GPIO APIDirk Eibach2011-11-181-21/+41
| | | | | | | | | | | | Signed-off-by: Dirk Eibach <eibach@gdsys.de> Acked-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Stefan Roese <sr@denx.de>
* | Merge branch 'master' of git://git.denx.de/u-boot-niosWolfgang Denk2011-11-212-0/+300
|\ \ | | | | | | | | | | | | | | | | | | | | | * '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()
| * | gpio: Add driver for Altera's PIO coreJoachim Foerster2011-10-282-0/+300
| |/ | | | | | | | | | | | | | | | | | | | | | | 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>
* | iMX28: Add GPIO controlMarek Vasut2011-11-112-0/+137
|/ | | | | | | 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>
* gpio: mvmfp: reduce include platform fileLei Wen2011-10-271-7/+0
| | | | | | | | Build pass with following config: dkb_config aspenite_config Signed-off-by: Lei Wen <leiwen@marvell.com>
* ARM: kirkwood: reduce dependence of including platform fileLei Wen2011-10-271-0/+1
| | | | | | | | | | | 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>
* gpio: Add PCA9698 40-bit I2C I/O portDirk Eibach2011-10-222-0/+124
| | | | Signed-off-by: Dirk Eibach <eibach@gdsys.de>
* kw_gpio: fix error in kw_gpio_direction_inputHolger Brunck2011-10-171-1/+1
| | | | | | | | | 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>
* gpio: Add GPIO driver framework for Marvell SoCsAjay Bhargav2011-09-303-0/+190
| | | | | | | | | 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>
* Minor coding style cleanup.Wolfgang Denk2011-09-111-11/+0
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
OpenPOWER on IntegriCloud