diff options
author | mb <mb@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2008-03-19 10:35:56 +0000 |
---|---|---|
committer | mb <mb@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2008-03-19 10:35:56 +0000 |
commit | 89564986c396173f861d6def575f58c1c55992bf (patch) | |
tree | f981a46c28594b8ef6d8429f4b188b4980dfba7a /target/linux | |
parent | a989a4bdd97f2e2a5340bfb96494d84b93027573 (diff) |
bcm47xx: Register a GPIODEV platform device to allow GPIO access via /dev/gpio
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10623 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/brcm47xx/files/arch/mips/bcm947xx/setup.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/files/arch/mips/bcm947xx/setup.c b/target/linux/brcm47xx/files/arch/mips/bcm947xx/setup.c index 5856d8fc6..41d7b0b75 100644 --- a/target/linux/brcm47xx/files/arch/mips/bcm947xx/setup.c +++ b/target/linux/brcm47xx/files/arch/mips/bcm947xx/setup.c @@ -226,4 +226,21 @@ void __init plat_mem_setup(void) board_time_init = bcm47xx_time_init; } +static int __init bcm47xx_register_gpiodev(void) +{ + static struct resource res = { + .start = 0xFFFFFFFF, + }; + struct platform_device *pdev; + + pdev = platform_device_register_simple("GPIODEV", 0, &res, 1); + if (!pdev) { + printk(KERN_ERR "bcm47xx: GPIODEV init failed\n"); + return -ENODEV; + } + + return 0; +} +device_initcall(bcm47xx_register_gpiodev); + EXPORT_SYMBOL(ssb); |