rkfb: select current screen in lcdc driver
[firefly-linux-kernel-4.4.55.git] / drivers / video / backlight / rk2818_backlight.h
1 /*
2  *  drivers/video/rk29_backlight.h
3  *
4  */
5
6 #ifndef __ASM_ARCH_RK2818_BACKLIGHT_H
7 #define __ASM_ARCH_RK2818_BACKLIGHT_H
8
9 ///PWM_CTRL
10 #define PWM_DIV2            (0<<9)
11 #define PWM_DIV4            (1<<9)
12 #define PWM_DIV8            (2<<9)
13 #define PWM_DIV16           (3<<9)
14 #define PWM_DIV32           (4<<9)
15 #define PWM_DIV64           (5<<9)
16 #define PWM_DIV128          (6<<9)
17 #define PWM_DIV256          (7<<9)
18 #define PWM_DIV512          (8<<9)
19 #define PWM_DIV1024         (9<<9)
20
21 #define PWM_CAPTURE         (1<<8)
22 #define PWM_RESET           (1<<7)
23 #define PWM_INTCLR          (1<<6)
24 #define PWM_INTEN           (1<<5)
25 #define PWM_SINGLE          (1<<6)
26
27 #define PWM_ENABLE          (1<<3)
28 #define PWM_TIME_EN         (1)
29
30
31 #define PWM_REG_CNTR         0x00
32 #define PWM_REG_HRC          0x04 
33 #define PWM_REG_LRC          0x08
34 #define PWM_REG_CTRL         0x0c
35
36
37 #define PWM_DIV              PWM_DIV2
38 #ifdef CONFIG_MACH_RK30_DS1001B
39 #define PWM_APB_PRE_DIV      20000
40 #else
41 #define PWM_APB_PRE_DIV      1000
42 #endif
43 #define BL_STEP              255
44
45 #endif  /* __ASM_ARCH_RK2818_BACKLIGHT_H */