Commit a4eb6afa authored by Geert Uytterhoeven's avatar Geert Uytterhoeven
Browse files

pinctrl: rza1: Switch to using "output-enable"



For pins requiring software driven IO output operations, the RZ/A1 Pin
Controller uses either the "output-high" or "output-low" DT property to
enable the corresponding output buffer.  The actual line value doesn't
matter, as it is ignored.

Commit 42556242 ("pinctrl: generic: Add output-enable property")
introduced a new DT property for this specific use case.

Update the RZ/A1 Pin Controller DT bindings and driver to use this new
property instead.  Preserve backwards compatibility with old DTBs in the
driver, as this comes at a very small cost.

Notes:
  - The DT binding examples already used the new property,
  - There are no upstream users of the old properties.

Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarChris Brandt <chris.brandt@renesas.com>
Acked-by: default avatarJacopo Mondi <jacopo@jmondi.org>
Acked-by: default avatarRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200821111401.4021-1-geert+renesas@glider.be
parent d89a08f5
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -117,10 +117,9 @@ function or a GPIO controller alternatively.
    - input-enable:
      enable input bufer for pins requiring software driven IO input
      operations.
    - output-high:
    - output-enable:
      enable output buffer for pins requiring software driven IO output
      operations. output-low can be used alternatively, as line value is
      ignored by the driver.
      operations.

  The hardware reference manual specifies when a pin has to be configured to
  work in bi-directional mode and when the IO direction has to be specified
+2 −1
Original line number Diff line number Diff line
@@ -928,7 +928,8 @@ static int rza1_parse_pinmux_node(struct rza1_pinctrl *rza1_pctl,
		case PIN_CONFIG_INPUT_ENABLE:
			pinmux_flags |= MUX_FLAGS_SWIO_INPUT;
			break;
		case PIN_CONFIG_OUTPUT:
		case PIN_CONFIG_OUTPUT:	/* for DT backwards compatibility */
		case PIN_CONFIG_OUTPUT_ENABLE:
			pinmux_flags |= MUX_FLAGS_SWIO_OUTPUT;
		default:
			break;