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

Commit 2d969133 authored by Chun Zhang's avatar Chun Zhang Committed by Jigarkumar Kishorkumar Zala
Browse files

led: leds-qpnp-flash: change flash LED enablement method



Current flash LED enablement method glows LEDs one after another.
When it comes with battery current limit, two consecutive battery
level query causes inaccurate reading and delay in enablement,
which is not tolerable to camera and PMIC. In order to overcome
this issue, a new node is introduced as a switch, to provide
capability to glow both LEDs together. This addresses these
issues.

CRs-Fixed: 793302
Change-Id: I7e1689cc521f145bcfa3519c6f21e93d907f3408
Signed-off-by: default avatarJigarkumar Kishorkumar Zala <j_zala@codeaurora.org>
parent a5eb2c93
Loading
Loading
Loading
Loading
+21 −6
Original line number Diff line number Diff line
@@ -54,8 +54,15 @@ Optional properties:
				  when battery voltage is low
- qcom,otst2-moduled-enabled	: Boolean type. This enables driver to enable MASK to support
				OTST2 connection.
- qcom,duration			: Duration for flash LED. When duration time expires, hardware
				will turn off flash LED. Values should be from 10 ms to 1280 ms
				with 10 ms incremental step. Not applicable to torch.

Required properties inside child node. Chile node contains settings for each individual LED:
Required properties inside child node. Chile node contains settings for each individual LED.
Each LED hardware needs a node for itself and a switch node to control brightness.
For the purpose of turning on/off LED and better regulator control, "led:switch" node
is introduced. "led:switch" acquires several existing properties from other nodes for
operational simplification. For backward compatibility purpose, switch node can be optional:
- label			: type of led that will be used, either "flash" or "torch".
- qcom,led-name		: name of the LED. Accepted values are "led:flash_0",
			  "led:flash_1", "led:torch_0", "led:torch_1"
@@ -72,9 +79,6 @@ Optional properties inside child node:
- boost-supply		: flash LED boost power source for flash LED
- boost-voltage-max	: maximum voltage for flash LED boost regulator in uV. This attribute is
			: required if boost-supply is defined.
- qcom,duration		: duration for flash LED. When duration time expires, hardware
			  will turn off flash LED. Values should be from 10 ms to 1280 ms
			  with 10 ms incremental step. Not applicable to torch.

Example:
	qcom,leds@d300 {
@@ -98,6 +102,7 @@ Example:
		qcom,vph-pwr-droop-debounce-time = <10>;
		qcom,headroom-sense-ch0-enabled;
		qcom,headroom-sense-ch1-enabled;
		qcom,duration = <1280>;

		pm8226_flash0: qcom,flash_0 {
			label = "flash";
@@ -105,10 +110,8 @@ Example:
			qcom,default-led-trigger =
					"flash0_trigger";
			qcom,max-current = <1000>;
			qcom,duration = <1280>;
			qcom,id = <0>;
			qcom,current = <625>;
			boost-supply = <&pm8226_chg_boost>;
		};

		pm8226_torch: qcom,torch_0 {
@@ -122,5 +125,17 @@ Example:
			qcom,current = <120>;
			boost-voltage-max = <3600000>;
		};

		pm8226_switch: qcom,switch {
			lable = "switch";
			qcom,led-name = "led:switch";
			qcom,default-led-trigger =
					"switch_trigger";
			qcom,id = <2>;
			qcom,current = <625>;
			qcom,max-current = <1000>;
			boost-supply = <pm8226_chg_boost>;
			boost-voltage-max = <3600000>;
		};
	};
+368 −163

File changed.

Preview size limit exceeded, changes collapsed.