diff options
Diffstat (limited to 'arch/x86/platform')
-rw-r--r-- | arch/x86/platform/ce4100/falconfalls.dts | 7 | ||||
-rw-r--r-- | arch/x86/platform/geode/Makefile | 1 | ||||
-rw-r--r-- | arch/x86/platform/geode/geos.c | 128 | ||||
-rw-r--r-- | arch/x86/platform/mrst/mrst.c | 16 |
4 files changed, 150 insertions, 2 deletions
diff --git a/arch/x86/platform/ce4100/falconfalls.dts b/arch/x86/platform/ce4100/falconfalls.dts index e70be38ce039..ce874f872cc6 100644 --- a/arch/x86/platform/ce4100/falconfalls.dts +++ b/arch/x86/platform/ce4100/falconfalls.dts | |||
@@ -208,16 +208,19 @@ | |||
208 | interrupts = <14 1>; | 208 | interrupts = <14 1>; |
209 | }; | 209 | }; |
210 | 210 | ||
211 | gpio@b,1 { | 211 | pcigpio: gpio@b,1 { |
212 | #gpio-cells = <2>; | ||
213 | #interrupt-cells = <2>; | ||
212 | compatible = "pci8086,2e67.2", | 214 | compatible = "pci8086,2e67.2", |
213 | "pci8086,2e67", | 215 | "pci8086,2e67", |
214 | "pciclassff0000", | 216 | "pciclassff0000", |
215 | "pciclassff00"; | 217 | "pciclassff00"; |
216 | 218 | ||
217 | #gpio-cells = <2>; | ||
218 | reg = <0x15900 0x0 0x0 0x0 0x0>; | 219 | reg = <0x15900 0x0 0x0 0x0 0x0>; |
219 | interrupts = <15 1>; | 220 | interrupts = <15 1>; |
221 | interrupt-controller; | ||
220 | gpio-controller; | 222 | gpio-controller; |
223 | intel,muxctl = <0>; | ||
221 | }; | 224 | }; |
222 | 225 | ||
223 | i2c-controller@b,2 { | 226 | i2c-controller@b,2 { |
diff --git a/arch/x86/platform/geode/Makefile b/arch/x86/platform/geode/Makefile index 246b788847ff..5b51194f4c8d 100644 --- a/arch/x86/platform/geode/Makefile +++ b/arch/x86/platform/geode/Makefile | |||
@@ -1,2 +1,3 @@ | |||
1 | obj-$(CONFIG_ALIX) += alix.o | 1 | obj-$(CONFIG_ALIX) += alix.o |
2 | obj-$(CONFIG_NET5501) += net5501.o | 2 | obj-$(CONFIG_NET5501) += net5501.o |
3 | obj-$(CONFIG_GEOS) += geos.o | ||
diff --git a/arch/x86/platform/geode/geos.c b/arch/x86/platform/geode/geos.c new file mode 100644 index 000000000000..c2e6d53558be --- /dev/null +++ b/arch/x86/platform/geode/geos.c | |||
@@ -0,0 +1,128 @@ | |||
1 | /* | ||
2 | * System Specific setup for Traverse Technologies GEOS. | ||
3 | * At the moment this means setup of GPIO control of LEDs. | ||
4 | * | ||
5 | * Copyright (C) 2008 Constantin Baranov <const@mimas.ru> | ||
6 | * Copyright (C) 2011 Ed Wildgoose <kernel@wildgooses.com> | ||
7 | * and Philip Prindeville <philipp@redfish-solutions.com> | ||
8 | * | ||
9 | * TODO: There are large similarities with leds-net5501.c | ||
10 | * by Alessandro Zummo <a.zummo@towertech.it> | ||
11 | * In the future leds-net5501.c should be migrated over to platform | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify | ||
14 | * it under the terms of the GNU General Public License version 2 | ||
15 | * as published by the Free Software Foundation. | ||
16 | */ | ||
17 | |||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/io.h> | ||
21 | #include <linux/string.h> | ||
22 | #include <linux/module.h> | ||
23 | #include <linux/leds.h> | ||
24 | #include <linux/platform_device.h> | ||
25 | #include <linux/gpio.h> | ||
26 | #include <linux/input.h> | ||
27 | #include <linux/gpio_keys.h> | ||
28 | #include <linux/dmi.h> | ||
29 | |||
30 | #include <asm/geode.h> | ||
31 | |||
32 | static struct gpio_keys_button geos_gpio_buttons[] = { | ||
33 | { | ||
34 | .code = KEY_RESTART, | ||
35 | .gpio = 3, | ||
36 | .active_low = 1, | ||
37 | .desc = "Reset button", | ||
38 | .type = EV_KEY, | ||
39 | .wakeup = 0, | ||
40 | .debounce_interval = 100, | ||
41 | .can_disable = 0, | ||
42 | } | ||
43 | }; | ||
44 | static struct gpio_keys_platform_data geos_buttons_data = { | ||
45 | .buttons = geos_gpio_buttons, | ||
46 | .nbuttons = ARRAY_SIZE(geos_gpio_buttons), | ||
47 | .poll_interval = 20, | ||
48 | }; | ||
49 | |||
50 | static struct platform_device geos_buttons_dev = { | ||
51 | .name = "gpio-keys-polled", | ||
52 | .id = 1, | ||
53 | .dev = { | ||
54 | .platform_data = &geos_buttons_data, | ||
55 | } | ||
56 | }; | ||
57 | |||
58 | static struct gpio_led geos_leds[] = { | ||
59 | { | ||
60 | .name = "geos:1", | ||
61 | .gpio = 6, | ||
62 | .default_trigger = "default-on", | ||
63 | .active_low = 1, | ||
64 | }, | ||
65 | { | ||
66 | .name = "geos:2", | ||
67 | .gpio = 25, | ||
68 | .default_trigger = "default-off", | ||
69 | .active_low = 1, | ||
70 | }, | ||
71 | { | ||
72 | .name = "geos:3", | ||
73 | .gpio = 27, | ||
74 | .default_trigger = "default-off", | ||
75 | .active_low = 1, | ||
76 | }, | ||
77 | }; | ||
78 | |||
79 | static struct gpio_led_platform_data geos_leds_data = { | ||
80 | .num_leds = ARRAY_SIZE(geos_leds), | ||
81 | .leds = geos_leds, | ||
82 | }; | ||
83 | |||
84 | static struct platform_device geos_leds_dev = { | ||
85 | .name = "leds-gpio", | ||
86 | .id = -1, | ||
87 | .dev.platform_data = &geos_leds_data, | ||
88 | }; | ||
89 | |||
90 | static struct __initdata platform_device *geos_devs[] = { | ||
91 | &geos_buttons_dev, | ||
92 | &geos_leds_dev, | ||
93 | }; | ||
94 | |||
95 | static void __init register_geos(void) | ||
96 | { | ||
97 | /* Setup LED control through leds-gpio driver */ | ||
98 | platform_add_devices(geos_devs, ARRAY_SIZE(geos_devs)); | ||
99 | } | ||
100 | |||
101 | static int __init geos_init(void) | ||
102 | { | ||
103 | const char *vendor, *product; | ||
104 | |||
105 | if (!is_geode()) | ||
106 | return 0; | ||
107 | |||
108 | vendor = dmi_get_system_info(DMI_SYS_VENDOR); | ||
109 | if (!vendor || strcmp(vendor, "Traverse Technologies")) | ||
110 | return 0; | ||
111 | |||
112 | product = dmi_get_system_info(DMI_PRODUCT_NAME); | ||
113 | if (!product || strcmp(product, "Geos")) | ||
114 | return 0; | ||
115 | |||
116 | printk(KERN_INFO "%s: system is recognized as \"%s %s\"\n", | ||
117 | KBUILD_MODNAME, vendor, product); | ||
118 | |||
119 | register_geos(); | ||
120 | |||
121 | return 0; | ||
122 | } | ||
123 | |||
124 | module_init(geos_init); | ||
125 | |||
126 | MODULE_AUTHOR("Philip Prindeville <philipp@redfish-solutions.com>"); | ||
127 | MODULE_DESCRIPTION("Traverse Technologies Geos System Setup"); | ||
128 | MODULE_LICENSE("GPL"); | ||
diff --git a/arch/x86/platform/mrst/mrst.c b/arch/x86/platform/mrst/mrst.c index 721e65285dce..e0a37233c0af 100644 --- a/arch/x86/platform/mrst/mrst.c +++ b/arch/x86/platform/mrst/mrst.c | |||
@@ -28,6 +28,8 @@ | |||
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/notifier.h> | 29 | #include <linux/notifier.h> |
30 | #include <linux/mfd/intel_msic.h> | 30 | #include <linux/mfd/intel_msic.h> |
31 | #include <linux/gpio.h> | ||
32 | #include <linux/i2c/tc35876x.h> | ||
31 | 33 | ||
32 | #include <asm/setup.h> | 34 | #include <asm/setup.h> |
33 | #include <asm/mpspec_def.h> | 35 | #include <asm/mpspec_def.h> |
@@ -675,6 +677,19 @@ static void *msic_thermal_platform_data(void *info) | |||
675 | return msic_generic_platform_data(info, INTEL_MSIC_BLOCK_THERMAL); | 677 | return msic_generic_platform_data(info, INTEL_MSIC_BLOCK_THERMAL); |
676 | } | 678 | } |
677 | 679 | ||
680 | /* tc35876x DSI-LVDS bridge chip and panel platform data */ | ||
681 | static void *tc35876x_platform_data(void *data) | ||
682 | { | ||
683 | static struct tc35876x_platform_data pdata; | ||
684 | |||
685 | /* gpio pins set to -1 will not be used by the driver */ | ||
686 | pdata.gpio_bridge_reset = get_gpio_by_name("LCMB_RXEN"); | ||
687 | pdata.gpio_panel_bl_en = get_gpio_by_name("6S6P_BL_EN"); | ||
688 | pdata.gpio_panel_vadd = get_gpio_by_name("EN_VREG_LCD_V3P3"); | ||
689 | |||
690 | return &pdata; | ||
691 | } | ||
692 | |||
678 | static const struct devs_id __initconst device_ids[] = { | 693 | static const struct devs_id __initconst device_ids[] = { |
679 | {"bma023", SFI_DEV_TYPE_I2C, 1, &no_platform_data}, | 694 | {"bma023", SFI_DEV_TYPE_I2C, 1, &no_platform_data}, |
680 | {"pmic_gpio", SFI_DEV_TYPE_SPI, 1, &pmic_gpio_platform_data}, | 695 | {"pmic_gpio", SFI_DEV_TYPE_SPI, 1, &pmic_gpio_platform_data}, |
@@ -687,6 +702,7 @@ static const struct devs_id __initconst device_ids[] = { | |||
687 | {"i2c_accel", SFI_DEV_TYPE_I2C, 0, &lis331dl_platform_data}, | 702 | {"i2c_accel", SFI_DEV_TYPE_I2C, 0, &lis331dl_platform_data}, |
688 | {"pmic_audio", SFI_DEV_TYPE_IPC, 1, &no_platform_data}, | 703 | {"pmic_audio", SFI_DEV_TYPE_IPC, 1, &no_platform_data}, |
689 | {"mpu3050", SFI_DEV_TYPE_I2C, 1, &mpu3050_platform_data}, | 704 | {"mpu3050", SFI_DEV_TYPE_I2C, 1, &mpu3050_platform_data}, |
705 | {"i2c_disp_brig", SFI_DEV_TYPE_I2C, 0, &tc35876x_platform_data}, | ||
690 | 706 | ||
691 | /* MSIC subdevices */ | 707 | /* MSIC subdevices */ |
692 | {"msic_battery", SFI_DEV_TYPE_IPC, 1, &msic_battery_platform_data}, | 708 | {"msic_battery", SFI_DEV_TYPE_IPC, 1, &msic_battery_platform_data}, |