aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/sh-pfc
Commit message (Collapse)AuthorAge
* Merge tag 'v3.11-rc7' into develLinus Walleij2013-08-29
|\ | | | | | | | | | | | | | | | | | | 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
| * pinctrl: sh-pfc: fix SDHI0 VccQ regulator on sh73a0 with DTGuennadi Liakhovetski2013-07-22
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | pinctrl: sh-pfc: remove unnecessary platform_set_drvdata()Jingoo Han2013-08-28
| | | | | | | | | | | | | | | | | | | | The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* | pinctrl: Pass all configs to driver on pin_config_set()Sherman Yin2013-08-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When setting pin configuration in the pinctrl framework, pin_config_set() or pin_config_group_set() is called in a loop to set one configuration at a time for the specified pin or group. This patch 1) removes the loop and 2) changes the API to pass the whole pin config array to the driver. It is now up to the driver to loop through the configs. This allows the driver to potentially combine configs and reduce the number of writes to pin config registers. All c files changed have been build-tested to verify the change compiles and that the corresponding .o is successfully generated. Signed-off-by: Sherman Yin <syin@broadcom.com> Reviewed-by: Christian Daudt <csd@broadcom.com> Reviewed-by: Matt Porter <matt.porter@linaro.org> Tested-by: Stephen Warren <swarren@nvidia.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* | sh-pfc: r8a7790: Add DU pin groups and functionsLaurent Pinchart2013-08-14
| | | | | | | | | | Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* | sh-pfc: r8a7790: Rename DU1_DOTCLKIN to DU_DOTCLKIN1Laurent Pinchart2013-08-14
| | | | | | | | | | | | | | Name the DU clock input 1 consistently with clock inputs 0 and 2. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* | Merge branch 'pinmux/next/fixes' of git://linuxtv.org/pinchartl/fbdev into develLinus Walleij2013-07-29
|\ \ | | | | | | | | | Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | sh-pfc: r8a7790: Add VIN pin groups and functionsShinobu Uehara2013-07-29
| | | | | | | | | | | | | | | | | | Signed-off-by: Shinobu Uehara <shinobu.uehara.xc@renesas.com> Signed-off-by: Ryo Kataoka <ryo.kataoka.wt@renesas.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| * | sh-pfc: r8a7790: Add USB pin groups and functionsShinobu Uehara2013-07-29
| | | | | | | | | | | | | | | | | | Signed-off-by: Shinobu Uehara <shinobu.uehara.xc@renesas.com> Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| * | sh-pfc: r8a7790: Add SCIF2 pin groups and functionsLaurent Pinchart2013-07-29
| | | | | | | | | | | | Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| * | sh-pfc: r8a7790: Add MSIOF pin groups and functionsKunihito Higashiyama2013-07-29
| | | | | | | | | | | | | | | | | | Signed-off-by: Kunihito Higashiyama <kunihito.higashiyama.ur@renesas.com> Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| * | sh-pfc: r8a7790: Sort pin groups and functions alphabeticallyLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | | | | | | | | Navigating through the source code is hard enough without having to manually search for groups and functions. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| * | sh-pfc: r8a7790: Fix miscellaneous pinmux configuration tables mistakesShinya Kuribayashi2013-07-29
| | | | | | | | | | | | | | | | | | | | | | | | Fix erroneous entries in the pinmux configuration tables that affect HSCIF, I2C, LBSC, SCIF, SSI and VIN operation. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| * | sh-pfc: r8a7790: Add SCIF2 pins configuration supportShinya Kuribayashi2013-07-29
| | | | | | | | | | | | | | | | | | | | | | | | Update the pinmux configuration tables to support the SCIF2 pins (TX2/TX2_B, RX2/RX2_B, SCK2). Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| * | sh-pfc: r8a7790: Add TCLK1 pin configuration supportShinya Kuribayashi2013-07-29
| | | | | | | | | | | | | | | | | | | | | Update the pinmux configuration tables to support the TCLK1 pin. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| * | sh-pfc: r8a7790: Swap SCIFA2_RXD_B and HRX0_C configurationsShinya Kuribayashi2013-07-29
| | | | | | | | | | | | | | | | | | | | | | | | The SCIFA2 RXD_B and HRX0_C pins have their pinmux configuration data swapped, fix it. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| * | sh-pfc: r8a7790: Remove deprecated SPV_EVEN pinShinya Kuribayashi2013-07-29
| | | | | | | | | | | | | | | | | | | | | The pins have been removed from the datasheet, remove them here as well. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| * | sh-pfc: r8a7790: Remove deprecated RDS pinsShinya Kuribayashi2013-07-29
| | | | | | | | | | | | | | | | | | | | | The pins have been removed from the datasheet, remove them here as well. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| * | sh-pfc: r8a7790: Remove deprecated Ethernet MII/RMII pinsShinya Kuribayashi2013-07-29
| | | | | | | | | | | | | | | | | | | | | The pins have been removed from the datasheet, remove them here as well. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| * | sh-pfc: r8a7790: Remove trailing '_TANS' string from RTS/CTS pinsShinya Kuribayashi2013-07-29
| | | | | | | | | | | | | | | | | | | | | | | | The RTS/CTS pins have been renamed in the datasheet, rename them here as well. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| * | sh-pfc: r8a7790: Rename I2C SDA/SCL pinsShinya Kuribayashi2013-07-29
| | | | | | | | | | | | | | | | | | | | | | | | The I2C pins have been renamed in the datasheet, rename them here as well. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| * | sh-pfc: r8a7779: Add I2C pin groupsPhil Edworthy2013-07-29
| | | | | | | | | | | | | | | | | | | | | Add all I2C pin groups to R8A7779 PFC driver. Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| * | sh-pfc: sh73a0: Remove EXT_IRQ16L and EXT_IRQ16H macrosLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | sh-pfc: sh7372: Replace <mach/irqs.h> with <linux/sh_intc.h>Laurent Pinchart2013-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | The mach/irqs.h header is included only to get the evt2irq macro definition. The macro is defined in linux/sh_intc.h, include it directly instead of the mach-specific header. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Magnus Damm <damm@opensource.se>
| * | sh-pfc: Remove unneeded mach/<soc>.h includesLaurent Pinchart2013-07-29
| |/ | | | | | | | | | | | | | | The SoC-specific mach/<soc>.h headers are included needlesly. Don't include them. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Magnus Damm <damm@opensource.se>
* | sh-pfc: Support pins not associated with a GPIO portLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | sh-pfc: Compute pin ranges automaticallyLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | | | | | 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>
* | sh-pfc: Rename struct sh_pfc nr_pins field to nr_gpio_pinsLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | | | | | | | The field contains the number of pins with an associated GPIO port. This is currently equal to the total number of pins but will be modified when adding support for pins without a GPIO port. Rename the field accordingly. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
* | sh-pfc: Add pin number to struct sh_pfc_pinLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | | | The pin number is usually equal to the GPIO number but can differ when GPIO numbering is sparse. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
* | sh-pfc: Pass the pin number down to the port function macroLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | | | | | The PORT_1 macro invokes a macro passed as a parameter. Pass the pin number down to that macro at the bottom of the call stack. This 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>
* | sh-pfc: Add port numbers to the CPU_ALL_PORT macroLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | | | 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>
* | sh-pfc: Don't duplicate argument to PINMUX_GPIO macroLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | | | | | The PINMUX_GPIO macro takes a port name and a data mark, respectively of the form GPIO_name and name_DATA. Modify the macro to take the name as a single argument and derive the port name and data mark from it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
* | sh-pfc: shx3: Remove shx3_ prefix from static symbolsLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | | | Unlike all other PFC SoC data, the shx3 data prefix all static symbols with shx3_. Remove the prefix to be consistent with the other source files. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* | sh-pfc: sh7734: Use the common GP port style macrosLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | The SoC has a bank-style PFC. Replace the custom-defined macros with common macros from sh-pfc.h. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* | sh-pfc: Consolidate pin definition macrosLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | 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>
* | sh-pfc: Consolidate PFC SoC data macrosLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | | | 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>
* | sh-pfc: Rename gpio arguments to be consistent with the rest of the codeLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | | | | | | | The gpio_get_data_reg() and gpio_setup_data_reg() functions both take an argument named gpio. The argument contains a GPIO offset for the first function and a pin index for the second one. Rename them to offset and idx respectively to match the rest of the code. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
* | sh-pfc: Replace pinmux_enum_id typedef with u16Laurent Pinchart2013-07-29
| | | | | | | | | | | | | | | | | | | | 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>
* | sh-pfc: Don't overallocate memory for the GPIO chip pins arrayLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | | | | | | | The GPIO driver uses an array of sh_pfc_gpio_pin structures to store per-GPIO pin data. The array size is miscomputed at allocation time by using the number of the last pin instead of the number of pins. When the pin space contains holes this leads to memory overallocation. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
* | sh-pfc: Remove unused GPIO_PORT_ALL macroLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | The macro isn't used, remove it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
* | sh-pfc: Remove unneeded const keywordsLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | | | Two integer field structures are needlesly defined as const. Remove the const keyword. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
* | sh-pfc: Remove unused macro and enum entriesLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | | | The SH_PFC_MARK_INVALID macro and the PINMUX_FLAG_TYPE, GPIO_CFG_REQ and GPIO_CFG_FREE enum entries are used, remove them. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
* | sh-pfc: Remove unused PORT_DATA_* macrosLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | Most of the PORT_DATA_* macros are not used, remove them. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
* | sh-pfc: Remove unused input_pd and input_pu rangesLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | The ranges are not used anymore, remove them. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
* | sh-pfc: shx3: Remove unused input_pu rangeLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | | | | | | | | | | | The PFC SHX3 SoC data contains a input_pu range used to configure pull-up resistors using the legacy non-pinconf API. That API has been removed from the driver, the range is thus not used anymore. Remove it. If required, configuring pull-up resistors for the SHX3 can be implemented using the pinconf API, as done for the SH-Mobile, R-Mobile and R-Car platforms. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* | sh-pfc: sh7786: Remove unused input_pu rangeLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | | | | | | | | | | | The PFC SH7786 SoC data contains a input_pu range used to configure pull-up resistors using the legacy non-pinconf API. That API has been removed from the driver, the range is thus not used anymore. Remove it. If required, configuring pull-up resistors for the SH7786 can be implemented using the pinconf API, as done for the SH-Mobile, R-Mobile and R-Car platforms. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* | sh-pfc: sh7785: Remove unused input_pu rangeLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | | | | | | | | | | | The PFC SH7785 SoC data contains a input_pu range used to configure pull-up resistors using the legacy non-pinconf API. That API has been removed from the driver, the range is thus not used anymore. Remove it. If required, configuring pull-up resistors for the SH7785 can be implemented using the pinconf API, as done for the SH-Mobile, R-Mobile and R-Car platforms. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* | sh-pfc: sh7757: Remove unused input_pu rangeLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | | | | | | | | | | | The PFC SH7757 SoC data contains a input_pu range used to configure pull-up resistors using the legacy non-pinconf API. That API has been removed from the driver, the range is thus not used anymore. Remove it. If required, configuring pull-up resistors for the SH7757 can be implemented using the pinconf API, as done for the SH-Mobile, R-Mobile and R-Car platforms. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* | sh-pfc: sh7724: Remove unused input_pu rangeLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | | | | | | | | | | | The PFC SH7724 SoC data contains a input_pu range used to configure pull-up resistors using the legacy non-pinconf API. That API has been removed from the driver, the range is thus not used anymore. Remove it. If required, configuring pull-up resistors for the SH7724 can be implemented using the pinconf API, as done for the SH-Mobile, R-Mobile and R-Car platforms. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* | sh-pfc: sh7723: Remove unused input_pu rangeLaurent Pinchart2013-07-29
| | | | | | | | | | | | | | | | | | | | | | | | The PFC SH7723 SoC data contains a input_pu range used to configure pull-up resistors using the legacy non-pinconf API. That API has been removed from the driver, the range is thus not used anymore. Remove it. If required, configuring pull-up resistors for the SH7723 can be implemented using the pinconf API, as done for the SH-Mobile, R-Mobile and R-Car platforms. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>