diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-16 15:21:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-16 15:21:40 -0500 |
commit | 0bde7294e2ada03d0f1cc61cec51274081d9a9cf (patch) | |
tree | b1cf62a298b566d9bcc87d9f572f506b98809d66 /arch/arm/mach-pxa | |
parent | 449bf8d03c5b94f00cc014ff601c2fe2eebb5a6e (diff) | |
parent | 1b3f25ce991d528bd0d825b3f14a45904037a382 (diff) |
Merge tag 'pwm/for-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
Pull pwm changes from Thierry Reding:
"Mostly bug fixes and clean up. There is a new driver, which is
actually moving a custom PWM driver from drivers/misc.
The majority of the patches are enhancements to the device tree
support in the pwm-backlight driver. Backlights can now additionally
be powered using a regulator and enabled using a GPIO in addition to
just the PWM input"
* tag 'pwm/for-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (30 commits)
Documentation/pwm: Update supported SoC name for pwm-samsung
pwm: samsung: Fix kernel warning while unexporting a channel
MAINTAINERS: Move PWM subsystem tree to kernel.org
Documentation/pwm: Fix trivial typos
pwm-backlight: Remove unused variable
pwm_backlight: avoid short blank screen while doing hibernation
pwm-backlight: Fix brightness adjustment
pwm: add ep93xx PWM support
pwm-backlight: Allow for non-increasing brightness levels
pwm-backlight: Add power supply support
pwm-backlight: Use new enable_gpio field
unicore32: Initialize PWM backlight enable_gpio field
ARM: shmobile: Initialize PWM backlight enable_gpio field
ARM: SAMSUNG: Initialize PWM backlight enable_gpio field
ARM: pxa: Initialize PWM backlight enable_gpio field
ARM: OMAP: Initialize PWM backlight enable_gpio field
pwm-backlight: Add optional enable GPIO
pwm-backlight: Track enable state
pwm-backlight: Refactor backlight power on/off
pwm-backlight: Improve readability
...
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r-- | arch/arm/mach-pxa/cm-x300.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/colibri-pxa270-income.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/ezx.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/hx4700.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/lpd270.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/magician.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/mainstone.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/mioa701.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/palm27x.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/palmtc.c | 35 | ||||
-rw-r--r-- | arch/arm/mach-pxa/palmte2.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pcm990-baseboard.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/raumfeld.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/tavorevb.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/viper.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/z2.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/zylonite.c | 1 |
17 files changed, 19 insertions, 34 deletions
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c index f9423493ed36..584439bfa59f 100644 --- a/arch/arm/mach-pxa/cm-x300.c +++ b/arch/arm/mach-pxa/cm-x300.c | |||
@@ -310,6 +310,7 @@ static struct platform_pwm_backlight_data cm_x300_backlight_data = { | |||
310 | .max_brightness = 100, | 310 | .max_brightness = 100, |
311 | .dft_brightness = 100, | 311 | .dft_brightness = 100, |
312 | .pwm_period_ns = 10000, | 312 | .pwm_period_ns = 10000, |
313 | .enable_gpio = -1, | ||
313 | }; | 314 | }; |
314 | 315 | ||
315 | static struct platform_device cm_x300_backlight_device = { | 316 | static struct platform_device cm_x300_backlight_device = { |
diff --git a/arch/arm/mach-pxa/colibri-pxa270-income.c b/arch/arm/mach-pxa/colibri-pxa270-income.c index 2d4a7b4d5d78..3aa264640c9d 100644 --- a/arch/arm/mach-pxa/colibri-pxa270-income.c +++ b/arch/arm/mach-pxa/colibri-pxa270-income.c | |||
@@ -189,6 +189,7 @@ static struct platform_pwm_backlight_data income_backlight_data = { | |||
189 | .max_brightness = 0x3ff, | 189 | .max_brightness = 0x3ff, |
190 | .dft_brightness = 0x1ff, | 190 | .dft_brightness = 0x1ff, |
191 | .pwm_period_ns = 1000000, | 191 | .pwm_period_ns = 1000000, |
192 | .enable_gpio = -1, | ||
192 | }; | 193 | }; |
193 | 194 | ||
194 | static struct platform_device income_backlight = { | 195 | static struct platform_device income_backlight = { |
diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c index fe2eb8394dff..ab93441e596e 100644 --- a/arch/arm/mach-pxa/ezx.c +++ b/arch/arm/mach-pxa/ezx.c | |||
@@ -54,6 +54,7 @@ static struct platform_pwm_backlight_data ezx_backlight_data = { | |||
54 | .max_brightness = 1023, | 54 | .max_brightness = 1023, |
55 | .dft_brightness = 1023, | 55 | .dft_brightness = 1023, |
56 | .pwm_period_ns = 78770, | 56 | .pwm_period_ns = 78770, |
57 | .enable_gpio = -1, | ||
57 | }; | 58 | }; |
58 | 59 | ||
59 | static struct platform_device ezx_backlight_device = { | 60 | static struct platform_device ezx_backlight_device = { |
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c index 133109ec7332..a7c30eb0c8db 100644 --- a/arch/arm/mach-pxa/hx4700.c +++ b/arch/arm/mach-pxa/hx4700.c | |||
@@ -561,6 +561,7 @@ static struct platform_pwm_backlight_data backlight_data = { | |||
561 | .max_brightness = 200, | 561 | .max_brightness = 200, |
562 | .dft_brightness = 100, | 562 | .dft_brightness = 100, |
563 | .pwm_period_ns = 30923, | 563 | .pwm_period_ns = 30923, |
564 | .enable_gpio = -1, | ||
564 | }; | 565 | }; |
565 | 566 | ||
566 | static struct platform_device backlight = { | 567 | static struct platform_device backlight = { |
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c index 1255ee00f3d1..9f6ec167902a 100644 --- a/arch/arm/mach-pxa/lpd270.c +++ b/arch/arm/mach-pxa/lpd270.c | |||
@@ -269,6 +269,7 @@ static struct platform_pwm_backlight_data lpd270_backlight_data = { | |||
269 | .max_brightness = 1, | 269 | .max_brightness = 1, |
270 | .dft_brightness = 1, | 270 | .dft_brightness = 1, |
271 | .pwm_period_ns = 78770, | 271 | .pwm_period_ns = 78770, |
272 | .enable_gpio = -1, | ||
272 | }; | 273 | }; |
273 | 274 | ||
274 | static struct platform_device lpd270_backlight_device = { | 275 | static struct platform_device lpd270_backlight_device = { |
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index f44532fc648b..fab30d666cc7 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c | |||
@@ -378,6 +378,7 @@ static struct platform_pwm_backlight_data backlight_data = { | |||
378 | .max_brightness = 272, | 378 | .max_brightness = 272, |
379 | .dft_brightness = 100, | 379 | .dft_brightness = 100, |
380 | .pwm_period_ns = 30923, | 380 | .pwm_period_ns = 30923, |
381 | .enable_gpio = -1, | ||
381 | .init = magician_backlight_init, | 382 | .init = magician_backlight_init, |
382 | .notify = magician_backlight_notify, | 383 | .notify = magician_backlight_notify, |
383 | .exit = magician_backlight_exit, | 384 | .exit = magician_backlight_exit, |
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index dd70343c8708..08ccc0718f31 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c | |||
@@ -338,6 +338,7 @@ static struct platform_pwm_backlight_data mainstone_backlight_data = { | |||
338 | .max_brightness = 1023, | 338 | .max_brightness = 1023, |
339 | .dft_brightness = 1023, | 339 | .dft_brightness = 1023, |
340 | .pwm_period_ns = 78770, | 340 | .pwm_period_ns = 78770, |
341 | .enable_gpio = -1, | ||
341 | }; | 342 | }; |
342 | 343 | ||
343 | static struct platform_device mainstone_backlight_device = { | 344 | static struct platform_device mainstone_backlight_device = { |
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c index acc9d3cc0762..f70583fee59f 100644 --- a/arch/arm/mach-pxa/mioa701.c +++ b/arch/arm/mach-pxa/mioa701.c | |||
@@ -186,6 +186,7 @@ static struct platform_pwm_backlight_data mioa701_backlight_data = { | |||
186 | .max_brightness = 100, | 186 | .max_brightness = 100, |
187 | .dft_brightness = 50, | 187 | .dft_brightness = 50, |
188 | .pwm_period_ns = 4000 * 1024, /* Fl = 250kHz */ | 188 | .pwm_period_ns = 4000 * 1024, /* Fl = 250kHz */ |
189 | .enable_gpio = -1, | ||
189 | }; | 190 | }; |
190 | 191 | ||
191 | /* | 192 | /* |
diff --git a/arch/arm/mach-pxa/palm27x.c b/arch/arm/mach-pxa/palm27x.c index 17d4c53017ca..e54a296fb81f 100644 --- a/arch/arm/mach-pxa/palm27x.c +++ b/arch/arm/mach-pxa/palm27x.c | |||
@@ -322,6 +322,7 @@ static struct platform_pwm_backlight_data palm27x_backlight_data = { | |||
322 | .max_brightness = 0xfe, | 322 | .max_brightness = 0xfe, |
323 | .dft_brightness = 0x7e, | 323 | .dft_brightness = 0x7e, |
324 | .pwm_period_ns = 3500 * 1024, | 324 | .pwm_period_ns = 3500 * 1024, |
325 | .enable_gpio = -1, | ||
325 | .init = palm27x_backlight_init, | 326 | .init = palm27x_backlight_init, |
326 | .notify = palm27x_backlight_notify, | 327 | .notify = palm27x_backlight_notify, |
327 | .exit = palm27x_backlight_exit, | 328 | .exit = palm27x_backlight_exit, |
diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c index 100b176f7e88..7691c974ca4b 100644 --- a/arch/arm/mach-pxa/palmtc.c +++ b/arch/arm/mach-pxa/palmtc.c | |||
@@ -166,45 +166,12 @@ static inline void palmtc_keys_init(void) {} | |||
166 | * Backlight | 166 | * Backlight |
167 | ******************************************************************************/ | 167 | ******************************************************************************/ |
168 | #if defined(CONFIG_BACKLIGHT_PWM) || defined(CONFIG_BACKLIGHT_PWM_MODULE) | 168 | #if defined(CONFIG_BACKLIGHT_PWM) || defined(CONFIG_BACKLIGHT_PWM_MODULE) |
169 | static int palmtc_backlight_init(struct device *dev) | ||
170 | { | ||
171 | int ret; | ||
172 | |||
173 | ret = gpio_request(GPIO_NR_PALMTC_BL_POWER, "BL POWER"); | ||
174 | if (ret) | ||
175 | goto err; | ||
176 | ret = gpio_direction_output(GPIO_NR_PALMTC_BL_POWER, 1); | ||
177 | if (ret) | ||
178 | goto err2; | ||
179 | |||
180 | return 0; | ||
181 | |||
182 | err2: | ||
183 | gpio_free(GPIO_NR_PALMTC_BL_POWER); | ||
184 | err: | ||
185 | return ret; | ||
186 | } | ||
187 | |||
188 | static int palmtc_backlight_notify(struct device *dev, int brightness) | ||
189 | { | ||
190 | /* backlight is on when GPIO16 AF0 is high */ | ||
191 | gpio_set_value(GPIO_NR_PALMTC_BL_POWER, brightness); | ||
192 | return brightness; | ||
193 | } | ||
194 | |||
195 | static void palmtc_backlight_exit(struct device *dev) | ||
196 | { | ||
197 | gpio_free(GPIO_NR_PALMTC_BL_POWER); | ||
198 | } | ||
199 | |||
200 | static struct platform_pwm_backlight_data palmtc_backlight_data = { | 169 | static struct platform_pwm_backlight_data palmtc_backlight_data = { |
201 | .pwm_id = 1, | 170 | .pwm_id = 1, |
202 | .max_brightness = PALMTC_MAX_INTENSITY, | 171 | .max_brightness = PALMTC_MAX_INTENSITY, |
203 | .dft_brightness = PALMTC_MAX_INTENSITY, | 172 | .dft_brightness = PALMTC_MAX_INTENSITY, |
204 | .pwm_period_ns = PALMTC_PERIOD_NS, | 173 | .pwm_period_ns = PALMTC_PERIOD_NS, |
205 | .init = palmtc_backlight_init, | 174 | .enable_gpio = GPIO_NR_PALMTC_BL_POWER, |
206 | .notify = palmtc_backlight_notify, | ||
207 | .exit = palmtc_backlight_exit, | ||
208 | }; | 175 | }; |
209 | 176 | ||
210 | static struct platform_device palmtc_backlight = { | 177 | static struct platform_device palmtc_backlight = { |
diff --git a/arch/arm/mach-pxa/palmte2.c b/arch/arm/mach-pxa/palmte2.c index 0742721ced2d..956fd24ee6fd 100644 --- a/arch/arm/mach-pxa/palmte2.c +++ b/arch/arm/mach-pxa/palmte2.c | |||
@@ -165,6 +165,7 @@ static struct platform_pwm_backlight_data palmte2_backlight_data = { | |||
165 | .max_brightness = PALMTE2_MAX_INTENSITY, | 165 | .max_brightness = PALMTE2_MAX_INTENSITY, |
166 | .dft_brightness = PALMTE2_MAX_INTENSITY, | 166 | .dft_brightness = PALMTE2_MAX_INTENSITY, |
167 | .pwm_period_ns = PALMTE2_PERIOD_NS, | 167 | .pwm_period_ns = PALMTE2_PERIOD_NS, |
168 | .enable_gpio = -1, | ||
168 | .init = palmte2_backlight_init, | 169 | .init = palmte2_backlight_init, |
169 | .notify = palmte2_backlight_notify, | 170 | .notify = palmte2_backlight_notify, |
170 | .exit = palmte2_backlight_exit, | 171 | .exit = palmte2_backlight_exit, |
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c index 3133ba82c508..9a4e470f162b 100644 --- a/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/arch/arm/mach-pxa/pcm990-baseboard.c | |||
@@ -153,6 +153,7 @@ static struct platform_pwm_backlight_data pcm990_backlight_data = { | |||
153 | .max_brightness = 1023, | 153 | .max_brightness = 1023, |
154 | .dft_brightness = 1023, | 154 | .dft_brightness = 1023, |
155 | .pwm_period_ns = 78770, | 155 | .pwm_period_ns = 78770, |
156 | .enable_gpio = -1, | ||
156 | }; | 157 | }; |
157 | 158 | ||
158 | static struct platform_device pcm990_backlight_device = { | 159 | static struct platform_device pcm990_backlight_device = { |
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c index 969b0ba7fa70..8386dc30b3e4 100644 --- a/arch/arm/mach-pxa/raumfeld.c +++ b/arch/arm/mach-pxa/raumfeld.c | |||
@@ -539,6 +539,7 @@ static struct platform_pwm_backlight_data raumfeld_pwm_backlight_data = { | |||
539 | .dft_brightness = 100, | 539 | .dft_brightness = 100, |
540 | /* 10000 ns = 10 ms ^= 100 kHz */ | 540 | /* 10000 ns = 10 ms ^= 100 kHz */ |
541 | .pwm_period_ns = 10000, | 541 | .pwm_period_ns = 10000, |
542 | .enable_gpio = -1, | ||
542 | }; | 543 | }; |
543 | 544 | ||
544 | static struct platform_device raumfeld_pwm_backlight_device = { | 545 | static struct platform_device raumfeld_pwm_backlight_device = { |
diff --git a/arch/arm/mach-pxa/tavorevb.c b/arch/arm/mach-pxa/tavorevb.c index 4680efe55345..a71da84e784b 100644 --- a/arch/arm/mach-pxa/tavorevb.c +++ b/arch/arm/mach-pxa/tavorevb.c | |||
@@ -175,6 +175,7 @@ static struct platform_pwm_backlight_data tavorevb_backlight_data[] = { | |||
175 | .max_brightness = 100, | 175 | .max_brightness = 100, |
176 | .dft_brightness = 100, | 176 | .dft_brightness = 100, |
177 | .pwm_period_ns = 100000, | 177 | .pwm_period_ns = 100000, |
178 | .enable_gpio = -1, | ||
178 | }, | 179 | }, |
179 | [1] = { | 180 | [1] = { |
180 | /* secondary backlight */ | 181 | /* secondary backlight */ |
@@ -182,6 +183,7 @@ static struct platform_pwm_backlight_data tavorevb_backlight_data[] = { | |||
182 | .max_brightness = 100, | 183 | .max_brightness = 100, |
183 | .dft_brightness = 100, | 184 | .dft_brightness = 100, |
184 | .pwm_period_ns = 100000, | 185 | .pwm_period_ns = 100000, |
186 | .enable_gpio = -1, | ||
185 | }, | 187 | }, |
186 | }; | 188 | }; |
187 | 189 | ||
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index 9c363c081d3f..29905b127ad9 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c | |||
@@ -401,6 +401,7 @@ static struct platform_pwm_backlight_data viper_backlight_data = { | |||
401 | .max_brightness = 100, | 401 | .max_brightness = 100, |
402 | .dft_brightness = 100, | 402 | .dft_brightness = 100, |
403 | .pwm_period_ns = 1000000, | 403 | .pwm_period_ns = 1000000, |
404 | .enable_gpio = -1, | ||
404 | .init = viper_backlight_init, | 405 | .init = viper_backlight_init, |
405 | .notify = viper_backlight_notify, | 406 | .notify = viper_backlight_notify, |
406 | .exit = viper_backlight_exit, | 407 | .exit = viper_backlight_exit, |
diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c index 2513d8f4931f..e1a121b36cfa 100644 --- a/arch/arm/mach-pxa/z2.c +++ b/arch/arm/mach-pxa/z2.c | |||
@@ -206,6 +206,7 @@ static struct platform_pwm_backlight_data z2_backlight_data[] = { | |||
206 | .max_brightness = 1023, | 206 | .max_brightness = 1023, |
207 | .dft_brightness = 0, | 207 | .dft_brightness = 0, |
208 | .pwm_period_ns = 1260320, | 208 | .pwm_period_ns = 1260320, |
209 | .enable_gpio = -1, | ||
209 | }, | 210 | }, |
210 | [1] = { | 211 | [1] = { |
211 | /* LCD Backlight */ | 212 | /* LCD Backlight */ |
@@ -213,6 +214,7 @@ static struct platform_pwm_backlight_data z2_backlight_data[] = { | |||
213 | .max_brightness = 1023, | 214 | .max_brightness = 1023, |
214 | .dft_brightness = 512, | 215 | .dft_brightness = 512, |
215 | .pwm_period_ns = 1260320, | 216 | .pwm_period_ns = 1260320, |
217 | .enable_gpio = -1, | ||
216 | }, | 218 | }, |
217 | }; | 219 | }; |
218 | 220 | ||
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c index 36cf7cf95ec1..77daea478e88 100644 --- a/arch/arm/mach-pxa/zylonite.c +++ b/arch/arm/mach-pxa/zylonite.c | |||
@@ -125,6 +125,7 @@ static struct platform_pwm_backlight_data zylonite_backlight_data = { | |||
125 | .max_brightness = 100, | 125 | .max_brightness = 100, |
126 | .dft_brightness = 100, | 126 | .dft_brightness = 100, |
127 | .pwm_period_ns = 10000, | 127 | .pwm_period_ns = 10000, |
128 | .enable_gpio = -1, | ||
128 | }; | 129 | }; |
129 | 130 | ||
130 | static struct platform_device zylonite_backlight_device = { | 131 | static struct platform_device zylonite_backlight_device = { |