History log of /drivers/pinctrl/sh-pfc/pfc-shx3.c
Revision Date Author Comments
f41a1efe63c6fc101b9c5b478c9dc22a43312b21 16-Dec-2013 Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> pinctrl: sh-pfc: sh: Constify pins and cfg_regs arrays

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>
7cbb0e55e27e6b8134813849f0cb899773d59548 15-Jul-2013 Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> sh-pfc: Don't duplicate argument to PINMUX_GPIO macro

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>
18dcc58341e4094a2799acfd1e8779a94e97fd13 15-Jul-2013 Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> sh-pfc: shx3: Remove shx3_ prefix from static symbols

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>
533743dccb517b0331eccc111e3c2b8f021559b5 15-Jul-2013 Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> sh-pfc: Replace pinmux_enum_id typedef with u16

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>
4e5ca4a1e65d6c9f7a26b8af26ec6cf1c516f31b 16-Jul-2013 Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> sh-pfc: shx3: Remove unused input_pu range

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>
cd3c1beecfeb757b16904386ea474d3c272de4ee 16-Feb-2013 Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> sh-pfc: Constify all SoC data

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>
a3db40a68a5b2f3ed2190f586bdaf3904f4933b2 02-Jan-2013 Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> sh-pfc: Rename struct pinmux_pin to struct sh_pfc_pin

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>
a373ed0aa229f06e7d699797669b664ef39d97c1 29-Nov-2012 Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> sh-pfc: Split pins and functions definition tables

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>
53f374b13413c072ec4717703479ef7d5b632f90 29-Nov-2012 Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> sh-pfc: Remove unused sh_pfc_soc_info reserved_id field

The field is unused, remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
caa5bac3b4749ae3dca1db33d648280197f91a56 29-Nov-2012 Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> sh-pfc: Replace SoC info data and mark ranges with a number of pins

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>
d7a7ca5781fa2ac40319acc7125c487db5b26d91 28-Nov-2012 Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> sh-pfc: Replace first_gpio and last_gpio with nr_gpios

The SoC information first_gpio field is always equal to 0, and the
last_gpio field is the index of the last entry in the pinmux_gpios
array. Replace the first_gpio and last_gpio fields by a nr_gpios field,
and initialize it to ARRAY_SIZE(pinmux_gpios).

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
35ad42719efcd25d310d1ad5f8b0f3a5c68e671d 28-Nov-2012 Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> sh-pfc: Use GPIO_FN instead of PINMUX_GPIO where possible

The GPIO_FN macro expands to the PINMUX_GPIO macro. The regular
expression to 'unexpand' PINMUX_GPIO to GPIO_FN is

s/\tPINMUX_GPIO(GPIO_FN_\([A-Z0-9_]*\),[ \t]*\1_MARK)/\tGPIO_FN(\1)/

This consolidates SoC-specific PFC information to use the same macros
for all SoCs.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
c3323806a67c0c656e27956b7340e37ba6c6968b 15-Dec-2012 Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> sh-pfc: Move sh_pfc.h from include/linux/ to driver directory

The header file isn't used by arch code anymore. Make it private to the
driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
d5d9a818b857346a321f52f3be050fdb7aeb6200 15-Dec-2012 Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> sh-pfc: Add shx3 pinmux support

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>