stmpe.c (1a6e4b7415339e3b11a87cff0d701b8a2e55f062) | stmpe.c (1cda2394e95415f1469ab8eaffd081395e112551) |
---|---|
1/* 2 * ST Microelectronics MFD: stmpe's driver 3 * 4 * Copyright (C) ST-Ericsson SA 2010 5 * 6 * License Terms: GNU General Public License, version 2 7 * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson 8 */ --- 307 unchanged lines hidden (view full) --- 316 317static struct mfd_cell stmpe_keypad_cell = { 318 .name = "stmpe-keypad", 319 .resources = stmpe_keypad_resources, 320 .num_resources = ARRAY_SIZE(stmpe_keypad_resources), 321}; 322 323/* | 1/* 2 * ST Microelectronics MFD: stmpe's driver 3 * 4 * Copyright (C) ST-Ericsson SA 2010 5 * 6 * License Terms: GNU General Public License, version 2 7 * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson 8 */ --- 307 unchanged lines hidden (view full) --- 316 317static struct mfd_cell stmpe_keypad_cell = { 318 .name = "stmpe-keypad", 319 .resources = stmpe_keypad_resources, 320 .num_resources = ARRAY_SIZE(stmpe_keypad_resources), 321}; 322 323/* |
324 * Touchscreen (STMPE811) | 324 * Touchscreen (STMPE811 or STMPE610) |
325 */ 326 327static struct resource stmpe_ts_resources[] = { 328 { 329 .name = "TOUCH_DET", 330 .start = 0, 331 .end = 0, 332 .flags = IORESOURCE_IRQ, --- 8 unchanged lines hidden (view full) --- 341 342static struct mfd_cell stmpe_ts_cell = { 343 .name = "stmpe-ts", 344 .resources = stmpe_ts_resources, 345 .num_resources = ARRAY_SIZE(stmpe_ts_resources), 346}; 347 348/* | 325 */ 326 327static struct resource stmpe_ts_resources[] = { 328 { 329 .name = "TOUCH_DET", 330 .start = 0, 331 .end = 0, 332 .flags = IORESOURCE_IRQ, --- 8 unchanged lines hidden (view full) --- 341 342static struct mfd_cell stmpe_ts_cell = { 343 .name = "stmpe-ts", 344 .resources = stmpe_ts_resources, 345 .num_resources = ARRAY_SIZE(stmpe_ts_resources), 346}; 347 348/* |
349 * STMPE811 | 349 * STMPE811 or STMPE610 |
350 */ 351 352static const u8 stmpe811_regs[] = { 353 [STMPE_IDX_CHIP_ID] = STMPE811_REG_CHIP_ID, 354 [STMPE_IDX_ICR_LSB] = STMPE811_REG_INT_CTRL, 355 [STMPE_IDX_IER_LSB] = STMPE811_REG_INT_EN, 356 [STMPE_IDX_ISR_MSB] = STMPE811_REG_INT_STA, 357 [STMPE_IDX_GPMR_LSB] = STMPE811_REG_GPIO_MP_STA, --- 54 unchanged lines hidden (view full) --- 412 .regs = stmpe811_regs, 413 .blocks = stmpe811_blocks, 414 .num_blocks = ARRAY_SIZE(stmpe811_blocks), 415 .num_irqs = STMPE811_NR_INTERNAL_IRQS, 416 .enable = stmpe811_enable, 417 .get_altfunc = stmpe811_get_altfunc, 418}; 419 | 350 */ 351 352static const u8 stmpe811_regs[] = { 353 [STMPE_IDX_CHIP_ID] = STMPE811_REG_CHIP_ID, 354 [STMPE_IDX_ICR_LSB] = STMPE811_REG_INT_CTRL, 355 [STMPE_IDX_IER_LSB] = STMPE811_REG_INT_EN, 356 [STMPE_IDX_ISR_MSB] = STMPE811_REG_INT_STA, 357 [STMPE_IDX_GPMR_LSB] = STMPE811_REG_GPIO_MP_STA, --- 54 unchanged lines hidden (view full) --- 412 .regs = stmpe811_regs, 413 .blocks = stmpe811_blocks, 414 .num_blocks = ARRAY_SIZE(stmpe811_blocks), 415 .num_irqs = STMPE811_NR_INTERNAL_IRQS, 416 .enable = stmpe811_enable, 417 .get_altfunc = stmpe811_get_altfunc, 418}; 419 |
420/* Similar to 811, except number of gpios */ 421static struct stmpe_variant_info stmpe610 = { 422 .name = "stmpe610", 423 .id_val = 0x0811, 424 .id_mask = 0xffff, 425 .num_gpios = 6, 426 .af_bits = 1, 427 .regs = stmpe811_regs, 428 .blocks = stmpe811_blocks, 429 .num_blocks = ARRAY_SIZE(stmpe811_blocks), 430 .num_irqs = STMPE811_NR_INTERNAL_IRQS, 431 .enable = stmpe811_enable, 432 .get_altfunc = stmpe811_get_altfunc, 433}; 434 |
|
420/* 421 * STMPE1601 422 */ 423 424static const u8 stmpe1601_regs[] = { 425 [STMPE_IDX_CHIP_ID] = STMPE1601_REG_CHIP_ID, 426 [STMPE_IDX_ICR_LSB] = STMPE1601_REG_ICR_LSB, 427 [STMPE_IDX_IER_LSB] = STMPE1601_REG_IER_LSB, --- 218 unchanged lines hidden (view full) --- 646 .num_blocks = ARRAY_SIZE(stmpe24xx_blocks), 647 .num_irqs = STMPE24XX_NR_INTERNAL_IRQS, 648 .enable = stmpe24xx_enable, 649 .get_altfunc = stmpe24xx_get_altfunc, 650 .enable_autosleep = stmpe1601_autosleep, /* same as stmpe1601 */ 651}; 652 653static struct stmpe_variant_info *stmpe_variant_info[] = { | 435/* 436 * STMPE1601 437 */ 438 439static const u8 stmpe1601_regs[] = { 440 [STMPE_IDX_CHIP_ID] = STMPE1601_REG_CHIP_ID, 441 [STMPE_IDX_ICR_LSB] = STMPE1601_REG_ICR_LSB, 442 [STMPE_IDX_IER_LSB] = STMPE1601_REG_IER_LSB, --- 218 unchanged lines hidden (view full) --- 661 .num_blocks = ARRAY_SIZE(stmpe24xx_blocks), 662 .num_irqs = STMPE24XX_NR_INTERNAL_IRQS, 663 .enable = stmpe24xx_enable, 664 .get_altfunc = stmpe24xx_get_altfunc, 665 .enable_autosleep = stmpe1601_autosleep, /* same as stmpe1601 */ 666}; 667 668static struct stmpe_variant_info *stmpe_variant_info[] = { |
669 [STMPE610] = &stmpe610, |
|
654 [STMPE811] = &stmpe811, 655 [STMPE1601] = &stmpe1601, 656 [STMPE2401] = &stmpe2401, 657 [STMPE2403] = &stmpe2403, 658}; 659 660static irqreturn_t stmpe_irq(int irq, void *data) 661{ --- 331 unchanged lines hidden --- | 670 [STMPE811] = &stmpe811, 671 [STMPE1601] = &stmpe1601, 672 [STMPE2401] = &stmpe2401, 673 [STMPE2403] = &stmpe2403, 674}; 675 676static irqreturn_t stmpe_irq(int irq, void *data) 677{ --- 331 unchanged lines hidden --- |