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

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

Merge "led: leds-qpnp-wled: add support for qpnp wled"

parents de250947 5260dc38
Loading
Loading
Loading
Loading
+79 −0
Original line number Diff line number Diff line
Qualcomm Technologies QPNP WLED

QPNP (Qualcomm Technologies Plug N Play) WLED (White Light
Emitting Diode) driver is used for controlling display
backlight that is part of PMIC on Qualcomm Technologies
reference platforms. The PMIC is connected to the host
processor via SPMI bus.

Required properties:
- compatible		: should be "qcom,qpnp-wled"
- reg			: base address and size for wled modules
- reg-names		: names associated with base addresses. It
			should be "qpnp-wled-ctrl-base", "qpnp-wled-sink-base",
			"qpnp-wled-ibb-base", "qpnp-wled-lab-base".

Optional properties for WLED:
- linux,name		: name of the wled. default is "wled".
- linux,default-trigger	: trigger for the backlight. default is NONE.
- qcom,fdbk-output	: string feedback current output for wled module. The accepted values
			  are "wled1", "wled2", "wled3", "wled4" and "auto". default is "auto".
- qcom,vref-mv		: maximum reference voltage in mv. default is 350.
- qcom,switch-freq-khz	: switch frequency in khz. default is 800.
- qcom,ovp-mv		: over voltage protection value in mv. default is 17800.
- qcom,ilim-ma		: maximum current limiter in ma. default is 980.
- qcom,boost-duty-ns	: maximum boost duty cycle in ns. default is 104.
- qcom,mod-freq-khz	: modulation frequency in khz. default is 19200.
- qcom,dim-mode		: dimming mode. supporting dimming modes are "analog",
			  "digital", and "hybrid". default is "hybrid".
- qcom,dim-method	: dimming method. supported dimming methods are "log", "square",
			  and "linear". default is "linear".
- qcom,hyb-thres	: threshold value when used in hybrid mode. It represents the
			  percentage of brightntess at which dimming mode is switched
			  from "digital" to "analog". the default value is 6.25%. as the
			  floating point cannot be represented directly, the value is
			  multiplied by 100. so the default is 625.
- qcom,sync-dly-us	: delay for current sync in us. default is 400.
- qcom,fs-curr-ua	: maximum full scale current in ua. default is 25000.
- qcom,en-9b-dim-res	: boolean, specify if 9-bit dim resultion is needed. otherwise 12-bit is used.
- qcom,en-phase-stag	: boolean, specify if phase staggering is needed.
- qcom,en-cabc		: boolean, specify if cabc (content adaptive backlight control) is needed.
- qcom,ibb-bias-active	: boolean, specify to activate the bias
- qcom,lab-fast-precharge: boolean, specify to activate the fast precharge
- qcom,disp-type-amoled	: specify if the display is amoled
- qcom,led-strings-list	: Wled module has four strings of leds numbered from 0 to 3. each string of leds
			  are operated individually. specify the list of strings used by the device.
			  any combination of led strings can be used. default value is [00 01 02 03]

Example:
	qcom,leds@d800 {
		compatible = "qcom,qpnp-wled";
		reg = <0xd800 0x100>,
			<0xd900 0x100>,
			<0xdc00 0x100>,
			<0xde00 0x100>;
		reg-names = "qpnp-wled-ctrl-base",
			"qpnp-wled-sink-base",
			"qpnp-wled-ibb-base",
			"qpnp-wled-lab-base";
		linux,name = "wled";
		linux,default-trigger = "bkl-trigger";
		qcom,fdbk-output = "auto";
		qcom,vref-mv = <300>;
		qcom,switch-freq-khz = <800>;
		qcom,ovp-mv = <31000>;
		qcom,ilim-ma = <1980>;
		qcom,boost-duty-ns = <52>;
		qcom,mod-freq-khz = <19200>;
		qcom,dim-mode = "hybrid";
		qcom,dim-method = "linear";
		qcom,hyb-thres = <625>;
		qcom,sync-dly-us = <800>;
		qcom,fs-curr-ua = <30000>;
		qcom,en-phase-stag;
		qcom,en-cabc;
		qcom,led-strings-list = [00 01 02 03];
		qcom,ibb-bias-active;
		qcom,lab-fast-precharge;
		qcom,disp-type-amoled;
	};
+10 −0
Original line number Diff line number Diff line
@@ -297,6 +297,16 @@ config LEDS_QPNP
	  To compile this driver as a module, choose M here: the module will
	  be called leds-qpnp.

config LEDS_QPNP_WLED
	tristate "Support for QPNP WLED"
	depends on SPMI && OF_SPMI
	help
	  This driver supports the WLED (White LED) functionality of
	  Qualcomm Technologies PNP PMIC. WLED is used for display backlight.

	  To compile this driver as a module, choose M here: the module will
	  be called leds-qpnp-wled.

config LEDS_MSM_GPIO_FLASH
	tristate "Support for GPIO Flash LEDs"
	depends on GPIO_MSM_V3
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ obj-$(CONFIG_LEDS_COBALT_RAQ) += leds-cobalt-raq.o
obj-$(CONFIG_LEDS_SUNFIRE)		+= leds-sunfire.o
obj-$(CONFIG_LEDS_PCA9532)		+= leds-pca9532.o
obj-$(CONFIG_LEDS_QPNP)			+= leds-qpnp.o
obj-$(CONFIG_LEDS_QPNP_WLED)		+= leds-qpnp-wled.o
obj-$(CONFIG_LEDS_GPIO_REGISTER)	+= leds-gpio-register.o
obj-$(CONFIG_LEDS_GPIO)			+= leds-gpio.o
obj-$(CONFIG_LEDS_LP3944)		+= leds-lp3944.o
+1523 −0

File added.

Preview size limit exceeded, changes collapsed.