aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-s3c24xx/mach-h1940.c4
-rw-r--r--arch/arm/mach-s3c24xx/mach-rx1950.c5
-rw-r--r--arch/arm/mach-s3c64xx/mach-crag6410.c4
-rw-r--r--arch/arm/mach-s3c64xx/mach-hmt.c4
-rw-r--r--arch/arm/mach-s3c64xx/mach-smartq.c4
-rw-r--r--arch/arm/mach-s3c64xx/mach-smdk6410.c5
-rw-r--r--arch/arm/mach-s5p64x0/mach-smdk6440.c5
-rw-r--r--arch/arm/mach-s5p64x0/mach-smdk6450.c5
-rw-r--r--arch/arm/mach-s5pc100/mach-smdkc100.c5
-rw-r--r--arch/arm/mach-s5pv210/mach-smdkv210.c5
-rw-r--r--arch/arm/plat-samsung/dev-backlight.c10
11 files changed, 25 insertions, 31 deletions
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index af4334d6b4d5..74dd47988b41 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -512,7 +512,7 @@ static struct platform_pwm_backlight_data backlight_data = {
512static struct platform_device h1940_backlight = { 512static struct platform_device h1940_backlight = {
513 .name = "pwm-backlight", 513 .name = "pwm-backlight",
514 .dev = { 514 .dev = {
515 .parent = &s3c_device_timer[0].dev, 515 .parent = &samsung_device_pwm.dev,
516 .platform_data = &backlight_data, 516 .platform_data = &backlight_data,
517 }, 517 },
518 .id = -1, 518 .id = -1,
@@ -632,7 +632,7 @@ static struct platform_device *h1940_devices[] __initdata = {
632 &h1940_device_bluetooth, 632 &h1940_device_bluetooth,
633 &s3c_device_sdi, 633 &s3c_device_sdi,
634 &s3c_device_rtc, 634 &s3c_device_rtc,
635 &s3c_device_timer[0], 635 &samsung_device_pwm,
636 &h1940_backlight, 636 &h1940_backlight,
637 &h1940_lcd_powerdev, 637 &h1940_lcd_powerdev,
638 &s3c_device_adc, 638 &s3c_device_adc,
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index 44ca018e1f96..206b1f7546d1 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -530,7 +530,7 @@ static struct platform_pwm_backlight_data rx1950_backlight_data = {
530static struct platform_device rx1950_backlight = { 530static struct platform_device rx1950_backlight = {
531 .name = "pwm-backlight", 531 .name = "pwm-backlight",
532 .dev = { 532 .dev = {
533 .parent = &s3c_device_timer[0].dev, 533 .parent = &samsung_device_pwm.dev,
534 .platform_data = &rx1950_backlight_data, 534 .platform_data = &rx1950_backlight_data,
535 }, 535 },
536}; 536};
@@ -717,8 +717,7 @@ static struct platform_device *rx1950_devices[] __initdata = {
717 &s3c_device_sdi, 717 &s3c_device_sdi,
718 &s3c_device_adc, 718 &s3c_device_adc,
719 &s3c_device_ts, 719 &s3c_device_ts,
720 &s3c_device_timer[0], 720 &samsung_device_pwm,
721 &s3c_device_timer[1],
722 &rx1950_backlight, 721 &rx1950_backlight,
723 &rx1950_device_gpiokeys, 722 &rx1950_device_gpiokeys,
724 &power_supply, 723 &power_supply,
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
index 8ad88ace795a..28889cc788b3 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
@@ -120,7 +120,7 @@ static struct platform_device crag6410_backlight_device = {
120 .name = "pwm-backlight", 120 .name = "pwm-backlight",
121 .id = -1, 121 .id = -1,
122 .dev = { 122 .dev = {
123 .parent = &s3c_device_timer[0].dev, 123 .parent = &samsung_device_pwm.dev,
124 .platform_data = &crag6410_backlight_data, 124 .platform_data = &crag6410_backlight_data,
125 }, 125 },
126}; 126};
@@ -375,7 +375,7 @@ static struct platform_device *crag6410_devices[] __initdata = {
375 &s3c_device_fb, 375 &s3c_device_fb,
376 &s3c_device_ohci, 376 &s3c_device_ohci,
377 &s3c_device_usb_hsotg, 377 &s3c_device_usb_hsotg,
378 &s3c_device_timer[0], 378 &samsung_device_pwm,
379 &s3c64xx_device_iis0, 379 &s3c64xx_device_iis0,
380 &s3c64xx_device_iis1, 380 &s3c64xx_device_iis1,
381 &samsung_device_keypad, 381 &samsung_device_keypad,
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c
index 5b7f357d8c22..f39569e0f2e6 100644
--- a/arch/arm/mach-s3c64xx/mach-hmt.c
+++ b/arch/arm/mach-s3c64xx/mach-hmt.c
@@ -123,7 +123,7 @@ static struct platform_pwm_backlight_data hmt_backlight_data = {
123static struct platform_device hmt_backlight_device = { 123static struct platform_device hmt_backlight_device = {
124 .name = "pwm-backlight", 124 .name = "pwm-backlight",
125 .dev = { 125 .dev = {
126 .parent = &s3c_device_timer[1].dev, 126 .parent = &samsung_device_pwm.dev,
127 .platform_data = &hmt_backlight_data, 127 .platform_data = &hmt_backlight_data,
128 }, 128 },
129}; 129};
@@ -239,7 +239,7 @@ static struct platform_device *hmt_devices[] __initdata = {
239 &s3c_device_nand, 239 &s3c_device_nand,
240 &s3c_device_fb, 240 &s3c_device_fb,
241 &s3c_device_ohci, 241 &s3c_device_ohci,
242 &s3c_device_timer[1], 242 &samsung_device_pwm,
243 &hmt_backlight_device, 243 &hmt_backlight_device,
244 &hmt_leds_device, 244 &hmt_leds_device,
245}; 245};
diff --git a/arch/arm/mach-s3c64xx/mach-smartq.c b/arch/arm/mach-s3c64xx/mach-smartq.c
index 58ac99041274..86d980b448fd 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq.c
+++ b/arch/arm/mach-s3c64xx/mach-smartq.c
@@ -157,7 +157,7 @@ static struct platform_pwm_backlight_data smartq_backlight_data = {
157static struct platform_device smartq_backlight_device = { 157static struct platform_device smartq_backlight_device = {
158 .name = "pwm-backlight", 158 .name = "pwm-backlight",
159 .dev = { 159 .dev = {
160 .parent = &s3c_device_timer[1].dev, 160 .parent = &samsung_device_pwm.dev,
161 .platform_data = &smartq_backlight_data, 161 .platform_data = &smartq_backlight_data,
162 }, 162 },
163}; 163};
@@ -246,7 +246,7 @@ static struct platform_device *smartq_devices[] __initdata = {
246 &s3c_device_i2c0, 246 &s3c_device_i2c0,
247 &s3c_device_ohci, 247 &s3c_device_ohci,
248 &s3c_device_rtc, 248 &s3c_device_rtc,
249 &s3c_device_timer[1], 249 &samsung_device_pwm,
250 &s3c_device_ts, 250 &s3c_device_ts,
251 &s3c_device_usb_hsotg, 251 &s3c_device_usb_hsotg,
252 &s3c64xx_device_iis0, 252 &s3c64xx_device_iis0,
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
index bd3295a19ad7..d90b450c5645 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
@@ -274,6 +274,7 @@ static struct platform_device *smdk6410_devices[] __initdata = {
274 &s3c_device_i2c1, 274 &s3c_device_i2c1,
275 &s3c_device_fb, 275 &s3c_device_fb,
276 &s3c_device_ohci, 276 &s3c_device_ohci,
277 &samsung_device_pwm,
277 &s3c_device_usb_hsotg, 278 &s3c_device_usb_hsotg,
278 &s3c64xx_device_iisv4, 279 &s3c64xx_device_iisv4,
279 &samsung_device_keypad, 280 &samsung_device_keypad,
@@ -691,9 +692,9 @@ static void __init smdk6410_machine_init(void)
691 692
692 s3c_ide_set_platdata(&smdk6410_ide_pdata); 693 s3c_ide_set_platdata(&smdk6410_ide_pdata);
693 694
694 samsung_bl_set(&smdk6410_bl_gpio_info, &smdk6410_bl_data);
695
696 platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices)); 695 platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices));
696
697 samsung_bl_set(&smdk6410_bl_gpio_info, &smdk6410_bl_data);
697} 698}
698 699
699MACHINE_START(SMDK6410, "SMDK6410") 700MACHINE_START(SMDK6410, "SMDK6410")
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6440.c b/arch/arm/mach-s5p64x0/mach-smdk6440.c
index 73f71a698a34..0b00304c1e91 100644
--- a/arch/arm/mach-s5p64x0/mach-smdk6440.c
+++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c
@@ -162,6 +162,7 @@ static struct platform_device *smdk6440_devices[] __initdata = {
162 &s3c_device_rtc, 162 &s3c_device_rtc,
163 &s3c_device_i2c0, 163 &s3c_device_i2c0,
164 &s3c_device_i2c1, 164 &s3c_device_i2c1,
165 &samsung_device_pwm,
165 &s3c_device_ts, 166 &s3c_device_ts,
166 &s3c_device_wdt, 167 &s3c_device_wdt,
167 &s5p6440_device_iis, 168 &s5p6440_device_iis,
@@ -254,8 +255,6 @@ static void __init smdk6440_machine_init(void)
254 i2c_register_board_info(1, smdk6440_i2c_devs1, 255 i2c_register_board_info(1, smdk6440_i2c_devs1,
255 ARRAY_SIZE(smdk6440_i2c_devs1)); 256 ARRAY_SIZE(smdk6440_i2c_devs1));
256 257
257 samsung_bl_set(&smdk6440_bl_gpio_info, &smdk6440_bl_data);
258
259 s5p6440_set_lcd_interface(); 258 s5p6440_set_lcd_interface();
260 s3c_fb_set_platdata(&smdk6440_lcd_pdata); 259 s3c_fb_set_platdata(&smdk6440_lcd_pdata);
261 260
@@ -264,6 +263,8 @@ static void __init smdk6440_machine_init(void)
264 s3c_sdhci2_set_platdata(&smdk6440_hsmmc2_pdata); 263 s3c_sdhci2_set_platdata(&smdk6440_hsmmc2_pdata);
265 264
266 platform_add_devices(smdk6440_devices, ARRAY_SIZE(smdk6440_devices)); 265 platform_add_devices(smdk6440_devices, ARRAY_SIZE(smdk6440_devices));
266
267 samsung_bl_set(&smdk6440_bl_gpio_info, &smdk6440_bl_data);
267} 268}
268 269
269MACHINE_START(SMDK6440, "SMDK6440") 270MACHINE_START(SMDK6440, "SMDK6440")
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-s5p64x0/mach-smdk6450.c
index 18303e12019f..5949296e88fd 100644
--- a/arch/arm/mach-s5p64x0/mach-smdk6450.c
+++ b/arch/arm/mach-s5p64x0/mach-smdk6450.c
@@ -180,6 +180,7 @@ static struct platform_device *smdk6450_devices[] __initdata = {
180 &s3c_device_rtc, 180 &s3c_device_rtc,
181 &s3c_device_i2c0, 181 &s3c_device_i2c0,
182 &s3c_device_i2c1, 182 &s3c_device_i2c1,
183 &samsung_device_pwm,
183 &s3c_device_ts, 184 &s3c_device_ts,
184 &s3c_device_wdt, 185 &s3c_device_wdt,
185 &s5p6450_device_iis0, 186 &s5p6450_device_iis0,
@@ -273,8 +274,6 @@ static void __init smdk6450_machine_init(void)
273 i2c_register_board_info(1, smdk6450_i2c_devs1, 274 i2c_register_board_info(1, smdk6450_i2c_devs1,
274 ARRAY_SIZE(smdk6450_i2c_devs1)); 275 ARRAY_SIZE(smdk6450_i2c_devs1));
275 276
276 samsung_bl_set(&smdk6450_bl_gpio_info, &smdk6450_bl_data);
277
278 s5p6450_set_lcd_interface(); 277 s5p6450_set_lcd_interface();
279 s3c_fb_set_platdata(&smdk6450_lcd_pdata); 278 s3c_fb_set_platdata(&smdk6450_lcd_pdata);
280 279
@@ -283,6 +282,8 @@ static void __init smdk6450_machine_init(void)
283 s3c_sdhci2_set_platdata(&smdk6450_hsmmc2_pdata); 282 s3c_sdhci2_set_platdata(&smdk6450_hsmmc2_pdata);
284 283
285 platform_add_devices(smdk6450_devices, ARRAY_SIZE(smdk6450_devices)); 284 platform_add_devices(smdk6450_devices, ARRAY_SIZE(smdk6450_devices));
285
286 samsung_bl_set(&smdk6450_bl_gpio_info, &smdk6450_bl_data);
286} 287}
287 288
288MACHINE_START(SMDK6450, "SMDK6450") 289MACHINE_START(SMDK6450, "SMDK6450")
diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c
index 8c880f76f274..7c57a221785e 100644
--- a/arch/arm/mach-s5pc100/mach-smdkc100.c
+++ b/arch/arm/mach-s5pc100/mach-smdkc100.c
@@ -194,6 +194,7 @@ static struct platform_device *smdkc100_devices[] __initdata = {
194 &s3c_device_hsmmc0, 194 &s3c_device_hsmmc0,
195 &s3c_device_hsmmc1, 195 &s3c_device_hsmmc1,
196 &s3c_device_hsmmc2, 196 &s3c_device_hsmmc2,
197 &samsung_device_pwm,
197 &s3c_device_ts, 198 &s3c_device_ts,
198 &s3c_device_wdt, 199 &s3c_device_wdt,
199 &smdkc100_lcd_powerdev, 200 &smdkc100_lcd_powerdev,
@@ -246,9 +247,9 @@ static void __init smdkc100_machine_init(void)
246 gpio_request(S5PC100_GPH0(6), "GPH0"); 247 gpio_request(S5PC100_GPH0(6), "GPH0");
247 smdkc100_lcd_power_set(&smdkc100_lcd_power_data, 0); 248 smdkc100_lcd_power_set(&smdkc100_lcd_power_data, 0);
248 249
249 samsung_bl_set(&smdkc100_bl_gpio_info, &smdkc100_bl_data);
250
251 platform_add_devices(smdkc100_devices, ARRAY_SIZE(smdkc100_devices)); 250 platform_add_devices(smdkc100_devices, ARRAY_SIZE(smdkc100_devices));
251
252 samsung_bl_set(&smdkc100_bl_gpio_info, &smdkc100_bl_data);
252} 253}
253 254
254MACHINE_START(SMDKC100, "SMDKC100") 255MACHINE_START(SMDKC100, "SMDKC100")
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c
index d50b6f124465..6d72bb992e38 100644
--- a/arch/arm/mach-s5pv210/mach-smdkv210.c
+++ b/arch/arm/mach-s5pv210/mach-smdkv210.c
@@ -218,6 +218,7 @@ static struct platform_device *smdkv210_devices[] __initdata = {
218 &s3c_device_i2c0, 218 &s3c_device_i2c0,
219 &s3c_device_i2c1, 219 &s3c_device_i2c1,
220 &s3c_device_i2c2, 220 &s3c_device_i2c2,
221 &samsung_device_pwm,
221 &s3c_device_rtc, 222 &s3c_device_rtc,
222 &s3c_device_ts, 223 &s3c_device_ts,
223 &s3c_device_usb_hsotg, 224 &s3c_device_usb_hsotg,
@@ -316,11 +317,11 @@ static void __init smdkv210_machine_init(void)
316 317
317 s3c_fb_set_platdata(&smdkv210_lcd0_pdata); 318 s3c_fb_set_platdata(&smdkv210_lcd0_pdata);
318 319
319 samsung_bl_set(&smdkv210_bl_gpio_info, &smdkv210_bl_data);
320
321 s3c_hsotg_set_platdata(&smdkv210_hsotg_pdata); 320 s3c_hsotg_set_platdata(&smdkv210_hsotg_pdata);
322 321
323 platform_add_devices(smdkv210_devices, ARRAY_SIZE(smdkv210_devices)); 322 platform_add_devices(smdkv210_devices, ARRAY_SIZE(smdkv210_devices));
323
324 samsung_bl_set(&smdkv210_bl_gpio_info, &smdkv210_bl_data);
324} 325}
325 326
326MACHINE_START(SMDKV210, "SMDKV210") 327MACHINE_START(SMDKV210, "SMDKV210")
diff --git a/arch/arm/plat-samsung/dev-backlight.c b/arch/arm/plat-samsung/dev-backlight.c
index e467a01dc2f9..d51f9565567c 100644
--- a/arch/arm/plat-samsung/dev-backlight.c
+++ b/arch/arm/plat-samsung/dev-backlight.c
@@ -132,14 +132,6 @@ void __init samsung_bl_set(struct samsung_bl_gpio_info *gpio_info,
132 if (bl_data->check_fb) 132 if (bl_data->check_fb)
133 samsung_bl_data->check_fb = bl_data->check_fb; 133 samsung_bl_data->check_fb = bl_data->check_fb;
134 134
135 /* Register the specific PWM timer dev for Backlight control */
136 ret = platform_device_register(
137 &s3c_device_timer[samsung_bl_data->pwm_id]);
138 if (ret) {
139 printk(KERN_ERR "failed to register pwm timer for backlight: %d\n", ret);
140 goto err_plat_reg1;
141 }
142
143 /* Register the Backlight dev */ 135 /* Register the Backlight dev */
144 ret = platform_device_register(samsung_bl_device); 136 ret = platform_device_register(samsung_bl_device);
145 if (ret) { 137 if (ret) {
@@ -150,8 +142,6 @@ void __init samsung_bl_set(struct samsung_bl_gpio_info *gpio_info,
150 return; 142 return;
151 143
152err_plat_reg2: 144err_plat_reg2:
153 platform_device_unregister(&s3c_device_timer[samsung_bl_data->pwm_id]);
154err_plat_reg1:
155 kfree(samsung_bl_data); 145 kfree(samsung_bl_data);
156err_data: 146err_data:
157 kfree(samsung_bl_device); 147 kfree(samsung_bl_device);