summaryrefslogtreecommitdiff
path: root/drivers/gpio/mxc_gpio.c
Commit message (Collapse)AuthorAgeLines
* dm: gpio: imx: Drop request()/free() in the driverSimon Glass2014-10-23-116/+0
| | | | | | | Now that the uclass supports gpio_request/free() there is no need for the driver to implement it too. Drop this unnecessary code. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: imx: gpio: Support driver model in MXC gpio driverSimon Glass2014-10-22-1/+303
| | | | | | | | | | Add driver model support with this driver. In this case the platform data is in the driver. It would be better to put this into an SOC-specific file, but this is best attempted when more boards are moved over to use driver model. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
* Merge git://git.denx.de/u-boot-armStefano Babic2013-07-31-17/+1
|\ | | | | | | | | | | | | | | | | Conflicts: board/freescale/mx6qsabrelite/Makefile board/freescale/mx6qsabrelite/mx6qsabrelite.c include/configs/mx6qsabrelite.h Signed-off-by: Stefano Babic <sbabic@denx.de>
| * Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-24-17/+1
| | | | | | | | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* | mxc_gpio: Correct the GPIO handling in gpio_direction_output()Dirk Behme2013-07-24-2/+2
|/ | | | | | | | | | | | | | | | | | Setting the direction and an output value should be done by First, set the desired output value. Then, switch to output. If this is done in the inverse order, like at the moment, there can be a glitch on the GPIO line while switching first the old output value and aftwards the new one. Fix this by inverting the order of the direction/set_value calls. Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com> Acked-by: Stefano Babic <sbabic@denx.de>
* mx6: use CONFIG_MX6 instead of CONFIG_MX6QTroy Kisky2012-11-10-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>
* gpio: add gpio api support to mx27 (v4)trem2012-09-01-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-01-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>
* i.MX25: This architecture has a GPIO4 tooTimo Ketola2012-05-15-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-16-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-16-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-16-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>
* gpio: Replace ARM gpio.h with the common API in include/asm-genericJoe Hershberger2012-01-09-22/+20
| | | | | | | | | | | | | | | | 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-09-2/+2
| | | | | | Signed-off-by: Jason Liu <jason.hui@linaro.org> Cc: Stefano Babic <sbabic@denx.de> Acked-by: Stefano Babic <sbabic@denx.de>
* IMX: uniform GPIO interface using GPIO frameworkStefano Babic2011-09-04-4/+47
| | | | | | | | | 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>
* gpio: imx: Fix return value on errorFabio Estevam2011-05-11-2/+3
| | | | Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
* IMX: MX31: Cleanup include files and drop nasty #ifdef in driversStefano Babic2011-04-27-5/+0
| | | | | | | | | | 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>
* mxc_gpio: add support for MX53 processorLiu Hui-R643432011-02-02-2/+7
| | | | | | This patch add mxc_gpio support for Freescale MX53 processor Signed-off-by: Jason Liu <r64343@freescale.com>
* Use common function to set GPIOs for MX3 and MX5Stefano Babic2010-09-29-0/+107
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>