Commit 50d1ba17 authored by Ulrich Hecht's avatar Ulrich Hecht Committed by Geert Uytterhoeven

pinctrl: sh-pfc: Add physical pin multiplexing helper macros

Used by I2C controllers 0, 3 and 5 in R8A7795 and R8A7796 SoCs.
Signed-off-by: default avatarUlrich Hecht <uli+renesas@fpond.eu>
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
parent 341fe389
...@@ -386,6 +386,28 @@ extern const struct sh_pfc_soc_info shx3_pinmux_info; ...@@ -386,6 +386,28 @@ extern const struct sh_pfc_soc_info shx3_pinmux_info;
#define PINMUX_IPSR_MSEL(ipsr, fn, msel) \ #define PINMUX_IPSR_MSEL(ipsr, fn, msel) \
PINMUX_DATA(fn##_MARK, FN_##msel, FN_##fn, FN_##ipsr) PINMUX_DATA(fn##_MARK, FN_##msel, FN_##fn, FN_##ipsr)
/*
* Describe a pinmux configuration similar to PINMUX_IPSR_MSEL, but with
* an additional select register that controls physical multiplexing
* with another pin.
* - ipsr: IPSR field
* - fn: Function name, also referring to the IPSR field
* - psel: Physical multiplexing selector
* - msel: Module selector
*/
#define PINMUX_IPSR_PHYS_MSEL(ipsr, fn, psel, msel) \
PINMUX_DATA(fn##_MARK, FN_##psel, FN_##msel, FN_##fn, FN_##ipsr)
/*
* Describe a pinmux configuration in which a pin is physically multiplexed
* with other pins.
* - ipsr: IPSR field
* - fn: Function name, also referring to the IPSR field
* - psel: Physical multiplexing selector
*/
#define PINMUX_IPSR_PHYS(ipsr, fn, psel) \
PINMUX_DATA(fn##_MARK, FN_##psel)
/* /*
* Describe a pinmux configuration for a single-function pin with GPIO * Describe a pinmux configuration for a single-function pin with GPIO
* capability. * capability.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment