20 #include <linux/kernel.h>
23 #include <linux/string.h>
24 #include <linux/module.h>
28 #include <linux/input.h>
34 #define BIOS_SIGNATURE_TINYBIOS 0xf0000
35 #define BIOS_SIGNATURE_COREBOOT 0x500
36 #define BIOS_REGION_SIZE 0x10000
38 static bool force = 0;
48 .desc =
"Reset button",
51 .debounce_interval = 100,
56 .buttons = alix_gpio_buttons,
62 .name =
"gpio-keys-polled",
65 .platform_data = &alix_buttons_data,
69 static struct gpio_led alix_leds[] = {
73 .default_trigger =
"default-on",
79 .default_trigger =
"default-off",
85 .default_trigger =
"default-off",
98 .dev.platform_data = &alix_leds_data,
106 static void __init register_alix(
void)
112 static bool __init alix_present(
unsigned long bios_phys,
113 const char *alix_sig,
117 const char *bios_virt;
118 const char *scan_end;
124 "assume system is ALIX.2/ALIX.3\n",
130 scan_end = bios_virt + bios_len - (alix_sig_len + 2);
131 for (p = bios_virt; p < scan_end; p++) {
135 if (
memcmp(p, alix_sig, alix_sig_len) != 0)
138 memcpy(name, p,
sizeof(name));
150 tail = p + alix_sig_len;
151 if ((tail[0] ==
'2' || tail[0] ==
'3' || tail[0] ==
'6')) {
153 "%s: system is recognized as \"%s\"\n",
154 KBUILD_MODNAME, name);
162 static bool __init alix_present_dmi(
void)
167 if (!vendor ||
strcmp(vendor,
"PC Engines"))
171 if (!product || (
strcmp(product,
"ALIX.2D") &&
strcmp(product,
"ALIX.6")))
175 KBUILD_MODNAME, vendor, product);
180 static int __init alix_init(
void)
182 const char tinybios_sig[] =
"PC Engines ALIX.";
183 const char coreboot_sig[] =
"PC Engines\0ALIX.";