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 <const@mimas.ru> 7 * Copyright (C) 2011 Ed Wildgoose <kernel@wildgooses.com> 8 * and Philip Prindeville <philipp@redfish-solutions.com> 9 */ 10 11 #include <linux/kernel.h> 12 #include <linux/init.h> 13 #include <linux/io.h> 14 #include <linux/string.h> 15 #include <linux/dmi.h> 16 17 #include <asm/geode.h> 18 19 #include "geode-common.h" 20 21 static const struct geode_led geos_leds[] __initconst = { 22 { 6, true }, 23 { 25, false }, 24 { 27, false }, 25 }; 26 27 static void __init register_geos(void) 28 { 29 geode_create_restart_key(3); 30 geode_create_leds("geos", geos_leds, ARRAY_SIZE(geos_leds)); 31 } 32 33 static int __init geos_init(void) 34 { 35 const char *vendor, *product; 36 37 if (!is_geode()) 38 return 0; 39 40 vendor = dmi_get_system_info(DMI_SYS_VENDOR); 41 if (!vendor || strcmp(vendor, "Traverse Technologies")) 42 return 0; 43 44 product = dmi_get_system_info(DMI_PRODUCT_NAME); 45 if (!product || strcmp(product, "Geos")) 46 return 0; 47 48 printk(KERN_INFO "%s: system is recognized as \"%s %s\"\n", 49 KBUILD_MODNAME, vendor, product); 50 51 register_geos(); 52 53 return 0; 54 } 55 device_initcall(geos_init); 56