/* * Copyright (C) 2012 LAPIS Semiconductor Co., Ltd. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. */ #include #include #include #include #include #define PCH_GPIO_BASE 244 /* GPIO for USB VBUS detection */ #define CROWNBAY_GPIO_VBUS_PORT 5 static struct gpio_vbus_mach_info crownbay_gpio_vbus_data = { .gpio_vbus = (PCH_GPIO_BASE + CROWNBAY_GPIO_VBUS_PORT), }; static struct platform_device crownbay_gpio_vbus_device = { .name = "pch-gpio-vbus", .id = -1, .dev = { .platform_data = &crownbay_gpio_vbus_data, }, }; static int __init crownbay_platform_init(void) { int retval; retval = platform_device_register(&crownbay_gpio_vbus_device); printk(KERN_INFO "Registered gpio-vbus device for Crown Bay\n"); return retval; } module_init(crownbay_platform_init); static void __exit crownbay_platform_exit(void) { platform_device_unregister(&crownbay_gpio_vbus_device); } module_exit(crownbay_platform_exit); MODULE_DESCRIPTION("Intel Crown Bay Platform Driver"); MODULE_LICENSE("GPL");