linux/drivers/pinctrl/sh-pfc
Geert Uytterhoeven 4818f44898 pinctrl: sh-pfc: Add new non-GPIO helper macros
Add new macros for describing pins without GPIO functionality:
  - NOGP_ALL() expands to a list of PIN_id values, to be used for
    generating symbolic enum values,
  - PINMUX_NOGP_ALL() expands to a list of sh_pfc_pin entries, to
    list all pins and their capabilities.
Both macros depend on an SoC-specific CPU_ALL_NOGP() macro, to be
provided by each individual SoC pin control driver.

The new macros offer two advantages over the existing SH_PFC_PIN_NAMED()
and SH_PFC_PIN_NAMED_CFG() macros:
  1. They do not rely on PIN_NUMBER() macros and physical pin numbering,
     hence do not suffer from pin numbering confusion among different
     SoC/SiP packages.
  2. They are similar in spirit to the existing scheme for handling pins
     with GPIO functionality.

Note that internal to the driver, non-GPIO pins use a sequential
numbering scheme which starts after the highest GPIO pin number in use.
This value is calculated automatically, using two new helper macros, for
systems with either 32-port bank (GP port style) or linear (PORT style)
pin space.  Sample expansion:

    GP_LAST = sizeof(union {
	char dummy[0] __attribute__((deprecated, deprecated));
	char GP_0_0[(0 * 32) + 0] __attribute__((deprecated, deprecated));
	char GP_0_1[(0 * 32) + 1] __attribute__((deprecated, deprecated));
	...
	char GP_7_3[(7 * 32) + 3] __attribute__((deprecated, deprecated));
    })

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
2019-06-04 11:19:00 +02:00
..
core.c pinctrl: sh-pfc: Validate pin tables at runtime 2019-05-21 11:07:29 +02:00
core.h pinctrl: sh-pfc: Convert to SPDX identifiers 2018-09-11 12:25:32 +02:00
gpio.c pinctrl: sh-pfc: Introduce PINCTRL_SH_FUNC_GPIO helper symbol 2019-04-02 09:57:50 +02:00
Kconfig pinctrl: sh-pfc: Allow compile-testing of all drivers 2019-04-02 09:57:50 +02:00
Makefile pinctrl: sh-pfc: Allow compile-testing of all drivers 2019-04-02 09:57:50 +02:00
pfc-emev2.c pinctrl: sh-pfc: Absorb enum IDs in PINMUX_CFG_REG_VAR() macro 2019-04-02 09:57:58 +02:00
pfc-r8a73a4.c pinctrl: sh-pfc: Add SH_PFC_PIN_CFG_PULL_UP_DOWN shorthand 2019-05-21 11:07:29 +02:00
pfc-r8a7740.c pinctrl: sh-pfc: Add SH_PFC_PIN_CFG_PULL_UP_DOWN shorthand 2019-05-21 11:07:29 +02:00
pfc-r8a7778.c pinctrl: sh-pfc: r8a7778: Use common PORT_GP_CFG_27() macro 2019-05-21 11:07:29 +02:00
pfc-r8a7779.c pinctrl: sh-pfc: Rename 2-parameter CPU_ALL_PORT() variant 2019-05-21 11:07:29 +02:00
pfc-r8a7790.c pinctrl: sh-pfc: Rename 2-parameter CPU_ALL_PORT() variant 2019-05-21 11:07:29 +02:00
pfc-r8a7791.c pinctrl: sh-pfc: Rename 2-parameter CPU_ALL_PORT() variant 2019-05-21 11:07:29 +02:00
pfc-r8a7792.c pinctrl: sh-pfc: Rename 2-parameter CPU_ALL_PORT() variant 2019-05-21 11:07:29 +02:00
pfc-r8a7794.c pinctrl: sh-pfc: Rename 2-parameter CPU_ALL_PORT() variant 2019-05-21 11:07:29 +02:00
pfc-r8a7795-es1.c pinctrl: sh-pfc: r8a7795-es1: Add TPU pins, groups and functions 2019-05-21 11:07:29 +02:00
pfc-r8a7795.c pinctrl: sh-pfc: r8a7795: Add TPU pins, groups and functions 2019-05-21 11:07:29 +02:00
pfc-r8a7796.c pinctrl: sh-pfc: r8a7796: Add TPU pins, groups and functions 2019-05-21 11:07:29 +02:00
pfc-r8a77470.c pinctrl: sh-pfc: Rename 2-parameter CPU_ALL_PORT() variant 2019-05-21 11:07:29 +02:00
pfc-r8a77965.c pinctrl: sh-pfc: r8a77965: Add TPU pins, groups and functions 2019-05-21 11:07:29 +02:00
pfc-r8a77970.c pinctrl: sh-pfc: r8a77970: Remove MMC_{CD,WP} 2019-05-21 11:07:29 +02:00
pfc-r8a77980.c pinctrl: sh-pfc: Rename 2-parameter CPU_ALL_PORT() variant 2019-05-21 11:07:29 +02:00
pfc-r8a77990.c pinctrl: sh-pfc: Move PIN_NONE to shared header file 2019-05-21 11:07:29 +02:00
pfc-r8a77995.c pinctrl: sh-pfc: Rename 2-parameter CPU_ALL_PORT() variant 2019-05-21 11:07:29 +02:00
pfc-sh73a0.c pinctrl: sh-pfc: Add SH_PFC_PIN_CFG_PULL_UP_DOWN shorthand 2019-05-21 11:07:29 +02:00
pfc-sh7203.c pinctrl: sh-pfc: Absorb enum IDs in PINMUX_DATA_REG() macro 2019-04-02 09:58:01 +02:00
pfc-sh7264.c pinctrl: sh-pfc: Absorb enum IDs in PINMUX_DATA_REG() macro 2019-04-02 09:58:01 +02:00
pfc-sh7269.c pinctrl: sh-pfc: Absorb enum IDs in PINMUX_DATA_REG() macro 2019-04-02 09:58:01 +02:00
pfc-sh7720.c pinctrl: sh-pfc: Absorb enum IDs in PINMUX_DATA_REG() macro 2019-04-02 09:58:01 +02:00
pfc-sh7722.c pinctrl: sh-pfc: Absorb enum IDs in PINMUX_DATA_REG() macro 2019-04-02 09:58:01 +02:00
pfc-sh7723.c pinctrl: sh-pfc: Absorb enum IDs in PINMUX_DATA_REG() macro 2019-04-02 09:58:01 +02:00
pfc-sh7724.c pinctrl: sh-pfc: Absorb enum IDs in PINMUX_DATA_REG() macro 2019-04-02 09:58:01 +02:00
pfc-sh7734.c pinctrl: sh-pfc: Rename 2-parameter CPU_ALL_PORT() variant 2019-05-21 11:07:29 +02:00
pfc-sh7757.c pinctrl: sh-pfc: Absorb enum IDs in PINMUX_DATA_REG() macro 2019-04-02 09:58:01 +02:00
pfc-sh7785.c pinctrl: sh-pfc: Absorb enum IDs in PINMUX_DATA_REG() macro 2019-04-02 09:58:01 +02:00
pfc-sh7786.c pinctrl: sh-pfc: Absorb enum IDs in PINMUX_DATA_REG() macro 2019-04-02 09:58:01 +02:00
pfc-shx3.c pinctrl: sh-pfc: Absorb enum IDs in PINMUX_DATA_REG() macro 2019-04-02 09:58:01 +02:00
pinctrl.c pinctrl: sh-pfc: Add SH_PFC_PIN_CFG_PULL_UP_DOWN shorthand 2019-05-21 11:07:29 +02:00
sh_pfc.h pinctrl: sh-pfc: Add new non-GPIO helper macros 2019-06-04 11:19:00 +02:00