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

Commit 760e6e62 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "leds: leds-qpnp: provide pwm period when leds are set to LPG mode in DT"

parents 3d0d2371 809586f5
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -55,13 +55,15 @@ Optional properties for flash:
RGB Led is a tri-colored led, Red, Blue & Green.

Required properties for RGB led:
- qcom,mode: mode the led should operate in, options "pwm" and "lpg"
- qcom,pwm-channel: pwm channel the led will operate on
- qcom,mode: mode the led should operate in, options "pwm" and "lpg". "manual" mode is not supported for RGB led.

Required properties for PWM mode only:
- qcom,pwm-channel: pwm channel the led will operate on
- qcom,pwm-us: time the pwm device will modulate at (us)

Required properties for LPG mode only:
- qcom,pwm-channel: pwm channel the led will operate on
- qcom,pwm-us: time the pwm device will modulate at (us)
- qcom,duty-pcts: array of values for duty cycle to go through
- qcom,start-idx: starting point duty-pcts array

@@ -99,6 +101,7 @@ Required properties for PWM mode only:

Required properties for LPG mode only:
- qcom,pwm-channel: pwm channel the led will operate on
- qcom,pwm-us: time the pwm device will modulate at (us)
- qcom,duty-pcts: array of values for duty cycle to go through
- qcom,start-idx: starting point duty-pcts array

@@ -112,9 +115,7 @@ Keypad backlight is a backlight source for buttons. It supports four rows
and the required rows are enabled by specifying values in the properties.

Required properties for keypad backlight:
- qcom,mode: mode the led should operate in, options "pwm" and "lpg"
- qcom,pwm-channel: pwm channel the led will operate on
- qcom,pwm-us: time the pwm device will modulate at (us)
- qcom,mode: mode the led should operate in, options "pwm" and "lpg". "manual" mode is not supported for keypad backlight.
- qcom,row-id: specify the id of the row. Supported values are 0 to 3.

Optional properties for keypad backlight:
@@ -124,9 +125,12 @@ Optional properties for keypad backlight:
- qcom,always-on: specify if the module has to be always on

Required properties for PWM mode only:
- qcom,pwm-channel: pwm channel the led will operate on
- qcom,pwm-us: time the pwm device will modulate at (us)

Required properties for LPG mode only:
- qcom,pwm-channel: pwm channel the led will operate on
- qcom,pwm-us: time the pwm device will modulate at (us)
- qcom,duty-pcts: array of values for duty cycle to go through
- qcom,start-idx: starting point duty-pcts array

@@ -217,6 +221,7 @@ Example:
			linux,name = "led:rgb_green";
			qcom,mode = "lpg";
			qcom,pwm-channel = <5>;
			qcom,pwm-us = <1000>;
			qcom,duty-ms = <20>;
			qcom,start-idx = <1>;
			qcom,idx-len = <10>;
+1 −1
Original line number Diff line number Diff line
@@ -3237,7 +3237,7 @@ static int qpnp_get_config_pwm(struct pwm_config_data *pwm_cfg,
	else
		return rc;

	if (pwm_cfg->mode == PWM_MODE) {
	if (pwm_cfg->mode != MANUAL_MODE) {
		rc = of_property_read_u32(node, "qcom,pwm-us", &val);
		if (!rc)
			pwm_cfg->pwm_period_us = val;