add broadcom b44 driver support
[openwrt.git] / target / linux / etrax / patches / cris / 013-crisdriver-sysfs.patch
1 diff -urN linux-2.6.19.2.orig/arch/cris/arch-v10/drivers/ds1302.c linux-2.6.19.2/arch/cris/arch-v10/drivers/ds1302.c
2 --- linux-2.6.19.2.orig/arch/cris/arch-v10/drivers/ds1302.c 2007-05-28 22:35:23.000000000 +0200
3 +++ linux-2.6.19.2/arch/cris/arch-v10/drivers/ds1302.c 2007-05-28 22:55:40.000000000 +0200
4 @@ -21,7 +21,7 @@
5 #include <linux/delay.h>
6 #include <linux/bcd.h>
7 #include <linux/capability.h>
8 -
9 +#include <linux/device.h>
10 #include <asm/uaccess.h>
11 #include <asm/system.h>
12 #include <asm/arch/svinto.h>
13 @@ -480,6 +480,10 @@
14 return 0;
15 }
16
17 +#ifdef CONFIG_SYSFS
18 +static struct class *rtc_class;
19 +#endif
20 +
21 static int __init ds1302_register(void)
22 {
23 ds1302_init();
24 @@ -488,7 +492,15 @@
25 ds1302_name, RTC_MAJOR_NR);
26 return -1;
27 }
28 - return 0;
29 +
30 + #ifdef CONFIG_SYSFS
31 + rtc_class = class_create(THIS_MODULE, "rtc");
32 + class_device_create(rtc_class, NULL,
33 + MKDEV(RTC_MAJOR_NR, 0),
34 + NULL, "rtc");
35 + #endif
36 +
37 + return 0;
38
39 }
40
41 diff -urN linux-2.6.19.2.orig/arch/cris/arch-v10/drivers/eeprom.c linux-2.6.19.2/arch/cris/arch-v10/drivers/eeprom.c
42 --- linux-2.6.19.2.orig/arch/cris/arch-v10/drivers/eeprom.c 2007-05-28 22:35:23.000000000 +0200
43 +++ linux-2.6.19.2/arch/cris/arch-v10/drivers/eeprom.c 2007-05-28 23:03:45.000000000 +0200
44 @@ -103,6 +103,7 @@
45 #include <linux/delay.h>
46 #include <linux/interrupt.h>
47 #include <linux/wait.h>
48 +#include <linux/device.h>
49 #include <asm/uaccess.h>
50 #include "i2c.h"
51
52 @@ -185,6 +186,9 @@
53 };
54
55 /* eeprom init call. Probes for different eeprom models. */
56 +#ifdef CONFIG_SYSFS
57 +static struct class *eep_class;
58 +#endif
59
60 int __init eeprom_init(void)
61 {
62 @@ -202,7 +206,13 @@
63 eeprom_name, EEPROM_MAJOR_NR);
64 return -1;
65 }
66 -
67 +
68 +#ifdef CONFIG_SYSFS
69 + eep_class = class_create(THIS_MODULE, "eep");
70 + class_device_create(eep_class, NULL, MKDEV(EEPROM_MAJOR, 0), NULL, "eeprom");
71 +#endif
72 +
73 +
74 printk("EEPROM char device v0.3, (c) 2000 Axis Communications AB\n");
75
76 /*
77 diff -urN linux-2.6.19.2.orig/arch/cris/arch-v10/drivers/gpio.c linux-2.6.19.2/arch/cris/arch-v10/drivers/gpio.c
78 --- linux-2.6.19.2.orig/arch/cris/arch-v10/drivers/gpio.c 2007-05-28 22:35:23.000000000 +0200
79 +++ linux-2.6.19.2/arch/cris/arch-v10/drivers/gpio.c 2007-05-28 22:59:27.000000000 +0200
80 @@ -181,6 +181,7 @@
81 #include <linux/poll.h>
82 #include <linux/init.h>
83 #include <linux/interrupt.h>
84 +#include <linux/device.h>
85
86 #include <asm/etraxgpio.h>
87 #include <asm/arch/svinto.h>
88 @@ -938,6 +939,10 @@
89
90 /* main driver initialization routine, called from mem.c */
91
92 +#ifdef CONFIG_SYSFS
93 +static struct class *gpio_class;
94 +#endif
95 +
96 static __init int
97 gpio_init(void)
98 {
99 @@ -955,6 +960,14 @@
100 return res;
101 }
102
103 +#ifdef CONFIG_SYSFS
104 + gpio_class = class_create(THIS_MODULE, "gpio");
105 + class_device_create(gpio_class, NULL, MKDEV(GPIO_MAJOR, 0), NULL, "gpioa");
106 + class_device_create(gpio_class, NULL, MKDEV(GPIO_MAJOR, 1), NULL, "gpiob");
107 + class_device_create(gpio_class, NULL, MKDEV(GPIO_MAJOR, 2), NULL, "leds");
108 + class_device_create(gpio_class, NULL, MKDEV(GPIO_MAJOR, 3), NULL, "gpiog");
109 +#endif
110 +
111 /* Clear all leds */
112 #if defined (CONFIG_ETRAX_CSP0_LEDS) || defined (CONFIG_ETRAX_PA_LEDS) || defined (CONFIG_ETRAX_PB_LEDS)
113 LED_NETWORK_SET(0);
114 diff -urN linux-2.6.19.2.orig/arch/cris/arch-v10/drivers/pcf8563.c linux-2.6.19.2/arch/cris/arch-v10/drivers/pcf8563.c
115 --- linux-2.6.19.2.orig/arch/cris/arch-v10/drivers/pcf8563.c 2007-05-28 22:35:23.000000000 +0200
116 +++ linux-2.6.19.2/arch/cris/arch-v10/drivers/pcf8563.c 2007-05-28 23:09:02.000000000 +0200
117 @@ -26,6 +26,7 @@
118 #include <linux/ioctl.h>
119 #include <linux/delay.h>
120 #include <linux/bcd.h>
121 +#include <linux/device.h>
122
123 #include <asm/uaccess.h>
124 #include <asm/system.h>
125 @@ -344,6 +345,10 @@
126 return 0;
127 }
128
129 +#ifdef CONFIG_SYSFS
130 +static struct class *pcf8563_class;
131 +#endif
132 +
133 static int __init
134 pcf8563_register(void)
135 {
136 @@ -358,6 +363,10 @@
137 "device.\n", PCF8563_NAME, PCF8563_MAJOR);
138 return -1;
139 }
140 +#ifdef CONFIG_SYSFS
141 + pcf8563_class = class_create(THIS_MODULE, "pcf8563");
142 + class_device_create(pcf8563_class, NULL, MKDEV(PCF8563_MAJOR, 0), NULL, "rtc");
143 +#endif
144
145 printk(KERN_INFO "%s Real-Time Clock Driver, %s\n", PCF8563_NAME,
146 DRIVER_VERSION);
147 diff -urN linux-2.6.19.2.orig/arch/cris/arch-v10/drivers/sync_serial.c linux-2.6.19.2/arch/cris/arch-v10/drivers/sync_serial.c
148 --- linux-2.6.19.2.orig/arch/cris/arch-v10/drivers/sync_serial.c 2007-05-28 22:35:23.000000000 +0200
149 +++ linux-2.6.19.2/arch/cris/arch-v10/drivers/sync_serial.c 2007-05-28 23:06:41.000000000 +0200
150 @@ -29,6 +29,8 @@
151 #include <asm/uaccess.h>
152 #include <asm/system.h>
153 #include <asm/sync_serial.h>
154 +#include <linux/device.h>
155 +
156 #include <asm/arch/io_interface_mux.h>
157
158 /* The receiver is a bit tricky beacuse of the continuous stream of data.*/
159 @@ -241,6 +243,9 @@
160 .open = sync_serial_open,
161 .release = sync_serial_release
162 };
163 +#ifdef CONFIG_SYSFS
164 +static struct class *syncser_class;
165 +#endif
166
167 static int __init etrax_sync_serial_init(void)
168 {
169 @@ -274,6 +279,11 @@
170 printk("unable to get major for synchronous serial port\n");
171 return -EBUSY;
172 }
173 +#ifdef CONFIG_SYSFS
174 + syncser_class = class_create(THIS_MODULE, "syncser");
175 + class_device_create(syncser_class, NULL, MKDEV(SYNC_SERIAL_MAJOR, 0), NULL, "syncser0");
176 + class_device_create(syncser_class, NULL, MKDEV(SYNC_SERIAL_MAJOR, 1), NULL, "syncser1");
177 +#endif
178
179 /* Deselect synchronous serial ports while configuring. */
180 SETS(gen_config_ii_shadow, R_GEN_CONFIG_II, sermode1, async);
This page took 0.057837 seconds and 5 git commands to generate.