Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: s3c64xx: use new adc/touchscreen driver

The old ADC and touchscreen drivers are not compatible with
multiplatform support, but we can use the exynos-adc driver
as a replacement.

This changes the common device creation functions for s3c64xx
(but not s3c24xx for now) to use the new driver. To do this,
we have to pass the interrupt resources in the opposite order
and pass the platform data in the adc device node.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+10 -25
+1 -2
arch/arm/mach-s3c64xx/mach-mini6410.c
··· 234 234 &s3c_device_fb, 235 235 &mini6410_lcd_powerdev, 236 236 &s3c_device_adc, 237 - &s3c_device_ts, 238 237 }; 239 238 240 239 static void __init mini6410_map_io(void) ··· 332 333 s3c_nand_set_platdata(&mini6410_nand_info); 333 334 s3c_fb_set_platdata(&mini6410_lcd_pdata[features.lcd_index]); 334 335 s3c_sdhci1_set_platdata(&mini6410_hsmmc1_pdata); 335 - s3c24xx_ts_set_platdata(NULL); 336 + s3c64xx_ts_set_platdata(NULL); 336 337 337 338 /* configure nCS1 width to 16 bits */ 338 339
+1 -2
arch/arm/mach-s3c64xx/mach-real6410.c
··· 203 203 &s3c_device_fb, 204 204 &s3c_device_nand, 205 205 &s3c_device_adc, 206 - &s3c_device_ts, 207 206 &s3c_device_ohci, 208 207 }; 209 208 ··· 301 302 302 303 s3c_fb_set_platdata(&real6410_lcd_pdata[features.lcd_index]); 303 304 s3c_nand_set_platdata(&real6410_nand_info); 304 - s3c24xx_ts_set_platdata(NULL); 305 + s3c64xx_ts_set_platdata(NULL); 305 306 306 307 /* configure nCS1 width to 16 bits */ 307 308
+1 -2
arch/arm/mach-s3c64xx/mach-smartq.c
··· 253 253 &s3c_device_ohci, 254 254 &s3c_device_rtc, 255 255 &samsung_device_pwm, 256 - &s3c_device_ts, 257 256 &s3c_device_usb_hsotg, 258 257 &s3c64xx_device_iis0, 259 258 &smartq_backlight_device, ··· 399 400 s3c_hwmon_set_platdata(&smartq_hwmon_pdata); 400 401 s3c_sdhci1_set_platdata(&smartq_internal_hsmmc_pdata); 401 402 s3c_sdhci2_set_platdata(&smartq_internal_hsmmc_pdata); 402 - s3c24xx_ts_set_platdata(&smartq_touchscreen_pdata); 403 + s3c64xx_ts_set_platdata(&smartq_touchscreen_pdata); 403 404 404 405 i2c_register_board_info(0, smartq_i2c_devs, 405 406 ARRAY_SIZE(smartq_i2c_devs));
+1 -2
arch/arm/mach-s3c64xx/mach-smdk6410.c
··· 290 290 &s3c_device_adc, 291 291 &s3c_device_cfcon, 292 292 &s3c_device_rtc, 293 - &s3c_device_ts, 294 293 &s3c_device_wdt, 295 294 }; 296 295 ··· 668 669 669 670 samsung_keypad_set_platdata(&smdk6410_keypad_data); 670 671 671 - s3c24xx_ts_set_platdata(NULL); 672 + s3c64xx_ts_set_platdata(NULL); 672 673 673 674 /* configure nCS1 width to 16 bits */ 674 675
+5 -17
arch/arm/plat-samsung/devs.c
··· 111 111 #if defined(CONFIG_SAMSUNG_DEV_ADC) 112 112 static struct resource s3c_adc_resource[] = { 113 113 [0] = DEFINE_RES_MEM(SAMSUNG_PA_ADC, SZ_256), 114 - [1] = DEFINE_RES_IRQ(IRQ_TC), 115 - [2] = DEFINE_RES_IRQ(IRQ_ADC), 114 + [1] = DEFINE_RES_IRQ(IRQ_ADC), 115 + [2] = DEFINE_RES_IRQ(IRQ_TC), 116 116 }; 117 117 118 118 struct platform_device s3c_device_adc = { 119 - .name = "samsung-adc", 119 + .name = "exynos-adc", 120 120 .id = -1, 121 121 .num_resources = ARRAY_SIZE(s3c_adc_resource), 122 122 .resource = s3c_adc_resource, ··· 939 939 #endif /* CONFIG_PLAT_S3C24XX */ 940 940 941 941 #ifdef CONFIG_SAMSUNG_DEV_TS 942 - static struct resource s3c_ts_resource[] = { 943 - [0] = DEFINE_RES_MEM(SAMSUNG_PA_ADC, SZ_256), 944 - [1] = DEFINE_RES_IRQ(IRQ_TC), 945 - }; 946 - 947 942 static struct s3c2410_ts_mach_info default_ts_data __initdata = { 948 943 .delay = 10000, 949 944 .presc = 49, 950 945 .oversampling_shift = 2, 951 946 }; 952 947 953 - struct platform_device s3c_device_ts = { 954 - .name = "s3c64xx-ts", 955 - .id = -1, 956 - .num_resources = ARRAY_SIZE(s3c_ts_resource), 957 - .resource = s3c_ts_resource, 958 - }; 959 - 960 - void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *pd) 948 + void __init s3c64xx_ts_set_platdata(struct s3c2410_ts_mach_info *pd) 961 949 { 962 950 if (!pd) 963 951 pd = &default_ts_data; 964 952 965 953 s3c_set_platdata(pd, sizeof(struct s3c2410_ts_mach_info), 966 - &s3c_device_ts); 954 + &s3c_device_adc); 967 955 } 968 956 #endif /* CONFIG_SAMSUNG_DEV_TS */ 969 957
+1
include/linux/platform_data/touchscreen-s3c2410.h
··· 17 17 }; 18 18 19 19 extern void s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *); 20 + extern void s3c64xx_ts_set_platdata(struct s3c2410_ts_mach_info *); 20 21 21 22 /* defined by architecture to configure gpio */ 22 23 extern void s3c24xx_ts_cfg_gpio(struct platform_device *dev);