aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/sh-pfc/pfc-sh73a0.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-09-23pinctrl: sh-pfc: sh73a0: Remove unnecessary SoC data allocationLaurent Pinchart1-15/+4
The SoC data structure allocated at init time only holds a regulator pointer that is only used in the init function. Replace it with a local variable and get rid of the SoC data structure allocation altogether. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2014-09-04pinctrl: sh-pfc: rename confusing pinmux ops variableLinus Walleij1-2/+2
The vtable named *pinmux_ops in the affected files are not really about pin multiplexing, but a struct related to some PFC-specific operations, inclusing pin config (bias setting). Rename the variable so as to avoid confusions. Acked-by: Laurent Pinchart <Laurent.pinchart@ideasonboard.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2014-07-11sh-pfc: sh73a0: Introduce the use of devm_regulator_registerHimangi Saraogi1-9/+2
This patch moves data allocated using regulator_register to devm_regulator_register and does away the calls to regulator_unregister. The sh73a0_pinmux_soc_exit function is no longer needed and is removed. Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2014-05-23pinctrl: sh-pfc: sh73a0: Allow Multiplatform BuildMagnus Damm1-0/+2
Add #ifdefs to allow sh73a0 Multiplatform build. Needed to enable sh73a0 Multiplatform support. Signed-off-by: Magnus Damm <damm+renesas@opensource.se> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-12-20pinctrl: sh-pfc: ARM: Constify pins and cfg_regs arraysLaurent Pinchart1-1/+1
The arrays are never modified, declare them as const. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-12-12sh-pfc: Rename sh_pfc window field to windowsLaurent Pinchart1-4/+4
There's more than one window, name the field windows. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-12-12sh-pfc: sh73a0: Sort IRQ entries by IRQ numberLaurent Pinchart1-24/+23
This makes catching duplicate entries easier. Merge the two IRQ9 entries found after sorting. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-12-12sh-pfc: sh73a0: Add missing IRQ15Laurent Pinchart1-0/+1
The external IRQ15 input multiplexed on GPIO 0 is missing. Add it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-12-10sh-pfc: Share common PORTCR macro definitionLaurent Pinchart1-10/+0
The macro is defined identically in four different locations. Share it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-08-29Merge tag 'v3.11-rc7' into develLinus Walleij1-0/+1
Merged in this to avoid conflicts with the big locking fixes from upstream. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Conflicts: drivers/pinctrl/pinctrl-sunxi.c
2013-07-29Merge branch 'pinmux/next/fixes' of git://linuxtv.org/pinchartl/fbdev into develLinus Walleij1-36/+32
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-07-29sh-pfc: sh73a0: Remove EXT_IRQ16L and EXT_IRQ16H macrosLaurent Pinchart1-36/+32
The macros expand to irq_pin() calls and where most probably introduced from a copy&paste of the sh7372 PFC data. Replace them with irq_pin(). Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Magnus Damm <damm@opensource.se>
2013-07-29sh-pfc: Support pins not associated with a GPIO portLaurent Pinchart1-6/+9
Pins with selectable functions but without a GPIO port can't be named PORT_# or GP_#_#. Add a SH_PFC_PIN_NAMED macro to declare such pins in the pinmux pins array, naming them with the PIN_ prefix followed by the pin physical position. In order to make sure not to register those pins as GPIOs, add a SH_PFC_PIN_CFG_NO_GPIO pin flag to denote pins without a GPIO port. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
2013-07-29sh-pfc: Compute pin ranges automaticallyLaurent Pinchart1-9/+0
Remove the manually specified ranges from PFC SoC data and compute the ranges automatically. This prevents ranges from being out-of-sync with pins definitions. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
2013-07-29sh-pfc: Add port numbers to the CPU_ALL_PORT macroLaurent Pinchart1-26/+26
Pass down the port number down to the PORT_1 macro. The port number will be used to compute the pin ranges automatically. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
2013-07-29sh-pfc: Consolidate pin definition macrosLaurent Pinchart1-15/+8
Move the pin definition macros to a common header file. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
2013-07-29sh-pfc: Consolidate PFC SoC data macrosLaurent Pinchart1-4/+1
Move macros defined in several SoC data files to a common location and document them. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
2013-07-29sh-pfc: Replace pinmux_enum_id typedef with u16Laurent Pinchart1-1/+1
The typedef only conceals the real variable type without bringing any additional value (see Documentation/CodingStyle, section 5.b). Moreover, it polutes the pinmux namespace. Replace it with the integer type it used to hide. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
2013-07-22pinctrl: sh-pfc: fix SDHI0 VccQ regulator on sh73a0 with DTGuennadi Liakhovetski1-0/+1
The PFC pinctrl driver on sh73a0 is also regiatering a VccQ regulator for SDHI0. However, its consumers list only included the platform-data based SDHI device name. When booted with DT SDHI0 couldn't enable VccQ and therefore was unusable. Fix this by adding a consumer with DT-based name. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> Acked-by: Simon Horman <horms+renesas@verge.net.au> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-06-05sh-pfc: sh73a0: Remove function GPIOsLaurent Pinchart1-395/+0
No sh73a0 platform use the function GPIOs API. Remove it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-05sh-pfc: sh73a0: Add TPU pin groups and functionsLaurent Pinchart1-0/+213
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-05sh-pfc: sh73a0: Add VCCQ MC0 regulatorLaurent Pinchart1-0/+134
The sh73a0 has an internal power gate on the VCCQ power supply for the SDHI0 device that is controlled (for some strange reason) by a bit in a PFC register. This feature should be exposed as a regulator. As the same register is also used for pin control purposes there is no way to achieve atomic read/write sequences with a separate regulator driver. We thus need to implement the regulator here. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-05-04Merge tag 'renesas-pinctrl-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds1-742/+1914
Pull ARM SoC pinctrl changes for Renesas from Olof Johansson: "This is yet another driver change, which is split out just because of its size. As already in 3.9, a lot of changes are going on here, as the shmobile platform gets converted from its own pin control API to the generic drivers/pinctrl subsystem. Based on agreements with Paul Mundt, we are merging the sh-arch-side changes here as well" * tag 'renesas-pinctrl-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (142 commits) ARM: shmobile: r8a7779: Remove INTC function GPIOs ARM: shmobile: r8a7779: Remove LBSC function GPIOs ARM: shmobile: r8a7779: Remove USB function GPIOs ARM: shmobile: r8a7779: Remove HSPI function GPIOs ARM: shmobile: r8a7779: Remove SCIF function GPIOs ARM: shmobile: r8a7779: Remove SDHI and MMCIF function GPIOs ARM: shmobile: r8a7779: Remove DU function GPIOs ARM: shmobile: r8a7779: Remove DU1_DOTCLKOUT1 GPIO ARM: shmobile: r8a7740: Remove SDHI and MMCIF function GPIOs ARM: shmobile: r8a7740: Remove LCD0 and LCD1 function GPIOs ARM: shmobile: sh73a0: Remove IrDA function GPIOs ARM: shmobile: sh73a0: Remove USB function GPIOs ARM: shmobile: sh73a0: Remove BSC function GPIOs ARM: shmobile: sh73a0: Remove KEYSC function GPIOs ARM: shmobile: sh73a0: Remove pull-up function GPIOS ARM: shmobile: sh73a0: Remove FSI function GPIOs ARM: shmobile: sh73a0: Remove I2C function GPIOs ARM: shmobile: sh73a0: Remove SCIFA and SCIFB function GPIOs ARM: shmobile: sh73a0: Remove LCDC and LCDC2 function GPIOs ARM: shmobile: sh7372: Remove SDHI and MMCIF function GPIOs ...
2013-03-18ARM: shmobile: INTC External IRQ pin driver on sh73a0Magnus Damm1-3/+3
Adjust the sh73a0 IRQ code to make use of the INTC External IRQ pin driver for external interrupt pins IRQ0 -> IRQ31. This removes quite a bit of special-case code in intc-sh73a0.c but the number of lines get replaced with platform device information in setup-sh73a0.c. The PFC code is also adjusted to make gpio_to_irq() return the correct interrupt number. At this point the DT reference implementations are not covered. In the future such code shall tie in the INTC External IRQ pin driver via DT, so this kind of verbose code is not needed for the long term DT case. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-15sh-pfc: sh73a0: Remove IrDA function GPIOSLaurent Pinchart1-6/+0
All sh73a0 platforms now use the pinctrl API to control the IrDA pins, the corresponding function GPIOS are unused. Remove them. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15sh-pfc: sh73a0: Remove USB function GPIOSLaurent Pinchart1-2/+1
All sh73a0 platforms now use the pinctrl API to control the USB pins, the corresponding function GPIOS are unused. Remove them. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15sh-pfc: sh73a0: Remove BSC function GPIOSLaurent Pinchart1-27/+0
All sh73a0 platforms now use the pinctrl API to control the BSC pins, the corresponding function GPIOS are unused. Remove them. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15sh-pfc: sh73a0: Remove KEYSC function GPIOSLaurent Pinchart1-30/+0
All sh73a0 platforms now use the pinctrl API to control the KEYSC pins, the corresponding function GPIOS are unused. Remove them. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15sh-pfc: sh73a0: Remove pull-up function GPIOSLaurent Pinchart1-442/+23
All sh73a0 platforms now use the pinconf API to control pull-ups, the corresponding function GPIOS are unused. Remove them. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15sh-pfc: sh73a0: Remove FSI function GPIOSLaurent Pinchart1-36/+0
All sh73a0 platforms now use the pinctrl API to control the FSI pins, the corresponding function GPIOS are unused. Remove them. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15sh-pfc: sh73a0: Remove I2C function GPIOSLaurent Pinchart1-12/+0
All sh73a0 platforms now use the pinctrl API to control the I2C pins, the corresponding function GPIOS are unused. Remove them. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15sh-pfc: sh73a0: Remove SCIFA and SCIFB function GPIOSLaurent Pinchart1-58/+0
All sh73a0 platforms now use the pinctrl API to control the SCIFA and SCIFB pins, the corresponding function GPIOS are unused. Remove them. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15sh-pfc: sh73a0: Remove LCD and LCD2 function GPIOSLaurent Pinchart1-76/+0
All sh73a0 platforms now use the pinctrl API to control the LCD and LCD2 pins, the corresponding function GPIOS are unused. Remove them. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15sh-pfc: sh73a0: Add IrDA pin groups and functionsLaurent Pinchart1-0/+23
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15sh-pfc: sh73a0: Add USB pin groups and functionsLaurent Pinchart1-0/+14
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15sh-pfc: sh73a0: Add BSC pin groups and functionsLaurent Pinchart1-0/+124
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15sh-pfc: sh73a0: Add KEYSC pin groups and functionsLaurent Pinchart1-0/+213
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15sh-pfc: sh73a0: Add SDHI and MMCIF pin groups and functionsGuennadi Liakhovetski1-0/+194
Add pin group definitions for SDHI0, SDHI1, SDHI2 and MMCIF interfaces on sh73a0. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15sh-pfc: sh73a0: Add FSI pin groups and functionsLaurent Pinchart1-0/+244
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15sh-pfc: sh73a0: Add I2C2 and I2C3 pin groups and functionsLaurent Pinchart1-0/+64
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15sh-pfc: sh73a0: Add SCIFA and SCIFB pin groups and functionsLaurent Pinchart1-0/+351
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15sh-pfc: sh73a0: Add LCD and LCD2 pin groups and functionsLaurent Pinchart1-0/+254
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15sh-pfc: sh73a0: Add bias (pull-up/down) pinconf supportLaurent Pinchart1-1/+350
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15sh-pfc: Constify all SoC dataLaurent Pinchart1-7/+7
None of the SoC data need to be modified. Constify it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15ARM: shmobile: sh73a0: Support sparse GPIO numbersGuennadi Liakhovetski1-33/+42
The SH73A0 SoC has sparse GPIO numbers. Declare the pin numbers ranges in the PFC SoC data and use the pin numbers in the GPIO API. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15sh-pfc: Look up IRQ table entries by GPIO numberLaurent Pinchart1-32/+32
Instead of converting the GPIO number to an enum_id and looking up IRQ table entries by enum_id, replace the pinmux_irq enum_ids field with a gpios field and lookup entries using the GPIO number. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15sh-pfc: Rename struct pinmux_pin to struct sh_pfc_pinLaurent Pinchart1-1/+1
And drop the pinmux_flag_t typedef. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15sh-pfc: Split pins and functions definition tablesLaurent Pinchart1-4/+9
Split the GPIOs table into a pins table for real GPIOs and a functions table for function GPIOs. Only register pins with the pinctrl core. The function GPIOs remain accessible as GPIOs. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15sh-pfc: Remove unused sh_pfc_soc_info reserved_id fieldLaurent Pinchart1-1/+0
The field is unused, remove it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-15sh-pfc: Replace SoC info data and mark ranges with a number of pinsLaurent Pinchart1-2/+1
The data and mark ranges are only used to check whether a GPIO corresponds to a real pin or a function. As pins come first in the list of GPIOs and in the platform-specific GPIO enumerations, we can replace the data and mark ranges by a number of pins. Add an nr_pins field to struct sh_pfc_soc_info to store the number of pins implemented by the SoC, remove the data and mark range fields and introduce sh_pfc_gpio_is_pin() and sh_pfc_gpio_is_function() functions to replace range-based checks. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>