~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/led-lm3530.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/linux/led-lm3530.h (Version linux-6.12-rc7) and /include/linux/led-lm3530.h (Version linux-5.16.20)


  1 /* SPDX-License-Identifier: GPL-2.0-only */         1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*                                                  2 /*
  3  * Copyright (C) 2011 ST-Ericsson SA.               3  * Copyright (C) 2011 ST-Ericsson SA.
  4  * Copyright (C) 2009 Motorola, Inc.                4  * Copyright (C) 2009 Motorola, Inc.
  5  *                                                  5  *
  6  * Simple driver for National Semiconductor LM      6  * Simple driver for National Semiconductor LM35330 Backlight driver chip
  7  *                                                  7  *
  8  * Author: Shreshtha Kumar SAHU <shreshthakuma      8  * Author: Shreshtha Kumar SAHU <shreshthakumar.sahu@stericsson.com>
  9  * based on leds-lm3530.c by Dan Murphy <D.Mur      9  * based on leds-lm3530.c by Dan Murphy <D.Murphy@motorola.com>
 10  */                                                10  */
 11                                                    11 
 12 #ifndef _LINUX_LED_LM3530_H__                      12 #ifndef _LINUX_LED_LM3530_H__
 13 #define _LINUX_LED_LM3530_H__                      13 #define _LINUX_LED_LM3530_H__
 14                                                    14 
 15 #define LM3530_FS_CURR_5mA              (0) /*     15 #define LM3530_FS_CURR_5mA              (0) /* Full Scale Current */
 16 #define LM3530_FS_CURR_8mA              (1)        16 #define LM3530_FS_CURR_8mA              (1)
 17 #define LM3530_FS_CURR_12mA             (2)        17 #define LM3530_FS_CURR_12mA             (2)
 18 #define LM3530_FS_CURR_15mA             (3)        18 #define LM3530_FS_CURR_15mA             (3)
 19 #define LM3530_FS_CURR_19mA             (4)        19 #define LM3530_FS_CURR_19mA             (4)
 20 #define LM3530_FS_CURR_22mA             (5)        20 #define LM3530_FS_CURR_22mA             (5)
 21 #define LM3530_FS_CURR_26mA             (6)        21 #define LM3530_FS_CURR_26mA             (6)
 22 #define LM3530_FS_CURR_29mA             (7)        22 #define LM3530_FS_CURR_29mA             (7)
 23                                                    23 
 24 #define LM3530_ALS_AVRG_TIME_32ms       (0) /*     24 #define LM3530_ALS_AVRG_TIME_32ms       (0) /* ALS Averaging Time */
 25 #define LM3530_ALS_AVRG_TIME_64ms       (1)        25 #define LM3530_ALS_AVRG_TIME_64ms       (1)
 26 #define LM3530_ALS_AVRG_TIME_128ms      (2)        26 #define LM3530_ALS_AVRG_TIME_128ms      (2)
 27 #define LM3530_ALS_AVRG_TIME_256ms      (3)        27 #define LM3530_ALS_AVRG_TIME_256ms      (3)
 28 #define LM3530_ALS_AVRG_TIME_512ms      (4)        28 #define LM3530_ALS_AVRG_TIME_512ms      (4)
 29 #define LM3530_ALS_AVRG_TIME_1024ms     (5)        29 #define LM3530_ALS_AVRG_TIME_1024ms     (5)
 30 #define LM3530_ALS_AVRG_TIME_2048ms     (6)        30 #define LM3530_ALS_AVRG_TIME_2048ms     (6)
 31 #define LM3530_ALS_AVRG_TIME_4096ms     (7)        31 #define LM3530_ALS_AVRG_TIME_4096ms     (7)
 32                                                    32 
 33 #define LM3530_RAMP_TIME_1ms            (0) /*     33 #define LM3530_RAMP_TIME_1ms            (0) /* Brigtness Ramp Time */
 34 #define LM3530_RAMP_TIME_130ms          (1) /*     34 #define LM3530_RAMP_TIME_130ms          (1) /* Max to 0 and vice versa */
 35 #define LM3530_RAMP_TIME_260ms          (2)        35 #define LM3530_RAMP_TIME_260ms          (2)
 36 #define LM3530_RAMP_TIME_520ms          (3)        36 #define LM3530_RAMP_TIME_520ms          (3)
 37 #define LM3530_RAMP_TIME_1s             (4)        37 #define LM3530_RAMP_TIME_1s             (4)
 38 #define LM3530_RAMP_TIME_2s             (5)        38 #define LM3530_RAMP_TIME_2s             (5)
 39 #define LM3530_RAMP_TIME_4s             (6)        39 #define LM3530_RAMP_TIME_4s             (6)
 40 #define LM3530_RAMP_TIME_8s             (7)        40 #define LM3530_RAMP_TIME_8s             (7)
 41                                                    41 
 42 /* ALS Resistor Select */                          42 /* ALS Resistor Select */
 43 #define LM3530_ALS_IMPD_Z               (0x00)     43 #define LM3530_ALS_IMPD_Z               (0x00) /* ALS Impedance */
 44 #define LM3530_ALS_IMPD_13_53kOhm       (0x01)     44 #define LM3530_ALS_IMPD_13_53kOhm       (0x01)
 45 #define LM3530_ALS_IMPD_9_01kOhm        (0x02)     45 #define LM3530_ALS_IMPD_9_01kOhm        (0x02)
 46 #define LM3530_ALS_IMPD_5_41kOhm        (0x03)     46 #define LM3530_ALS_IMPD_5_41kOhm        (0x03)
 47 #define LM3530_ALS_IMPD_2_27kOhm        (0x04)     47 #define LM3530_ALS_IMPD_2_27kOhm        (0x04)
 48 #define LM3530_ALS_IMPD_1_94kOhm        (0x05)     48 #define LM3530_ALS_IMPD_1_94kOhm        (0x05)
 49 #define LM3530_ALS_IMPD_1_81kOhm        (0x06)     49 #define LM3530_ALS_IMPD_1_81kOhm        (0x06)
 50 #define LM3530_ALS_IMPD_1_6kOhm         (0x07)     50 #define LM3530_ALS_IMPD_1_6kOhm         (0x07)
 51 #define LM3530_ALS_IMPD_1_138kOhm       (0x08)     51 #define LM3530_ALS_IMPD_1_138kOhm       (0x08)
 52 #define LM3530_ALS_IMPD_1_05kOhm        (0x09)     52 #define LM3530_ALS_IMPD_1_05kOhm        (0x09)
 53 #define LM3530_ALS_IMPD_1_011kOhm       (0x0A)     53 #define LM3530_ALS_IMPD_1_011kOhm       (0x0A)
 54 #define LM3530_ALS_IMPD_941Ohm          (0x0B)     54 #define LM3530_ALS_IMPD_941Ohm          (0x0B)
 55 #define LM3530_ALS_IMPD_759Ohm          (0x0C)     55 #define LM3530_ALS_IMPD_759Ohm          (0x0C)
 56 #define LM3530_ALS_IMPD_719Ohm          (0x0D)     56 #define LM3530_ALS_IMPD_719Ohm          (0x0D)
 57 #define LM3530_ALS_IMPD_700Ohm          (0x0E)     57 #define LM3530_ALS_IMPD_700Ohm          (0x0E)
 58 #define LM3530_ALS_IMPD_667Ohm          (0x0F)     58 #define LM3530_ALS_IMPD_667Ohm          (0x0F)
 59                                                    59 
 60 enum lm3530_mode {                                 60 enum lm3530_mode {
 61         LM3530_BL_MODE_MANUAL = 0,      /* "ma     61         LM3530_BL_MODE_MANUAL = 0,      /* "man" */
 62         LM3530_BL_MODE_ALS,             /* "al     62         LM3530_BL_MODE_ALS,             /* "als" */
 63         LM3530_BL_MODE_PWM,             /* "pw     63         LM3530_BL_MODE_PWM,             /* "pwm" */
 64 };                                                 64 };
 65                                                    65 
 66 /* ALS input select */                             66 /* ALS input select */
 67 enum lm3530_als_mode {                             67 enum lm3530_als_mode {
 68         LM3530_INPUT_AVRG = 0,  /* ALS1 and AL     68         LM3530_INPUT_AVRG = 0,  /* ALS1 and ALS2 input average */
 69         LM3530_INPUT_ALS1,      /* ALS1 Input      69         LM3530_INPUT_ALS1,      /* ALS1 Input */
 70         LM3530_INPUT_ALS2,      /* ALS2 Input      70         LM3530_INPUT_ALS2,      /* ALS2 Input */
 71         LM3530_INPUT_CEIL,      /* Max of ALS1     71         LM3530_INPUT_CEIL,      /* Max of ALS1 and ALS2 */
 72 };                                                 72 };
 73                                                    73 
 74 /* PWM Platform Specific Data */                   74 /* PWM Platform Specific Data */
 75 struct lm3530_pwm_data {                           75 struct lm3530_pwm_data {
 76         void (*pwm_set_intensity) (int brightn     76         void (*pwm_set_intensity) (int brightness, int max_brightness);
 77         int (*pwm_get_intensity) (int max_brig     77         int (*pwm_get_intensity) (int max_brightness);
 78 };                                                 78 };
 79                                                    79 
 80 /**                                                80 /**
 81  * struct lm3530_platform_data                     81  * struct lm3530_platform_data
 82  * @mode: mode of operation i.e. Manual, ALS o     82  * @mode: mode of operation i.e. Manual, ALS or PWM
 83  * @als_input_mode: select source of ALS input     83  * @als_input_mode: select source of ALS input - ALS1/2 or average
 84  * @max_current: full scale LED current            84  * @max_current: full scale LED current
 85  * @pwm_pol_hi: PWM input polarity - active hi     85  * @pwm_pol_hi: PWM input polarity - active high/active low
 86  * @als_avrg_time: ALS input averaging time        86  * @als_avrg_time: ALS input averaging time
 87  * @brt_ramp_law: brightness mapping mode - ex     87  * @brt_ramp_law: brightness mapping mode - exponential/linear
 88  * @brt_ramp_fall: rate of fall of led current     88  * @brt_ramp_fall: rate of fall of led current
 89  * @brt_ramp_rise: rate of rise of led current     89  * @brt_ramp_rise: rate of rise of led current
 90  * @als1_resistor_sel: internal resistance fro     90  * @als1_resistor_sel: internal resistance from ALS1 input to ground
 91  * @als2_resistor_sel: internal resistance fro     91  * @als2_resistor_sel: internal resistance from ALS2 input to ground
 92  * @als_vmin: als input voltage calibrated for     92  * @als_vmin: als input voltage calibrated for max brightness in mV
 93  * @als_vmax: als input voltage calibrated for     93  * @als_vmax: als input voltage calibrated for min brightness in mV
 94  * @brt_val: brightness value (0-127)              94  * @brt_val: brightness value (0-127)
 95  * @pwm_data: PWM control functions (only vali     95  * @pwm_data: PWM control functions (only valid when the mode is PWM)
 96  */                                                96  */
 97 struct lm3530_platform_data {                      97 struct lm3530_platform_data {
 98         enum lm3530_mode mode;                     98         enum lm3530_mode mode;
 99         enum lm3530_als_mode als_input_mode;       99         enum lm3530_als_mode als_input_mode;
100                                                   100 
101         u8 max_current;                           101         u8 max_current;
102         bool pwm_pol_hi;                          102         bool pwm_pol_hi;
103         u8 als_avrg_time;                         103         u8 als_avrg_time;
104                                                   104 
105         bool brt_ramp_law;                        105         bool brt_ramp_law;
106         u8 brt_ramp_fall;                         106         u8 brt_ramp_fall;
107         u8 brt_ramp_rise;                         107         u8 brt_ramp_rise;
108                                                   108 
109         u8 als1_resistor_sel;                     109         u8 als1_resistor_sel;
110         u8 als2_resistor_sel;                     110         u8 als2_resistor_sel;
111                                                   111 
112         u32 als_vmin;                             112         u32 als_vmin;
113         u32 als_vmax;                             113         u32 als_vmax;
114                                                   114 
115         u8 brt_val;                               115         u8 brt_val;
116                                                   116 
117         struct lm3530_pwm_data pwm_data;          117         struct lm3530_pwm_data pwm_data;
118 };                                                118 };
119                                                   119 
120 #endif  /* _LINUX_LED_LM3530_H__ */               120 #endif  /* _LINUX_LED_LM3530_H__ */
121                                                   121 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php