22 #include <linux/kernel.h>
27 #include <linux/module.h>
29 #include <linux/list.h>
31 #include <linux/slab.h>
32 #include <asm/pgtable.h>
55 #define BSR_MAX_DEVS (32)
75 static unsigned total_bsr_devs;
77 static struct class *bsr_class;
90 static unsigned bsr_types[
BSR_MAX];
161 static void bsr_cleanup_devs(
void)
177 int bsr_stride_len, bsr_bytes_len, num_bsr_devs;
186 if (!bsr_stride || !bsr_bytes ||
187 (bsr_stride_len != bsr_bytes_len)) {
192 num_bsr_devs = bsr_bytes_len /
sizeof(
u32);
194 for (i = 0 ; i < num_bsr_devs; i++) {
208 printk(
KERN_ERR "bsr of-node has invalid reg property, skipping\n");
270 total_bsr_devs += num_bsr_devs;
285 ret = bsr_add_node(bn);
295 static int __init bsr_init(
void)
306 if (IS_ERR(bsr_class)) {
308 ret = PTR_ERR(bsr_class);
314 bsr_major =
MAJOR(bsr_dev);
320 if ((ret = bsr_create_devs(np)) < 0) {
341 static void __exit bsr_exit(
void)