Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- inside twl4030.c files:
- static int __devinit gpio_twl4030_probe(struct platform_device *pdev)
- {
- struct twl4030_gpio_platform_data *pdata = pdev->dev.platform_data;
- int ret,itime,atime;
- omap_cfg_reg(AE2_34XX_GPIO130_OUT);
- if (gpio_request(130, "AE2_34XX_GPIO130_OUT") == 0)
- {
- if(gpio_direction_output(130, 1)==0)
- {
- printk(KERN_INFO "IO_EXPANDER: WORKs!\n");
- gpio_set_value(130, 1);
- for(itime=0;itime<1000000;itime++)
- {
- for(atime=0;atime<1000000;atime++)
- might_sleep();
- }
- gpio_set_value(130, 0);
- for(itime=0;itime<1000000;itime++)
- {
- for(atime=0;atime<1000000;atime++)
- might_sleep();
- }
- gpio_set_value(130, 1);
- for(itime=0;itime<1000000;itime++)
- {
- for(atime=0;atime<1000000;atime++)
- might_sleep();
- }
- gpio_set_value(130, 1);
- }
- else
- printk(KERN_INFO "IO_EXPANDER: Not WORKs!\n");
- }
- else
- printk(KERN_INFO "IO_EXPANDER: Not WORKs!\n");
- inside devkit8000_defconfig files:
- CONFIG_OMAP_MUX=y
- inside board-devkit8000.c:
- static struct pin_config __initdata devkit8000_pins[] = {
- /*
- * Name, reg-offset,
- * mux-mode | [active-mode | off-mode]
- */
- /* added this GPIO_130->GPIO_139*/
- MUX_CFG_34XX("AE2_34XX_GPIO130_OUT", 0x158,
- OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement