summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/gpio.c
Commit message (Collapse)AuthorAgeFilesLines
* pinctrl: at91: add pinctrl driverRaphaël Poggi2014-09-041-670/+0
| | | | | | | | | This driver is based on mach-at91/gpio.c and linux pinctrl driver. The driver contains the gpio and pinctrl parts (like in linux) because the two parts share some structures and logics. Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: mach-at91: move gpio.h to include folderRaphaël Poggi2014-09-031-1/+1
| | | | | | | | This commit add functions from mach-at91/gpio.h in include/mach/gpio.h. This allow to use these functions outside the mach-at91 folder. Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* at91mux: Fix both help info and Kconfig info.Robert P. J. Day2014-07-071-2/+2
| | | | | | | Correct options are, in fact, -p and -b. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: harmonize in-barebox documentationHolger Schurig2014-05-141-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does probably too much, but it's hard (and very cumbersome/time consuming) to break it out. What is does is this: * each command has one short description, e.g. "list MUX configuration" * made sure the short descriptions start lowercase * each command has one usage. That string contains just the options, e.g. "[-npn]". It's not part of the long help text. * that is, it doesn't say "[OPTIONS]" anymore, every usable option is listed by character in this (short) option string (the long description is in the long help text, as before) * help texts have been reworked, to make them - sometimes smaller - sometimes describe the options better - more often present themselves in a nicer format * all long help texts are now created with BUSYBOX_CMD_HELP_ macros, no more 'static const __maybe_unused char cmd_foobar_help[]' * made sure the long help texts starts uppercase * because cmdtp->name and cmdtp->opts together provide the new usage, all "Usage: foobar" texts have been removed from the long help texts * BUSYBOX_CMD_HELP_TEXT() provides the trailing newline by itself, this is nicer in the source code * BUSYBOX_CMD_HELP_OPT() provides the trailing newline by itself * made sure no line gets longer than 77 characters * delibertely renamed cmdtp->usage, so that we can get compile-time errors (e.g. in out-of-tree modules that use register_command() * the 'help' command can now always emit the usage, even without compiled long help texts * 'help -v' gives a list of commands with their short description, this is similar like the old "help" command before my patchset * 'help -a' gives out help of all commands Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: group 'help' outputHolger Schurig2014-05-141-0/+1
| | | | | | | | | | | | | | | | | | | The old output of "help" was just producing a long list, that usually scrolled of the screen (even on a X11 terminal). This list is more compact, and also sorted by groups. The old output format (plus grouping) is now available with 'help -v'. Example: Information commands: ?, devinfo, help, iomem, meminfo, version Boot commands: boot, bootm, go, loadb, loads, loadx, loady, saves, uimage ... Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91: Fix signed/unsigned arguments for printfAlexander Shiyan2013-11-111-2/+2
| | | | | | | "%d" in format string requires a signed integer. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: AT91: move iomux definitions to iomux.hSascha Hauer2013-08-161-0/+1
| | | | | | | mach/gpio.h is for the gpio API, so move unrelated stuff away. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: include <gpio.h> instead of <mach/gpio.h>Sascha Hauer2013-08-161-1/+0
| | | | | | The gpio api should be used from <gpio.h> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91 gpio: Fix possible null pointer dereferenceAlexander Shiyan2013-04-301-2/+3
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* at91: gpio: split accessor so we can use them for early initJean-Christophe PLAGNIOL-VILLARD2013-02-051-125/+6
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* at91: add dump mux commandJean-Christophe PLAGNIOL-VILLARD2013-01-071-0/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will allow to dump all pin configuration in a nice table and if the bank/pin is specified the pin details barebox@Atmel at91sam9x5-ek:/ Pin PIOA PIOB PIOC PIOD 0: [gpio] set [periph A] [gpio] set [periph A] 1: [periph A] [periph A] [gpio] set [periph A] 2: [gpio] set [periph A] [gpio] set [periph A] 3: [gpio] set [periph A] [gpio] set [periph A] 4: [gpio] set [periph A] [gpio] set [gpio] clear 5: [gpio] set [periph A] [gpio] set [gpio] set 6: [gpio] set [periph A] [gpio] set [periph A] 7: [gpio] set [periph A] [gpio] set [periph A] 8: [gpio] set [gpio] set [gpio] set [periph A] 9: [periph A] [periph A] [gpio] set [periph A] 10: [periph A] [periph A] [gpio] set [periph A] 11: [periph A] [gpio] set [gpio] set [periph A] 12: [periph A] [gpio] set [gpio] set [periph A] 13: [periph A] [gpio] clear [gpio] set [periph A] 14: [gpio] set [gpio] clear [gpio] set [gpio] set 15: [periph A] [gpio] set [gpio] set [gpio] set 16: [periph A] [gpio] set [gpio] clear [periph A] 17: [periph A] [gpio] set [gpio] set [periph A] 18: [periph A] [gpio] set [gpio] set [periph A] 19: [periph A] [periph A] [gpio] set [gpio] set 20: [periph A] [periph A] [gpio] clear [gpio] set 21: [gpio] set [periph A] [gpio] clear [gpio] clear 22: [gpio] set [periph A] [gpio] set [periph A] 23: [gpio] set [periph A] [gpio] set [periph A] 24: [gpio] set [periph A] [gpio] set [periph A] 25: [gpio] set [periph A] [gpio] set [periph A] 26: [gpio] set [periph A] [gpio] set [periph A] 27: [gpio] clear [periph A] [gpio] set [periph A] 28: [gpio] set [periph A] [gpio] clear [periph A] 29: [gpio] set [periph A] [gpio] set [periph A] 30: [gpio] set [periph A] [gpio] set [periph A] 31: [gpio] set [periph A] [gpio] set [periph A] barebox@Atmel at91sam9x5-ek:/ pioA27 configuration [gpio] clear multidrive = disable pullup = disable degitch = disable debounce = disable pulldown = enable schmitt trigger = enable Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* at91: switch to gpiolibJean-Christophe PLAGNIOL-VILLARD2012-12-221-47/+71
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* at91: gpio: switch to opsJean-Christophe PLAGNIOL-VILLARD2012-12-221-137/+251
| | | | | | | | | | imported from the kernel this allow to simplify the mux implemtation and will simplify the gpio support from bare_init or pbl Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* at91: gpio: switch to device driverJean-Christophe PLAGNIOL-VILLARD2012-12-221-10/+60
| | | | | | | this is the first step to prepare the switch to the gpiolib Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* at91: drop PIN_BASE offset for gpioJean-Christophe PLAGNIOL-VILLARD2012-12-221-2/+0
| | | | | | | so 0 is a valid gpio as cleanned in the kernel Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: at91: add at91sam9n12 supportJean-Christophe PLAGNIOL-VILLARD2012-11-261-1/+1
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-171-4/+0
| | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91/pio: add new PIO3 featuresJean-Christophe PLAGNIOL-VILLARD2012-04-021-2/+127
| | | | | | | | | | This patch adds the support for new PIO controller found on some at91sam SOCs. - more peripheral multiplexing - more features to configure on a PIO (pull-down, Schmitt trigger, debouncer) Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* at91/gpio: simplify resourcesJean-Christophe PLAGNIOL-VILLARD2012-01-021-11/+2
| | | | | | | drop irq id and rebase instead of of offset Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* introduce io.hSascha Hauer2011-09-221-1/+1
| | | | | | | To allow for some generic io accessors introduce io.h and use this instead of asm/io.h throughout the tree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* at91: implement clock frameworkJean-Christophe PLAGNIOL-VILLARD2010-08-061-0/+3
| | | | | | | | | | | this implementation is based on linux one (v2.6.35-rc5-76-gd0c6f62) it will calculate all the clock dynamically instead of statictly this will use also the new clock framework it will also print the clock status after the console init Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/machJean-Christophe PLAGNIOL-VILLARD2009-10-221-1/+1
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* at91sam9: switch to the same api as the kernelJean-Christophe PLAGNIOL-VILLARD2009-10-201-59/+122
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* at91sam9: move to at91Jean-Christophe PLAGNIOL-VILLARD2009-10-201-0/+192
this will allow to add at91rm9200 with the same api as done in the kernel Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>