Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/arch/x86/platform/geode/geos.c
26493 views
1
// SPDX-License-Identifier: GPL-2.0-only
2
/*
3
* System Specific setup for Traverse Technologies GEOS.
4
* At the moment this means setup of GPIO control of LEDs.
5
*
6
* Copyright (C) 2008 Constantin Baranov <[email protected]>
7
* Copyright (C) 2011 Ed Wildgoose <[email protected]>
8
* and Philip Prindeville <[email protected]>
9
*
10
* TODO: There are large similarities with leds-net5501.c
11
* by Alessandro Zummo <[email protected]>
12
* In the future leds-net5501.c should be migrated over to platform
13
*/
14
15
#include <linux/kernel.h>
16
#include <linux/init.h>
17
#include <linux/io.h>
18
#include <linux/string.h>
19
#include <linux/dmi.h>
20
21
#include <asm/geode.h>
22
23
#include "geode-common.h"
24
25
static const struct geode_led geos_leds[] __initconst = {
26
{ 6, true },
27
{ 25, false },
28
{ 27, false },
29
};
30
31
static void __init register_geos(void)
32
{
33
geode_create_restart_key(3);
34
geode_create_leds("geos", geos_leds, ARRAY_SIZE(geos_leds));
35
}
36
37
static int __init geos_init(void)
38
{
39
const char *vendor, *product;
40
41
if (!is_geode())
42
return 0;
43
44
vendor = dmi_get_system_info(DMI_SYS_VENDOR);
45
if (!vendor || strcmp(vendor, "Traverse Technologies"))
46
return 0;
47
48
product = dmi_get_system_info(DMI_PRODUCT_NAME);
49
if (!product || strcmp(product, "Geos"))
50
return 0;
51
52
printk(KERN_INFO "%s: system is recognized as \"%s %s\"\n",
53
KBUILD_MODNAME, vendor, product);
54
55
register_geos();
56
57
return 0;
58
}
59
device_initcall(geos_init);
60
61