diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 22:55:33 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 22:55:33 -0400 |
| commit | c16bfeb264decb964742067f02fdd51494e25e64 (patch) | |
| tree | 255eac59926c0d08168581b7c324612694dffe5b /include/linux | |
| parent | 1286da8bc009cb2aee7f285e94623fc974c0c983 (diff) | |
| parent | cf3b1c2ba362ecea5b8e07d370233e25f3d6366d (diff) | |
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
Pull LED subsystem updates from Bryan Wu:
- lp55xx device tree updates
- mc13xxx driver updates
- some clean up
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds:
leds: mc13783: Fix "uninitialized variable" warning
leds: Convert led class driver from legacy pm ops to dev_pm_ops
leds: leds-mc13783: Add MC13892 LED support
leds: leds-mc13783: Prepare driver to support MC13892 LEDs
leds: renesas-tpu: cleanup a small type issue
leds: use platform_{get,set}_drvdata()
leds: leds-gpio: Let device core handle pinctrl
leds: lp5562: Properly setup of_device_id table
leds: lp5523: Properly setup of_device_id table
leds: lp5521: Properly setup of_device_id table
leds: lp5562: support the device tree feature
leds: lp55xx: support dynamic channel settings in the device tree structure
leds: leds-ns2: remove unnecessary platform_set_drvdata()
leds: leds-mc13783: remove unnecessary platform_set_drvdata()
leds: leds-gpio: remove unnecessary platform_set_drvdata()
leds: atmel-pwm: remove unnecessary platform_set_drvdata()
leds: lp55xx: add support for Device Tree bindings
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mfd/mc13xxx.h | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/include/linux/mfd/mc13xxx.h b/include/linux/mfd/mc13xxx.h index bf070755982e..41ed59276c00 100644 --- a/include/linux/mfd/mc13xxx.h +++ b/include/linux/mfd/mc13xxx.h | |||
| @@ -78,20 +78,30 @@ struct mc13xxx_regulator_platform_data { | |||
| 78 | struct mc13xxx_regulator_init_data *regulators; | 78 | struct mc13xxx_regulator_init_data *regulators; |
| 79 | }; | 79 | }; |
| 80 | 80 | ||
| 81 | enum { | ||
| 82 | /* MC13783 LED IDs */ | ||
| 83 | MC13783_LED_MD, | ||
| 84 | MC13783_LED_AD, | ||
| 85 | MC13783_LED_KP, | ||
| 86 | MC13783_LED_R1, | ||
| 87 | MC13783_LED_G1, | ||
| 88 | MC13783_LED_B1, | ||
| 89 | MC13783_LED_R2, | ||
| 90 | MC13783_LED_G2, | ||
| 91 | MC13783_LED_B2, | ||
| 92 | MC13783_LED_R3, | ||
| 93 | MC13783_LED_G3, | ||
| 94 | MC13783_LED_B3, | ||
| 95 | /* MC13892 LED IDs */ | ||
| 96 | MC13892_LED_MD, | ||
| 97 | MC13892_LED_AD, | ||
| 98 | MC13892_LED_KP, | ||
| 99 | MC13892_LED_R, | ||
| 100 | MC13892_LED_G, | ||
| 101 | MC13892_LED_B, | ||
| 102 | }; | ||
| 103 | |||
| 81 | struct mc13xxx_led_platform_data { | 104 | struct mc13xxx_led_platform_data { |
| 82 | #define MC13783_LED_MD 0 | ||
| 83 | #define MC13783_LED_AD 1 | ||
| 84 | #define MC13783_LED_KP 2 | ||
| 85 | #define MC13783_LED_R1 3 | ||
| 86 | #define MC13783_LED_G1 4 | ||
| 87 | #define MC13783_LED_B1 5 | ||
| 88 | #define MC13783_LED_R2 6 | ||
| 89 | #define MC13783_LED_G2 7 | ||
| 90 | #define MC13783_LED_B2 8 | ||
| 91 | #define MC13783_LED_R3 9 | ||
| 92 | #define MC13783_LED_G3 10 | ||
| 93 | #define MC13783_LED_B3 11 | ||
| 94 | #define MC13783_LED_MAX MC13783_LED_B3 | ||
| 95 | int id; | 105 | int id; |
| 96 | const char *name; | 106 | const char *name; |
| 97 | const char *default_trigger; | 107 | const char *default_trigger; |
| @@ -100,46 +110,36 @@ struct mc13xxx_led_platform_data { | |||
| 100 | char max_current; | 110 | char max_current; |
| 101 | }; | 111 | }; |
| 102 | 112 | ||
| 113 | #define MAX_LED_CONTROL_REGS 6 | ||
| 114 | |||
| 103 | struct mc13xxx_leds_platform_data { | 115 | struct mc13xxx_leds_platform_data { |
| 104 | int num_leds; | ||
| 105 | struct mc13xxx_led_platform_data *led; | 116 | struct mc13xxx_led_platform_data *led; |
| 117 | int num_leds; | ||
| 106 | 118 | ||
| 107 | #define MC13783_LED_TRIODE_MD (1 << 0) | 119 | /* LED Control 0 */ |
| 108 | #define MC13783_LED_TRIODE_AD (1 << 1) | 120 | #define MC13783_LED_C0_ENABLE (1 << 0) |
| 109 | #define MC13783_LED_TRIODE_KP (1 << 2) | 121 | #define MC13783_LED_C0_TRIODE_MD (1 << 7) |
| 110 | #define MC13783_LED_BOOST_EN (1 << 3) | 122 | #define MC13783_LED_C0_TRIODE_AD (1 << 8) |
| 111 | #define MC13783_LED_TC1HALF (1 << 4) | 123 | #define MC13783_LED_C0_TRIODE_KP (1 << 9) |
| 112 | #define MC13783_LED_SLEWLIMTC (1 << 5) | 124 | #define MC13783_LED_C0_BOOST (1 << 10) |
| 113 | #define MC13783_LED_SLEWLIMBL (1 << 6) | 125 | #define MC13783_LED_C0_ABMODE(x) (((x) & 0x7) << 11) |
| 114 | #define MC13783_LED_TRIODE_TC1 (1 << 7) | 126 | #define MC13783_LED_C0_ABREF(x) (((x) & 0x3) << 14) |
| 115 | #define MC13783_LED_TRIODE_TC2 (1 << 8) | 127 | /* LED Control 1 */ |
| 116 | #define MC13783_LED_TRIODE_TC3 (1 << 9) | 128 | #define MC13783_LED_C1_TC1HALF (1 << 18) |
| 117 | int flags; | 129 | #define MC13783_LED_C1_SLEWLIM (1 << 23) |
| 118 | 130 | /* LED Control 2 */ | |
| 119 | #define MC13783_LED_AB_DISABLED 0 | 131 | #define MC13783_LED_C2_PERIOD(x) (((x) & 0x3) << 21) |
| 120 | #define MC13783_LED_AB_MD1 1 | 132 | #define MC13783_LED_C2_SLEWLIM (1 << 23) |
| 121 | #define MC13783_LED_AB_MD12 2 | 133 | /* LED Control 3 */ |
| 122 | #define MC13783_LED_AB_MD123 3 | 134 | #define MC13783_LED_C3_PERIOD(x) (((x) & 0x3) << 21) |
| 123 | #define MC13783_LED_AB_MD1234 4 | 135 | #define MC13783_LED_C3_TRIODE_TC1 (1 << 23) |
| 124 | #define MC13783_LED_AB_MD1234_AD1 5 | 136 | /* LED Control 4 */ |
| 125 | #define MC13783_LED_AB_MD1234_AD12 6 | 137 | #define MC13783_LED_C4_PERIOD(x) (((x) & 0x3) << 21) |
| 126 | #define MC13783_LED_AB_MD1_AD 7 | 138 | #define MC13783_LED_C4_TRIODE_TC2 (1 << 23) |
| 127 | char abmode; | 139 | /* LED Control 5 */ |
| 128 | 140 | #define MC13783_LED_C5_PERIOD(x) (((x) & 0x3) << 21) | |
| 129 | #define MC13783_LED_ABREF_200MV 0 | 141 | #define MC13783_LED_C5_TRIODE_TC3 (1 << 23) |
| 130 | #define MC13783_LED_ABREF_400MV 1 | 142 | u32 led_control[MAX_LED_CONTROL_REGS]; |
| 131 | #define MC13783_LED_ABREF_600MV 2 | ||
| 132 | #define MC13783_LED_ABREF_800MV 3 | ||
| 133 | char abref; | ||
| 134 | |||
| 135 | #define MC13783_LED_PERIOD_10MS 0 | ||
| 136 | #define MC13783_LED_PERIOD_100MS 1 | ||
| 137 | #define MC13783_LED_PERIOD_500MS 2 | ||
| 138 | #define MC13783_LED_PERIOD_2S 3 | ||
| 139 | char bl_period; | ||
| 140 | char tc1_period; | ||
| 141 | char tc2_period; | ||
| 142 | char tc3_period; | ||
| 143 | }; | 143 | }; |
| 144 | 144 | ||
| 145 | struct mc13xxx_buttons_platform_data { | 145 | struct mc13xxx_buttons_platform_data { |
