backlight: ldim: add analog pwm support [1/1]

PD#SWPL-3702

Problem:
local dimming need analog pwm function

Solution:
add analog pwm support

Verify:
x301

Change-Id: I502bb7505947c1f3670f44d0d307f9546f1d57fd
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>

Conflicts:
	drivers/amlogic/media/vout/backlight/aml_ldim/ldim_dev_drv.c
	include/linux/amlogic/media/vout/lcd/aml_ldim.h
This commit is contained in:
Evoke Zhang
2019-01-03 06:40:26 -05:00
committed by Dongjin Kim
parent 445dee0e6b
commit 0abca5cf8f
3 changed files with 28 additions and 2 deletions

View File

@@ -979,7 +979,7 @@
bl_level_attr = <255 10 /*max, min*/
128 128>; /*mid, mid_mapping*/
bl_ctrl_method = <3>; /*1=pwm,2=pwm_combo,3=ldim*/
bl_power_attr = <0 /*en_gpio_index*/
bl_power_attr = <0xff /*en_gpio_index*/
1 0 /*on_value, off_value*/
200 200>; /*on_delay(ms), off_delay(ms)*/
bl_ldim_region_row_col = <1 1>;
@@ -989,6 +989,23 @@
*/
ldim_dev_index = <1>;
};
backlight_5{
index = <5>;
bl_name = "ldim_iw7027";
bl_level_default_uboot_kernel = <100 100>;
bl_level_attr = <255 10 /*max, min*/
128 128>; /*mid, mid_mapping*/
bl_ctrl_method = <3>; /*1=pwm,2=pwm_combo,3=ldim*/
bl_power_attr = <0 /*en_gpio_index*/
1 0 /*on_value, off_value*/
200 200>; /*on_delay(ms), off_delay(ms)*/
bl_ldim_region_row_col = <1 10>;
bl_ldim_mode = <1>; /*0=left/right side
*1=top/bottom side
*2=direct
*/
ldim_dev_index = <2>;
};
};
bl_pwm_conf:bl_pwm_conf{

View File

@@ -91,6 +91,14 @@ struct ldim_dev_config_s ldim_dev_config = {
.pwm_duty_max = 100,
.pwm_duty_min = 10,
},
.analog_pwm_config = {
.pwm_method = BL_PWM_POSITIVE,
.pwm_port = BL_PWM_MAX,
.pwm_freq = 1000,
.pwm_duty_max = 100,
.pwm_duty_min = 10,
},
.dim_range_update = NULL,
.bl_regnum = 0,

View File

@@ -26,7 +26,8 @@
/*20181101: fix ldim_op_func null mistake, add new spi api support */
/*20181203: add 50/60hz change & iw7027 error handle support */
/*20181220: add tl1 support*/
#define LDIM_DRV_VER "20181220"
/*20190103: add analog pwm support*/
#define LDIM_DRV_VER "20190103"
extern unsigned char ldim_debug_print;