summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
AgeCommit message (Collapse)AuthorFilesLines
2013-03-24Merge tag 'pinctrl-fixes-for-v3.9' of ↵Linus Torvalds5-4/+9
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pinctrl fixes from Linus Walleij: "Here are a few pinctrl fixes for the v3.9 rc series: - Usecount bounds checking so we do not go below zero on mux usecounts. - Loop range checking in GPIO ranges in the DT range parser. - Proper print in debugfs for pinconf state. - Fix compilation bug in generic pinconf code. - Minor bugfixes to abx500 and mvebu drivers." * tag 'pinctrl-fixes-for-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinmux: forbid mux_usecount to be set at UINT_MAX pinctrl: mvebu: fix checking for SoC specific controls pinctrl: generic: Fix compilation error pinctrl: Print the correct information in debugfs pinconf-state file pinctrl: abx500: Fix checking if pin use AlternateFunction register gpio: fix wrong checking condition for gpio range
2013-03-21pinmux: forbid mux_usecount to be set at UINT_MAXRichard Genoud1-0/+5
If pin_free is called on a pin already freed, mux_usecount is set to UINT_MAX which is really a bad idea. This will issue a warning, so that we can correct the code responsible for the double free. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-21pinctrl: mvebu: fix checking for SoC specific controlsSimon Guinot1-1/+1
This patch fixes a minor bug (probably due to a typo) while checking the SoC specific controls in mvebu_pinctrl_probe(). Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Simon Guinot <simon.guinot@sequanux.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-14ARM: at91: add gpio suspend/resume support when using pinctrlLudovic Desroches1-1/+60
gpio suspend/resume and wakeup sources where not managed when using pinctrl so it was impossible to wake up the system with a gpio. Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2013-03-13pinctrl: generic: Fix compilation errorSachin Kamat1-1/+1
The function definition of pinconf_generic_dump_config is defined under CONFIG_DEBUG_FS macro. Define the declaration too under this macro. Without this patch we get the following build error: drivers/built-in.o: In function `pcs_pinconf_config_dbg_show': drivers/pinctrl/pinctrl-single.c:726: undefined reference to `pinconf_generic_dump_config' Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-13pinctrl: Print the correct information in debugfs pinconf-state fileLaurent Pinchart1-1/+1
A bad copy&paste resulted in the debugfs pinconf-state file printing the pin name instead of the state name. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-13pinctrl: abx500: Fix checking if pin use AlternateFunction registerAxel Lin1-1/+1
It's pointless to check "af.alt_bit1 == UNUSED" twice. This looks like a copy-paste bug, I think what we want is to check if *both* af.alt_bit1 and af.alt_bit2 are UNUSED. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-21Merge tag 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds1-0/+4
Pull ARM SoC device tree conversions from Arnd Bergmann: "These are device tree conversions for a number of platforms, with the intention of turning code from board files into device tree descriptions. Notable changes are: - davinci bindings for pinctrl, MTD, RTC, watchdog and i2c - nomadik bindings for all devices, removing the board files - bcm2835 bindings for mmc and i2c - tegra bindings for hdmi, keyboard, audio, as well as some updates - at91 bindings for hardware ecc and for devices on RM9200 - mxs bindings for cfa100xx - sunxi support for Miniand Hackberry board" * tag 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (72 commits) Revert "sunxi: a10-cubieboard: Add user LEDs to the device tree" Revert "sunxi: a13-olinuxino: Add user LED to the device tree" clk: tegra: initialise parent of uart clocks ARM: tegra: remove clock-frequency properties from serial nodes clk: tegra: fix driver to match DT binding clk: tegra: local arrays should be static clk: tegra: Add missing spinlock for hclk and pclk clk: tegra: Implement locking for super clock clk: tegra: fix wrong clock index between se to sata_cold sunxi: a13-olinuxino: Add user LED to the device tree ARM: davinci: da850 DT: add support for machine reboot ARM: davinci: da850: add wdt DT node ARM: davinci: da850: add DT node for I2C0 ARM: at91: at91sam9n12: add DT parameters to enable PMECC ARM: at91: at91sam9x5: add DT parameters to enable PMECC ARM: at91: add EMAC bindings to RM9200 DT ARM: at91: add SSC bindings to RM9200 DT ARM: at91: add MMC bindings to RM9200 DT ARM: at91: Animeo IP: enable watchdog support ARM: nomadik: fix OF compilation regression ...
2013-02-21Merge tag 'sh-pinmux' of ↵Linus Torvalds25-1/+32555
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull sh-mobile pinctrl conversion from Arnd Bergmann: "This is another cleanup series, containing the move of the Renesas SH-Mobile pin controller code from arch/arm/mach-shmobile over to the generic pinctrl subsystem, changing it over to the common interfaces in the process. Based on agreement between Olof, Paul Mundt, Linus Walleij and Simon, we're merging this large branch of pinctrl conversion through arm-soc, even though it contains the corresponding conversions for arch/sh. Main reason for this is tight dependencies (that will now mostly be broken) between the arch/sh and mach-shmobile implementations. There will be more of this in 3.10 to do device-tree bindings, but this is the initial conversion." * tag 'sh-pinmux' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (81 commits) sh-pfc: sh_pfc_probe() sizeof() fix sh-pfc: Move sh_pfc.h from include/linux/ to driver directory sh-pfc: Remove pinmux_info definition sh: Remove unused sh_pfc_register_info() function sh: shx3: pinmux: Use driver-provided pinmux info sh: sh7786: pinmux: Use driver-provided pinmux info sh: sh7785: pinmux: Use driver-provided pinmux info sh: sh7757: pinmux: Use driver-provided pinmux info sh: sh7734: pinmux: Use driver-provided pinmux info sh: sh7724: pinmux: Use driver-provided pinmux info sh: sh7723: pinmux: Use driver-provided pinmux info sh: sh7722: pinmux: Use driver-provided pinmux info sh: sh7720: pinmux: Use driver-provided pinmux info sh: sh7269: pinmux: Use driver-provided pinmux info sh: sh7264: pinmux: Use driver-provided pinmux info sh: sh7203: pinmux: Use driver-provided pinmux info ARM: shmobile: sh73a0: Use driver-provided pinmux info ARM: shmobile: sh7372: Use driver-provided pinmux info ARM: shmobile: r8a7779: Use driver-provided pinmux info ARM: shmobile: r8a7740: Use driver-provided pinmux info ...
2013-02-21Merge tag 'fixes-non-critical' of ↵Linus Torvalds1-2/+2
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull non-critical ARM SoC bug fixes from Arnd Bergmann: "Bug fixes that did not make it into v3.8, mostly because they were not considered important enough, and in some cases because bugs only show up in combination with other patches destined for 3.9. This includes a few larger patches for GPIO on the Marvell PXA platform and a lot of Samsung specific bug fixes, as well as a series from Arnd to fix older build warnings." * tag 'fixes-non-critical' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (54 commits) ARM: SPEAr13xx: Enable CONFIG_ARCH_HAS_CPUFREQ ARM: imx: MACH_MX31ADS_WM1133_EV1 needs REGULATOR_WM8350 scripts/sortextable: silence script output ARM: s3c: i2c: add platform_device forward declaration ARM: mvebu: allow selecting mvebu without Armada XP ARM: pick Versatile by default for !MMU ARM: integrator: fix build with INTEGRATOR_AP off ARM: integrator/versatile: fix NOMMU warnings ARM: sa1100: don't warn about mach/ide.h ARM: shmobile: fix defconfig warning on CONFIG_USB ARM: w90x900: fix legacy assembly syntax ARM: samsung: fix assembly syntax for new gas ARM: disable virt_to_bus/virt_to_bus almost everywhere ARM: dts: Correct pin configuration of SD 4 for exynos4x12-pinctrl ARM: SAMSUNG: Silence empty switch warning in fimc-core.h ARM: SAMSUNG: Silence empty switch warning in sdhci.h ARM: msm: proc_comm_boot_wait should not be __init arm: vt8500: Update MAINTAINERS entry for arch-vt8500 ARM: integrator: ensure ap_syscon_base is initialised when !CONFIG_MMU ARM: S5PV210: Fix early uart output in fifo mode ...
2013-02-21Merge tag 'driver-core-3.9-rc1' of ↵Linus Torvalds12-52/+40
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core patches from Greg Kroah-Hartman: "Here is the big driver core merge for 3.9-rc1 There are two major series here, both of which touch lots of drivers all over the kernel, and will cause you some merge conflicts: - add a new function called devm_ioremap_resource() to properly be able to check return values. - remove CONFIG_EXPERIMENTAL Other than those patches, there's not much here, some minor fixes and updates" Fix up trivial conflicts * tag 'driver-core-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (221 commits) base: memory: fix soft/hard_offline_page permissions drivercore: Fix ordering between deferred_probe and exiting initcalls backlight: fix class_find_device() arguments TTY: mark tty_get_device call with the proper const values driver-core: constify data for class_find_device() firmware: Ignore abort check when no user-helper is used firmware: Reduce ifdef CONFIG_FW_LOADER_USER_HELPER firmware: Make user-mode helper optional firmware: Refactoring for splitting user-mode helper code Driver core: treat unregistered bus_types as having no devices watchdog: Convert to devm_ioremap_resource() thermal: Convert to devm_ioremap_resource() spi: Convert to devm_ioremap_resource() power: Convert to devm_ioremap_resource() mtd: Convert to devm_ioremap_resource() mmc: Convert to devm_ioremap_resource() mfd: Convert to devm_ioremap_resource() media: Convert to devm_ioremap_resource() iommu: Convert to devm_ioremap_resource() drm: Convert to devm_ioremap_resource() ...
2013-02-20Merge tag 'pinctrl-for-v3.9' of ↵Linus Torvalds26-115/+8627
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pinctrl changes from Linus Walleij: "These are the main pinctrl changes for the v3.9 merge window. The most interesting change by far is how the device core grabs pinctrl default handles avoiding the need to stick boilerplate into driver consumers. - Grabbing of default pinctrl handles from the device core. These are the hunks hitting drivers/base. All is ACKed by Greg, after a long discussion about different alternatives. - Some stuff also touches the MFD and ARM SoC trees, this has been coordinated and ACKed. - New drivers for: - The Tegra 114 sub-SoC - Allwinner sunxi - New ABx500 driver and sub-SoC drivers for AB8500, AB8505, AB9540 and AB8540. - Make it possible for hogged pins to enter a sleep mode, and make it possible for drivers to control that mode. - Various clean-up, extensions and device tree support to various pin controllers." * tag 'pinctrl-for-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (68 commits) pinctrl: tegra: add clfvs function to Tegra114 support pinctrl: generic: rename input schmitt disable pinctrl/pinconfig: add debug interface pinctrl: samsung: remove duplicated line ARM: ux500: use real AB8500 IRQ numbers instead of virtual ones ARM: ux500: remove irq_base property from platform_data pinctrl/abx500: use direct IRQ defines pinctrl/abx500: replace IRQ offsets with table read-in values pinctrl/abx500: move IRQ handling to ab8500-core pinctrl: exynos5440: remove erroneous __init pinctrl/abx500: adjust offset for get_mode() pinctrl/abx500: add Device Tree support pinctrl/abx500: align GPIO cluster boundaries pinctrl/abx500: prevent error path from corrupting returning error pinctrl: sunxi: add of_xlate function pinctrl/lantiq: fix pin number in ltq_pmx_gpio_request_enable pinctrl/lantiq: add functionality to falcon_pinconf_dbg_show pinctrl/lantiq: fix pinconfig parameters pinctrl/lantiq: one of the boot leds was defined incorrectly pinctrl/lantiq: only probe available pad controllers ...
2013-02-16sh-pfc: sh_pfc_probe() sizeof() fixMagnus Damm1-1/+1
Fix sizeof() usage in sh-pfc/core.c to allocate space for the full data structure instead of a pointer. Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-02-15pinctrl: tegra: add clfvs function to Tegra114 supportRhyland Klein1-5/+17
This patch adds the definition for the cldvfs function for Tegra114 pinctrl support. This is based on work by Pritesh Raithatha. Signed-off-by: Rhyland Klein <rklein@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-15pinctrl: generic: rename input schmitt disableHaojian Zhuang1-1/+1
Rename PIN_CONFIG_INPUT_SCHMITT_DISABLE to PIN_CONFIG_INPUT_SCHMITT_ENABLE. It's used to make it more generialize. Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-12Merge branch 'fixes-for-3.9' into next/fixes-non-criticalOlof Johansson1-2/+2
This is a branch of fixes that originally were scheduled for 3.8 but due to the request from Linus to hold back on all but the most critical of fixes, we're re-queueing them for 3.9 here. * fixes-for-3.9: ARM: dts: imx6: fix fec ptp clock slow 10 time ARM: highbank: mask cluster id from cpu_logical_map ARM: scu: mask cluster id from cpu_logical_map ARM: scu: add empty scu_enable for !CONFIG_SMP ARM: at91/at91sam9x5.dtsi: fix usart3 TXD ARM: at91: at91sam9x5: fix usart3 pinctrl name ARM: EXYNOS: Fix crash on soft reset on EXYNOS5440 ARM: dts: fix tick and alarm irq numbers for exynos5440 ARM: dts: fix compatible value for exynos pinctrl ARM: dts: Fix compatible value of pinctrl module on EXYNOS5440 ARM: S3C24XX: fix uninitialized variable warning mfd/vexpress: vexpress_sysreg_setup must not be __init ARM: ux500: Fix u9540 booting issues arm: mvebu: i2c come back in defconfig arm: plat-orion: fix printing of "MPP config unavailable on this hardware" Dove: activate GPIO interrupts in DT ARM: ux500: add spin_unlock(&master_lock). ARM: ux500: Disable Power Supply and Battery Management by default Signed-off-by: Olof Johansson <olof@lixom.net>
2013-02-10pinctrl/pinconfig: add debug interfaceLaurent Meunier3-17/+227
This update adds a debugfs interface to modify a pin configuration for a given state in the pinctrl map. This allows to modify the configuration for a non-active state, typically sleep state. This configuration is not applied right away, but only when the state will be entered. This solution is mandated for us by HW validation: in order to test and verify several pin configurations during sleep without recompiling the software. Signed-off-by: Laurent Meunier <laurent.meunier@st.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-10pinctrl: samsung: remove duplicated lineJingoo Han1-1/+0
This patch removes duplicated line of samsung_pinctrl_register(), because the number of pins is redundantly assigned twice. Reviewed-by: Tomasz Figa <t.figa@samsung.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-10pinctrl/abx500: use direct IRQ definesLinus Walleij5-17/+16
Make it harder to do mistakes by introducing the actual defined ABx500 IRQ number into the IRQ cluster definitions. Deduct cluster offset from the GPIO offset to make each cluster coherent. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-10pinctrl/abx500: replace IRQ offsets with table read-in valuesLee Jones6-25/+32
The ABx500 GPIO controller used to provide a set of virtual contiguous IRQs for use by sub-devices, but they have been removed after a request from Mainline Maintainers. Now the AB8500 core driver deals with almost all IRQ related issues instead. The ABx500 GPIO driver is now only used to convert between GPIO and IRQ numbers which is actually quite difficult, as the ABx500 GPIO's associated IRQs are clustered together throughout the interrupt number space at irregular intervals. To solve this quandary, we have placed the read-in values into the existing cluster information table to use during conversion. Signed-off-by: Lee Jones <lee.jones@linaro.org> [Moved irq_base removal into this patch] Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-10pinctrl/abx500: move IRQ handling to ab8500-coreLee Jones1-296/+3
In its current state the gpio-ab8500 driver looks after some GPIO lines found on the AB8500 MFD chip. It also controls all of its own IRQ handling for these GPIOs by inventing some virtual IRQs and handing those out to sub-devices. There has been quite a bit of controversy over this and it was a contributing factor to the driver being marked as BROKEN in Mainline. The reason for adopting this method was due to added complexity in the hardware. Unusually, each GPIO has two separate IRQs associated with it, one for a rising and a different one for a falling interrupt. Using this method complicates matters further because the GPIO IRQs are actually sandwiched between a bunch of IRQs which are handled solely by the AB8500 core driver. The best way for us to take this forward is to get rid of the virtual IRQs and only hand out the rising IRQ lines. If a sub-driver wishes to request a falling interrupt, they can do so by requesting a rising line in the normal way. They just have to add IRQ_TYPE_EDGE_FALLING or IRQ_TYPE_EDGE_BOTH, if they require both in the flags. Then if a falling IRQ is triggered, the AB8500 core driver will know how to handle the added complexity accordingly. This should greatly simply things. Signed-off-by: Lee Jones <lee.jones@linaro.org> [Augment to keep irq_base for a while (removed later)] Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-08Merge branch 'allwinner-sunxi' into develLinus Walleij4-0/+1989
2013-02-07pinctrl: exynos5440: remove erroneous __initLinus Walleij1-5/+5
This removes the __init notation from some of the the exynos 5440 pin controller set-up functions. These functions are called from probe() and as such may be discarded before probe() completes. Cc: Thomas Abraham <thomas.abraham@linaro.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-07pinctrl/abx500: adjust offset for get_mode()Linus Walleij1-1/+3
The set_mode() and get_mode() functions in the abx500 were not mirrored, leading to the wrong GPIO control bits being read out. Cc: Lee Jones <lee.jones@linaro.org> Reported-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-06pinctrl/abx500: add Device Tree supportLee Jones1-5/+31
This patch will allow the ABX500 Pinctrl driver to be probed when Device Tree is enabled with an appropriate node contained. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-06pinctrl/abx500: align GPIO cluster boundariesLee Jones5-16/+18
Not quite sure how this ever worked. In ab8500_gpio_to_irq() the GPIO for conversion is passed through as the second argument. If GPIO13, which is a valid GPIO for IRQ functionality, was received; it would be rejected by the following guard: GPIO_IRQ_CLUSTER(5, 12, 0); /* GPIO numbers start from 1 */ if (offset >= cluster->start && offset <= cluster->end) /* Valid GPIO for IRQ use */ Signed-off-by: Lee Jones <lee.jones@linaro.org> [Augmented to account for off-by-one problem] Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-06pinctrl/abx500: prevent error path from corrupting returning errorLee Jones1-4/+5
Prior to this patch abx500_gpio_probe() would return the return-value of gpiochip_remove() during its error patch regardless of what the actual failure was. So as long as gpiochip_remove() succeeded, probe() would look like it succeeded too. This patch ensures the correct error value is returned and that mutex_destroy() is invoked if gpiochip_add_pin_range() were to fail. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-05pinctrl: sunxi: add of_xlate functionMaxime Ripard1-0/+20
Since the pin controller of sunxi chips is represented as a single bank in the driver. Since this is neither convenient nor represented that way in the datasheets, define a custom of_xlate function with the layout <bank pin flag> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-05pinctrl/lantiq: fix pin number in ltq_pmx_gpio_request_enableJohn Crispin1-1/+1
The mapping logic inside ltq_pmx_gpio_request_enable() was broken. This only effected Falcon SoC. Signed-off-by: Thomas Langer <thomas.langer@lantiq.com> Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-05pinctrl/lantiq: add functionality to falcon_pinconf_dbg_showJohn Crispin1-0/+31
The current code only has a stub for falcon_pinconf_dbg_show. This patch adds proper functionality. Signed-off-by: Thomas Langer <thomas.langer@lantiq.com> Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-05pinctrl/lantiq: fix pinconfig parametersJohn Crispin1-0/+2
The Falcon driver only defined the pinconf parameters but did not pass them properly to the underlying api. Signed-off-by: Thomas Langer <thomas.langer@lantiq.com> Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-05pinctrl/lantiq: one of the boot leds was defined incorrectlyJohn Crispin1-1/+1
On the Falcon SoC the bootleds are located on pins 9->14. Signed-off-by: Thomas Langer <thomas.langer@lantiq.com> Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-05pinctrl/lantiq: only probe available pad controllersJohn Crispin1-0/+3
The template falcon.dtsi lists all 6 pad controllers that can be loaded. Only probe those that have status = "okay"; inside the dts file. Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-05pinctrl/lantiq: the pinconf OD parameter argument was ignoredJohn Crispin1-1/+4
When setting the OpenDrain bit we should really honour the argument passed inside the devicetree. Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-05pinctrl/lantiq: add output pinconf parameterJohn Crispin2-0/+15
While converting the boards inside OpenWrt to OF I noticed that the we are missing a pinconf parameter to set a pin to output. Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-05pinctrl/lantiq: add pin_config_group_set supportJohn Crispin2-20/+49
While converting all the boards supported by OpenWrt to OF I noticed that this feature is missing. Adding it makes the devicetrees more readable. Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-05pinctrl/lantiq: faulty bit inversionJohn Crispin1-1/+1
The logic of the OD bit was inverted when calling the pinconf get method. Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-05pinctrl/lantiq: pinconf uses port instead of pinJohn Crispin1-14/+14
The XWAY pinctrl driver invalidly uses the port and not the pin number to work out the registers and bits to be set for the opendrain and pullup/down resistors. Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-05pinctrl: sirf: replace of_gpio_simple_xlate by sirf specific of_xlateBarry Song1-0/+18
the default of_gpio_simple_xlate() will make us fail while getting gpios bigger than 32 by of_get_named_gpio() or related APIs. this patch adds a specific of_xlate callback for sirf gpio_chip and fix the problem. Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-05pinctrl: exynos: change PINCTRL_EXYNOS optionKukjin Kim2-3/+3
Since pinctrl-exynos can support exynos4 and exynos5 so changed the option name to PINCTRL_EXYNOS for more clarity. Cc: Thomas Abraham <Thomas.abraham@linaro.org> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-05pinctrl/abx500: destroy mutex if returning early due to errorLee Jones1-0/+3
Current failure path neglects to mutex_destroy() before returning an error due to an invalid parameter or an error received from gpiochip_add(). This patch aims to remedy that behaviour. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-05pinctrl/abx500: beautify the ABX500 pin control driverLee Jones1-35/+59
This patch provides some superficial changes to the driver to aid with readability and maintainability. We're mostly fixing things like white-space errors, spreading out code which as been clumped together impeding readability and comment layout, such as using the new "/**" comment start for function headers etc. No code semantics were harmed in the making of this patch. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-05pinctrl/abx500: replace incorrect return valueLee Jones1-2/+1
Currently in the empty abx500_pin_config_get() function, we're returning -EINVAL, with a comment stating that the reason for the failure is that the function isn't implemented yet. Well there's a proper return code for that. If we use it, we can do away with the comment too, as it would be implied. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-05pinctrl/abx500: use the BIT() macro where appropriateLee Jones1-1/+1
The BIT() macro provides a simple and easy to read way of obtaining bit offsets into things like masks and hardware registers. In this patch we're simply replacing all instances of '1 << x' with 'bit(x)'. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-05pinctrl/abx500: add AB8540 sub-driverPatrice Chotard5-0/+427
Add AB8540 sub driver to the ABx500 family, pins, pin groups and gpio range. As the pin controller (also the ABx500 controllers) is an inherent part of the SoC and will prevent boot if not available, select this from the Ux500 SoC Kconfig. Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Patrice Chotard <patrice.chotard@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-05pinctrl/abx500: add AB9540 sub-driverPatrice Chotard5-0/+506
Add AB9540 sub driver to the ABx500 family, pins, pin groups and gpio range. As the pin controller (also the ABx500 controllers) is an inherent part of the SoC and will prevent boot if not available, select this from the Ux500 SoC Kconfig. Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Patrice Chotard <patrice.chotard@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-05pinctrl/abx500: add AB8505 sub-driverPatrice Chotard5-0/+401
Add AB8505 sub driver to the ABx5x family. As the pin controller (also the ABx500 controllers) is an inherent part of the SoC and will prevent boot if not available, select this from the Ux500 SoC Kconfig. Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Patrice Chotard <patrice.chotard@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-04Merge tag 'v3.8-rc6' into next/dtOlof Johansson7-94/+17
Linux 3.8-rc6
2013-02-01ARM: pinctrl: sunxi: Add the pinctrl pin set for Allwinner A10Maxime Ripard2-0/+622
Since the Allwinner SoCs variants don't have the same set of pins to handle, we need to declare the pin ranges available. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-01pinctrl: sunxi: Document sun5i pins functionsMaxime Ripard1-4/+4
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>