bcm47xx: Register a GPIODEV platform device to allow GPIO access via /dev/gpio

SVN-Revision: 10623
owl
Michael Büsch 2008-03-19 10:35:56 +00:00
parent a4920f613a
commit c7ac9d3282
1 changed files with 17 additions and 0 deletions

View File

@ -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);