static int tekom_ts_probe(struct i2c_client *client, const struct i2c_device_id * id) { int ret = -EIO; struct tekom_touch_data *p_tekom_touch; struct input_dev *tekom_ts_input_dev; /* register input device */ tekom_ts_input_dev = input_allocate_device(); tekom_ts_input_dev->name = "Tekom capcitive touchscreen"; tekom_ts_input_dev->open = tekom_ts_input_open; tekom_ts_input_dev->close = tekom_ts_input_close; __set_bit(EV_ABS, tekom_ts_input_dev->evbit); __set_bit(ABS_X, tekom_ts_input_dev->absbit); __set_bit(ABS_Y, tekom_ts_input_dev->absbit); __set_bit(ABS_PRESSURE, tekom_ts_input_dev->absbit); set_bit(EV_KEY, tekom_ts_input_dev->evbit); set_bit(BTN_TOUCH, tekom_ts_input_dev->keybit); /* Malloc p_touch context */ p_tekom_touch = kzalloc(sizeof(struct tekom_touch_data), GFP_KERNEL); if (!p_tekom_touch) { ret = -ENOMEM; goto err; } p_tekom_touch->tekom_ts_input_dev = tekom_ts_input_dev; platform_set_drvdata(client, p_tekom_touch); input_set_drvdata(tekom_ts_input_dev, p_tekom_touch); ret = input_register_device(tekom_ts_input_dev); p_tekom_touch->client = client; p_tekom_touch->pen_down = 0; p_tekom_touch->use_count = 0; p_tekom_touch->poll_jiffies = 5; tekom_touch_gpio_init(); ret = request_irq(IRQ_GPIO(MFP2GPIO(TOUCH_INT)), tekom_touch_interrupt, IRQF_TRIGGER_FALLING, "Tekom_capcitive", p_tekom_touch); ret = request_irq(IRQ_GPIO(MFP2GPIO(SLIDE_INT)), slide_interrupt, IRQF_TRIGGER_FALLING|IRQF_TRIGGER_RISING, "SLIDE_INT", p_tekom_touch); init_timer(&p_tekom_touch->poll_timer); p_tekom_touch->poll_timer.data = (unsigned long)p_tekom_touch; p_tekom_touch->poll_timer.function = tekom_poll_timer_handler; ret = sysfs_create_group(&client->dev.kobj, &tekom_touch_attr_group); printk("Android tekom capcitive touchscreen driver register succ\n"); return 0; err: return ret; }
static int serial_xr20m_startup(struct uart_port *port) { unsigned long flags; int ret; xr20m_sleep_enable(0); xr20m_write(XR20M_FCR, 0x7); /* Reset FIFO */ ret = request_irq(IRQ_GPIO(MFP2GPIO(XR20M_INT)), uart2ssp_irq_handler, IRQF_TRIGGER_FALLING, "xr20m int", port); if (ret) { xr20m_err("Request IRQ failed, return:%d\n", ret); return ret; } /* Now, initialize the UART */ spin_lock_irqsave(&port->lock, flags); //port->mctrl |= TIOCM_OUT2; port->mctrl |= TIOCM_RTS; serial_xr20m_set_mctrl(port, port->mctrl); spin_unlock_irqrestore(&port->lock, flags); xr20m_dbg("\n"); return 0; }
local_irq_restore(flags); } static struct pxaficp_platform_data zylonite_ficp_platform_data = { .transceiver_cap = IR_SIRMODE | IR_OFF, .transceiver_mode = zylonite_irda_transceiver_mode, }; #endif static struct resource smc91x_resources[] = { { .start = (ZYLONITE_ETH_PHYS + 0x300), .end = (ZYLONITE_ETH_PHYS + 0xfffff), .flags = IORESOURCE_MEM, }, { .start = IRQ_GPIO(MFP2GPIO(MFP_DEBUG_ETH_INT_GPIO)), .end = IRQ_GPIO(MFP2GPIO(MFP_DEBUG_ETH_INT_GPIO)), .flags = IORESOURCE_IRQ, } }; static struct platform_device smc91x_device = { .name = "smc91x", .id = 0, .num_resources = ARRAY_SIZE(smc91x_resources), .resource = smc91x_resources, }; #ifdef CONFIG_FB_PXA static void zylonite_backlight_power(int on)
static void serial_xr20m_shutdown(struct uart_port *port) { free_irq(IRQ_GPIO(MFP2GPIO(XR20M_INT)), port); }
.coherent_dma_mask = 0xffffffffUL, }, .num_resources = ARRAY_SIZE(pxaac97_resources), .resource = pxaac97_resources, }; static struct platform_device pxatouch_device = { .name = "pxa2xx-touch", .id = -1, }; #ifdef CONFIG_PXA3xx_GPIOEX #include <asm/arch/mhn_gpio.h> static struct resource gpio_exp0_resources[] = { [0] = { .start = IRQ_GPIO(MFP2GPIO(MFP_GPIO_EXP_0_N)), .end = IRQ_GPIO(MFP2GPIO(MFP_GPIO_EXP_0_N)), .flags = IORESOURCE_IRQ, }, [1] = { .start = GPIO_EXP0_ADDRESS, .end = GPIO_EXP0_ADDRESS, .flags = IORESOURCE_MEM, }, [2] = { .start = GPIO_EXP0_START, .end = GPIO_EXP0_END, .flags = IORESOURCE_IO, }, };