11 #include <linux/kernel.h>
15 #include <linux/input.h>
17 #include <linux/omapfb.h>
33 #include <plat/clock.h>
35 #include <mach/hardware.h>
40 #define ADS7846_PENDOWN_GPIO 15
42 static const unsigned int nokia770_keymap[] = {
56 static struct resource nokia770_kp_resources[] = {
65 .keymap = nokia770_keymap,
72 .keymap_data = &nokia770_keymap_data,
77 .name =
"omap-keypad",
80 .platform_data = &nokia770_kp_data,
82 .num_resources =
ARRAY_SIZE(nokia770_kp_resources),
83 .resource = nokia770_kp_resources,
90 static void mipid_shutdown(
struct mipid_platform_data *
pdata)
92 if (pdata->nreset_gpio != -1) {
99 static struct mipid_platform_data nokia770_mipid_platform_data = {
100 .shutdown = mipid_shutdown,
104 .ctrl_name =
"hwa742",
107 static void __init mipid_dev_init(
void)
109 nokia770_mipid_platform_data.nreset_gpio = 13;
110 nokia770_mipid_platform_data.data_lines = 16;
115 static void __init ads7846_dev_init(
void)
121 static int ads7846_get_pendown_state(
void)
134 .get_pendown_state = ads7846_get_pendown_state,
137 static struct spi_board_info nokia770_spi_board_info[] __initdata = {
139 .modalias =
"lcd_mipid",
142 .max_speed_hz = 12000000,
143 .platform_data = &nokia770_mipid_platform_data,
146 .modalias =
"ads7846",
149 .max_speed_hz = 2500000,
150 .platform_data = &nokia770_ads7846_platform_data,
154 static void __init hwa742_dev_init(
void)
169 #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
171 #define NOKIA770_GPIO_MMC_POWER 41
172 #define NOKIA770_GPIO_MMC_SWITCH 23
174 static int nokia770_mmc_set_power(
struct device *
dev,
int slot,
int power_on,
181 static int nokia770_mmc_get_cover_state(
struct device *
dev,
int slot)
188 .max_freq = 12000000,
190 .set_power = nokia770_mmc_set_power,
191 .get_cover_state = nokia770_mmc_get_cover_state,
199 static void __init nokia770_mmc_init(
void)
203 ret =
gpio_request(NOKIA770_GPIO_MMC_POWER,
"MMC power");
208 ret =
gpio_request(NOKIA770_GPIO_MMC_SWITCH,
"MMC cover");
216 nokia770_mmc_data[1] = &nokia770_mmc2_data;
221 static inline void nokia770_mmc_init(
void)
226 static void __init omap_nokia770_init(
void)
251 .atag_offset = 0x100,
252 .map_io = omap16xx_map_io,
256 .init_machine = omap_nokia770_init,