mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-09 10:25:20 +02:00
75 lines
2.1 KiB
Diff
75 lines
2.1 KiB
Diff
|
Index: linux-2.6.25.16/arch/cris/arch-v10/drivers/ds1302.c
|
||
|
===================================================================
|
||
|
--- linux-2.6.25.16.o/arch/cris/arch-v10/drivers/ds1302.c 2008-10-26 15:54:02.000000000 +0100
|
||
|
+++ linux-2.6.25.16/arch/cris/arch-v10/drivers/ds1302.c 2008-10-26 15:59:37.000000000 +0100
|
||
|
@@ -21,6 +21,7 @@
|
||
|
#include <linux/delay.h>
|
||
|
#include <linux/bcd.h>
|
||
|
#include <linux/capability.h>
|
||
|
+#include <linux/device.h>
|
||
|
|
||
|
#include <asm/uaccess.h>
|
||
|
#include <asm/system.h>
|
||
|
@@ -489,6 +490,10 @@
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
+#ifdef CONFIG_SYSFS
|
||
|
+static struct class *rtc_class;
|
||
|
+#endif
|
||
|
+
|
||
|
static int __init ds1302_register(void)
|
||
|
{
|
||
|
ds1302_init();
|
||
|
@@ -497,6 +502,12 @@
|
||
|
ds1302_name, RTC_MAJOR_NR);
|
||
|
return -1;
|
||
|
}
|
||
|
+ #ifdef CONFIG_SYSFS
|
||
|
+ rtc_class = class_create(THIS_MODULE, "rtc");
|
||
|
+ class_device_create(rtc_class, NULL, MKDEV(RTC_MAJOR_NR, 0),
|
||
|
+ NULL, "rtc");
|
||
|
+ #endif
|
||
|
+
|
||
|
return 0;
|
||
|
|
||
|
}
|
||
|
Index: linux-2.6.25.16/arch/cris/arch-v10/drivers/gpio.c
|
||
|
===================================================================
|
||
|
--- linux-2.6.25.16.o/arch/cris/arch-v10/drivers/gpio.c 2008-10-26 15:56:28.000000000 +0100
|
||
|
+++ linux-2.6.25.16/arch/cris/arch-v10/drivers/gpio.c 2008-10-26 15:57:41.000000000 +0100
|
||
|
@@ -20,6 +20,7 @@
|
||
|
#include <linux/poll.h>
|
||
|
#include <linux/init.h>
|
||
|
#include <linux/interrupt.h>
|
||
|
+#include <linux/device.h>
|
||
|
|
||
|
#include <asm/etraxgpio.h>
|
||
|
#include <asm/arch/svinto.h>
|
||
|
@@ -768,6 +769,10 @@
|
||
|
|
||
|
/* main driver initialization routine, called from mem.c */
|
||
|
|
||
|
+#ifdef CONFIG_SYSFS
|
||
|
+static struct class *gpio_class;
|
||
|
+#endif
|
||
|
+
|
||
|
static int __init gpio_init(void)
|
||
|
{
|
||
|
int res;
|
||
|
@@ -781,6 +786,13 @@
|
||
|
return res;
|
||
|
}
|
||
|
|
||
|
+#ifdef CONFIG_SYSFS
|
||
|
+ gpio_class = class_create(THIS_MODULE, "gpio");
|
||
|
+ class_device_create(gpio_class, NULL, MKDEV(GPIO_MAJOR, 0), NULL, "gpioa");
|
||
|
+ class_device_create(gpio_class, NULL, MKDEV(GPIO_MAJOR, 1), NULL, "gpiob");
|
||
|
+ class_device_create(gpio_class, NULL, MKDEV(GPIO_MAJOR, 2), NULL, "leds");
|
||
|
+ class_device_create(gpio_class, NULL, MKDEV(GPIO_MAJOR, 3), NULL, "gpiog");
|
||
|
+#endif
|
||
|
/* Clear all leds */
|
||
|
#if defined (CONFIG_ETRAX_CSP0_LEDS) || defined (CONFIG_ETRAX_PA_LEDS) || defined (CONFIG_ETRAX_PB_LEDS)
|
||
|
CRIS_LED_NETWORK_SET(0);
|
||
|
|