18 #include <linux/serial_core.h>
27 #include <mach/regs-gpio.h>
30 #include <plat/clock.h>
45 #define UCON S3C2410_UCON_DEFAULT
46 #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE)
47 #define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE)
73 static void smartq_usb_host_powercontrol(
int port,
int to)
75 pr_debug(
"%s(%d, %d)\n", __func__, port, to);
88 pr_debug(
"%s: over-current irq (oc detected)\n", __func__);
89 s3c2410_usb_report_oc(info, 3);
91 pr_debug(
"%s: over-current irq (oc cleared)\n", __func__);
92 s3c2410_usb_report_oc(info, 0);
103 if (machine_is_smartq5())
110 "USB host overcurrent", info);
112 pr_err(
"failed to request usb oc irq: %d\n", ret);
126 .power_control = smartq_usb_host_powercontrol,
127 .enable_oc = smartq_usb_host_enableoc,
133 .gpio_vbus_inverted =
true,
138 .dev.platform_data = &smartq_usb_otg_vbus_pdata,
141 static int smartq_bl_init(
struct device *
dev)
150 .max_brightness = 1000,
151 .dft_brightness = 600,
152 .pwm_period_ns = 1000000000 / (1000 * 20),
153 .
init = smartq_bl_init,
157 .name =
"pwm-backlight",
160 .platform_data = &smartq_backlight_data,
167 .oversampling_shift = 4,
178 .name =
"smartq:battery-voltage",
184 .name =
"smartq:reference-voltage",
192 static int __init smartq_lcd_setup_gpio(
void)
216 .dev.platform_data = &smartq_lcd_control,
219 static void smartq_lcd_power_set(
struct plat_lcd_data *pd,
unsigned int power)
225 .set_power = smartq_lcd_power_set,
229 .name =
"platform-lcd",
231 .dev.platform_data = &smartq_lcd_power_data,
252 &smartq_backlight_device,
253 &smartq_lcd_control_device,
254 &smartq_lcd_power_device,
255 &smartq_usb_otg_vbus_dev,
258 static void __init smartq_lcd_mode_set(
void)
274 static void smartq_power_off(
void)
279 static int __init smartq_power_off_init(
void)
285 pr_err(
"%s: failed to get GPK15\n", __func__);
297 static int __init smartq_usb_host_init(
void)
303 pr_err(
"%s: failed to get GPL0\n", __func__);
309 pr_err(
"%s: failed to get GPL1\n", __func__);
313 if (!machine_is_smartq5()) {
317 pr_err(
"%s: failed to get GPL10\n", __func__);
325 if (!machine_is_smartq5())
339 static int __init smartq_usb_otg_init(
void)
346 static int __init smartq_wifi_init(
void)
352 pr_err(
"%s: failed to get GPK1\n", __func__);
358 pr_err(
"%s: failed to get GPK2\n", __func__);
375 static struct map_desc smartq_iodesc[] __initdata = {};
382 smartq_lcd_mode_set();
397 WARN_ON(smartq_lcd_setup_gpio());
398 WARN_ON(smartq_power_off_init());
399 WARN_ON(smartq_usb_host_init());
400 WARN_ON(smartq_usb_otg_init());