Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ee9c261 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "serial: msm_geni_serial: Add support for active pinctrl state"

parents 90065a17 180caff8
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -12,9 +12,10 @@ Required properties:
- reg: Should contain UART register location and length.
- interrupts: Should contain UART core interrupts.
- clocks: clocks needed for UART, includes the core and AHB clock.
- pinctrl-names/pinctrl-0/1: The GPIOs assigned to this core. The names
  Should be "active" and "sleep" for the pin confuguration when core is active
  or when entering sleep state.
- pinctrl-names/pinctrl-0/1/2: The GPIOs assigned to this core. The names
  should be "default", "active" and "sleep" for the pin confuguration.
  It should be in "default" for the default pin configuration during probe,
  in "active" when core is active or in "sleep" when entering in sleep state.
- qcom,wrapper-core: Wrapper QUPv3 core containing this UART controller.

Optional properties:
@@ -29,9 +30,10 @@ qupv3_uart11: qcom,qup_uart@0xa88000 {
	clocks = <&clock_gcc GCC_QUPV3_WRAP0_S0_CLK>,
		<&clock_gcc GCC_QUPV3_WRAP_0_M_AHB_CLK>,
		<&clock_gcc GCC_QUPV3_WRAP_0_S_AHB_CLK>;
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&qup_1_uart_3_active>;
	pinctrl-1 = <&qup_1_uart_3_sleep>;
	pinctrl-names = "default", "active", "sleep";
	pinctrl-0 = <&qup_1_uart_3_default>;
	pinctrl-1 = <&qup_1_uart_3_active>;
	pinctrl-2 = <&qup_1_uart_3_sleep>;
	interrupts = <0 355 0>;
	qcom,wrapper-core = <&qupv3_0>;
	qcom,wakeup-byte = <0xFF>;
+14 −4
Original line number Diff line number Diff line
@@ -2467,6 +2467,15 @@ static int msm_geni_serial_probe(struct platform_device *pdev)
		ret = PTR_ERR(dev_port->serial_rsc.geni_pinctrl);
		goto exit_geni_serial_probe;
	}
	dev_port->serial_rsc.geni_gpio_active =
		pinctrl_lookup_state(dev_port->serial_rsc.geni_pinctrl,
							PINCTRL_ACTIVE);

	if (IS_ERR_OR_NULL(dev_port->serial_rsc.geni_gpio_active)) {
		/*
		 * Backward compatible : In case few chips doesn't have ACTIVE
		 * state defined.
		 */
		dev_port->serial_rsc.geni_gpio_active =
			pinctrl_lookup_state(dev_port->serial_rsc.geni_pinctrl,
							PINCTRL_DEFAULT);
@@ -2475,6 +2484,7 @@ static int msm_geni_serial_probe(struct platform_device *pdev)
			ret = PTR_ERR(dev_port->serial_rsc.geni_gpio_active);
			goto exit_geni_serial_probe;
		}
	}

	/*
	 * For clients who setup an Inband wakeup, leave the GPIO pins
+1 −0
Original line number Diff line number Diff line
@@ -82,6 +82,7 @@ struct se_geni_rsc {
};

#define PINCTRL_DEFAULT	"default"
#define PINCTRL_ACTIVE	"active"
#define PINCTRL_SLEEP	"sleep"

#define KHz(freq) (1000 * (freq))