diff options
| author | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2014-04-15 06:28:08 -0400 |
|---|---|---|
| committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2014-05-07 12:28:41 -0400 |
| commit | e4719d8ddb60a907d8fe8afa08f5719b31bf709d (patch) | |
| tree | 6e9c9d343e9f63803ec4c23273eb8de1cdb276e5 /drivers/input/touchscreen | |
| parent | 700a28a52690632034f6dd7f867785b8026a499b (diff) | |
Input: atmel_tsadcc: remove driver
The atmel_tsadcc driver is not used anymore, it has been replaced by at91_adc so
remove it.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'drivers/input/touchscreen')
| -rw-r--r-- | drivers/input/touchscreen/Kconfig | 12 | ||||
| -rw-r--r-- | drivers/input/touchscreen/Makefile | 1 | ||||
| -rw-r--r-- | drivers/input/touchscreen/atmel_tsadcc.c | 358 |
3 files changed, 0 insertions, 371 deletions
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index 68edc9db2c64..0b5965ba51bc 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig | |||
| @@ -550,18 +550,6 @@ config TOUCHSCREEN_TI_AM335X_TSC | |||
| 550 | To compile this driver as a module, choose M here: the | 550 | To compile this driver as a module, choose M here: the |
| 551 | module will be called ti_am335x_tsc. | 551 | module will be called ti_am335x_tsc. |
| 552 | 552 | ||
| 553 | config TOUCHSCREEN_ATMEL_TSADCC | ||
| 554 | tristate "Atmel Touchscreen Interface" | ||
| 555 | depends on ARCH_AT91 | ||
| 556 | help | ||
| 557 | Say Y here if you have a 4-wire touchscreen connected to the | ||
| 558 | ADC Controller on your Atmel SoC. | ||
| 559 | |||
| 560 | If unsure, say N. | ||
| 561 | |||
| 562 | To compile this driver as a module, choose M here: the | ||
| 563 | module will be called atmel_tsadcc. | ||
| 564 | |||
| 565 | config TOUCHSCREEN_UCB1400 | 553 | config TOUCHSCREEN_UCB1400 |
| 566 | tristate "Philips UCB1400 touchscreen" | 554 | tristate "Philips UCB1400 touchscreen" |
| 567 | depends on AC97_BUS | 555 | depends on AC97_BUS |
diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile index 4bc954b7c7c3..03f12a1f2218 100644 --- a/drivers/input/touchscreen/Makefile +++ b/drivers/input/touchscreen/Makefile | |||
| @@ -13,7 +13,6 @@ obj-$(CONFIG_TOUCHSCREEN_AD7879_I2C) += ad7879-i2c.o | |||
| 13 | obj-$(CONFIG_TOUCHSCREEN_AD7879_SPI) += ad7879-spi.o | 13 | obj-$(CONFIG_TOUCHSCREEN_AD7879_SPI) += ad7879-spi.o |
| 14 | obj-$(CONFIG_TOUCHSCREEN_ADS7846) += ads7846.o | 14 | obj-$(CONFIG_TOUCHSCREEN_ADS7846) += ads7846.o |
| 15 | obj-$(CONFIG_TOUCHSCREEN_ATMEL_MXT) += atmel_mxt_ts.o | 15 | obj-$(CONFIG_TOUCHSCREEN_ATMEL_MXT) += atmel_mxt_ts.o |
| 16 | obj-$(CONFIG_TOUCHSCREEN_ATMEL_TSADCC) += atmel_tsadcc.o | ||
| 17 | obj-$(CONFIG_TOUCHSCREEN_AUO_PIXCIR) += auo-pixcir-ts.o | 16 | obj-$(CONFIG_TOUCHSCREEN_AUO_PIXCIR) += auo-pixcir-ts.o |
| 18 | obj-$(CONFIG_TOUCHSCREEN_BU21013) += bu21013_ts.o | 17 | obj-$(CONFIG_TOUCHSCREEN_BU21013) += bu21013_ts.o |
| 19 | obj-$(CONFIG_TOUCHSCREEN_CY8CTMG110) += cy8ctmg110_ts.o | 18 | obj-$(CONFIG_TOUCHSCREEN_CY8CTMG110) += cy8ctmg110_ts.o |
diff --git a/drivers/input/touchscreen/atmel_tsadcc.c b/drivers/input/touchscreen/atmel_tsadcc.c deleted file mode 100644 index a7c9d6967d1e..000000000000 --- a/drivers/input/touchscreen/atmel_tsadcc.c +++ /dev/null | |||
| @@ -1,358 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Atmel Touch Screen Driver | ||
| 3 | * | ||
| 4 | * Copyright (c) 2008 ATMEL | ||
| 5 | * Copyright (c) 2008 Dan Liang | ||
| 6 | * Copyright (c) 2008 TimeSys Corporation | ||
| 7 | * Copyright (c) 2008 Justin Waters | ||
| 8 | * | ||
| 9 | * Based on touchscreen code from Atmel Corporation. | ||
| 10 | * | ||
| 11 | * This program is free software; you can redistribute it and/or modify | ||
| 12 | * it under the terms of the GNU General Public License version 2 as | ||
| 13 | * published by the Free Software Foundation. | ||
| 14 | */ | ||
| 15 | #include <linux/err.h> | ||
| 16 | #include <linux/kernel.h> | ||
| 17 | #include <linux/module.h> | ||
| 18 | #include <linux/input.h> | ||
| 19 | #include <linux/slab.h> | ||
| 20 | #include <linux/interrupt.h> | ||
| 21 | #include <linux/clk.h> | ||
| 22 | #include <linux/platform_device.h> | ||
| 23 | #include <linux/io.h> | ||
| 24 | #include <linux/platform_data/atmel.h> | ||
| 25 | #include <mach/cpu.h> | ||
| 26 | |||
| 27 | /* Register definitions based on AT91SAM9RL64 preliminary draft datasheet */ | ||
| 28 | |||
| 29 | #define ATMEL_TSADCC_CR 0x00 /* Control register */ | ||
| 30 | #define ATMEL_TSADCC_SWRST (1 << 0) /* Software Reset*/ | ||
| 31 | #define ATMEL_TSADCC_START (1 << 1) /* Start conversion */ | ||
| 32 | |||
| 33 | #define ATMEL_TSADCC_MR 0x04 /* Mode register */ | ||
| 34 | #define ATMEL_TSADCC_TSAMOD (3 << 0) /* ADC mode */ | ||
| 35 | #define ATMEL_TSADCC_TSAMOD_ADC_ONLY_MODE (0x0) /* ADC Mode */ | ||
| 36 | #define ATMEL_TSADCC_TSAMOD_TS_ONLY_MODE (0x1) /* Touch Screen Only Mode */ | ||
| 37 | #define ATMEL_TSADCC_LOWRES (1 << 4) /* Resolution selection */ | ||
| 38 | #define ATMEL_TSADCC_SLEEP (1 << 5) /* Sleep mode */ | ||
| 39 | #define ATMEL_TSADCC_PENDET (1 << 6) /* Pen Detect selection */ | ||
| 40 | #define ATMEL_TSADCC_PRES (1 << 7) /* Pressure Measurement Selection */ | ||
| 41 | #define ATMEL_TSADCC_PRESCAL (0x3f << 8) /* Prescalar Rate Selection */ | ||
| 42 | #define ATMEL_TSADCC_EPRESCAL (0xff << 8) /* Prescalar Rate Selection (Extended) */ | ||
| 43 | #define ATMEL_TSADCC_STARTUP (0x7f << 16) /* Start Up time */ | ||
| 44 | #define ATMEL_TSADCC_SHTIM (0xf << 24) /* Sample & Hold time */ | ||
| 45 | #define ATMEL_TSADCC_PENDBC (0xf << 28) /* Pen Detect debouncing time */ | ||
| 46 | |||
| 47 | #define ATMEL_TSADCC_TRGR 0x08 /* Trigger register */ | ||
| 48 | #define ATMEL_TSADCC_TRGMOD (7 << 0) /* Trigger mode */ | ||
| 49 | #define ATMEL_TSADCC_TRGMOD_NONE (0 << 0) | ||
| 50 | #define ATMEL_TSADCC_TRGMOD_EXT_RISING (1 << 0) | ||
| 51 | #define ATMEL_TSADCC_TRGMOD_EXT_FALLING (2 << 0) | ||
| 52 | #define ATMEL_TSADCC_TRGMOD_EXT_ANY (3 << 0) | ||
| 53 | #define ATMEL_TSADCC_TRGMOD_PENDET (4 << 0) | ||
| 54 | #define ATMEL_TSADCC_TRGMOD_PERIOD (5 << 0) | ||
| 55 | #define ATMEL_TSADCC_TRGMOD_CONTINUOUS (6 << 0) | ||
| 56 | #define ATMEL_TSADCC_TRGPER (0xffff << 16) /* Trigger period */ | ||
| 57 | |||
| 58 | #define ATMEL_TSADCC_TSR 0x0C /* Touch Screen register */ | ||
| 59 | #define ATMEL_TSADCC_TSFREQ (0xf << 0) /* TS Frequency in Interleaved mode */ | ||
| 60 | #define ATMEL_TSADCC_TSSHTIM (0xf << 24) /* Sample & Hold time */ | ||
| 61 | |||
| 62 | #define ATMEL_TSADCC_CHER 0x10 /* Channel Enable register */ | ||
| 63 | #define ATMEL_TSADCC_CHDR 0x14 /* Channel Disable register */ | ||
| 64 | #define ATMEL_TSADCC_CHSR 0x18 /* Channel Status register */ | ||
| 65 | #define ATMEL_TSADCC_CH(n) (1 << (n)) /* Channel number */ | ||
| 66 | |||
| 67 | #define ATMEL_TSADCC_SR 0x1C /* Status register */ | ||
| 68 | #define ATMEL_TSADCC_EOC(n) (1 << ((n)+0)) /* End of conversion for channel N */ | ||
| 69 | #define ATMEL_TSADCC_OVRE(n) (1 << ((n)+8)) /* Overrun error for channel N */ | ||
| 70 | #define ATMEL_TSADCC_DRDY (1 << 16) /* Data Ready */ | ||
| 71 | #define ATMEL_TSADCC_GOVRE (1 << 17) /* General Overrun Error */ | ||
| 72 | #define ATMEL_TSADCC_ENDRX (1 << 18) /* End of RX Buffer */ | ||
| 73 | #define ATMEL_TSADCC_RXBUFF (1 << 19) /* TX Buffer full */ | ||
| 74 | #define ATMEL_TSADCC_PENCNT (1 << 20) /* Pen contact */ | ||
| 75 | #define ATMEL_TSADCC_NOCNT (1 << 21) /* No contact */ | ||
| 76 | |||
| 77 | #define ATMEL_TSADCC_LCDR 0x20 /* Last Converted Data register */ | ||
| 78 | #define ATMEL_TSADCC_DATA (0x3ff << 0) /* Channel data */ | ||
| 79 | |||
| 80 | #define ATMEL_TSADCC_IER 0x24 /* Interrupt Enable register */ | ||
| 81 | #define ATMEL_TSADCC_IDR 0x28 /* Interrupt Disable register */ | ||
| 82 | #define ATMEL_TSADCC_IMR 0x2C /* Interrupt Mask register */ | ||
| 83 | #define ATMEL_TSADCC_CDR0 0x30 /* Channel Data 0 */ | ||
| 84 | #define ATMEL_TSADCC_CDR1 0x34 /* Channel Data 1 */ | ||
| 85 | #define ATMEL_TSADCC_CDR2 0x38 /* Channel Data 2 */ | ||
| 86 | #define ATMEL_TSADCC_CDR3 0x3C /* Channel Data 3 */ | ||
| 87 | #define ATMEL_TSADCC_CDR4 0x40 /* Channel Data 4 */ | ||
| 88 | #define ATMEL_TSADCC_CDR5 0x44 /* Channel Data 5 */ | ||
| 89 | |||
| 90 | #define ATMEL_TSADCC_XPOS 0x50 | ||
| 91 | #define ATMEL_TSADCC_Z1DAT 0x54 | ||
| 92 | #define ATMEL_TSADCC_Z2DAT 0x58 | ||
| 93 | |||
| 94 | #define PRESCALER_VAL(x) ((x) >> 8) | ||
| 95 | |||
| 96 | #define ADC_DEFAULT_CLOCK 100000 | ||
| 97 | |||
| 98 | struct atmel_tsadcc { | ||
| 99 | struct input_dev *input; | ||
| 100 | char phys[32]; | ||
| 101 | struct clk *clk; | ||
| 102 | int irq; | ||
| 103 | unsigned int prev_absx; | ||
| 104 | unsigned int prev_absy; | ||
| 105 | unsigned char bufferedmeasure; | ||
| 106 | }; | ||
| 107 | |||
| 108 | static void __iomem *tsc_base; | ||
| 109 | |||
| 110 | #define atmel_tsadcc_read(reg) __raw_readl(tsc_base + (reg)) | ||
| 111 | #define atmel_tsadcc_write(reg, val) __raw_writel((val), tsc_base + (reg)) | ||
| 112 | |||
| 113 | static irqreturn_t atmel_tsadcc_interrupt(int irq, void *dev) | ||
| 114 | { | ||
| 115 | struct atmel_tsadcc *ts_dev = (struct atmel_tsadcc *)dev; | ||
| 116 | struct input_dev *input_dev = ts_dev->input; | ||
| 117 | |||
| 118 | unsigned int status; | ||
| 119 | unsigned int reg; | ||
| 120 | |||
| 121 | status = atmel_tsadcc_read(ATMEL_TSADCC_SR); | ||
| 122 | status &= atmel_tsadcc_read(ATMEL_TSADCC_IMR); | ||
| 123 | |||
| 124 | if (status & ATMEL_TSADCC_NOCNT) { | ||
| 125 | /* Contact lost */ | ||
| 126 | reg = atmel_tsadcc_read(ATMEL_TSADCC_MR) | ATMEL_TSADCC_PENDBC; | ||
| 127 | |||
| 128 | atmel_tsadcc_write(ATMEL_TSADCC_MR, reg); | ||
| 129 | atmel_tsadcc_write(ATMEL_TSADCC_TRGR, ATMEL_TSADCC_TRGMOD_NONE); | ||
| 130 | atmel_tsadcc_write(ATMEL_TSADCC_IDR, | ||
| 131 | ATMEL_TSADCC_EOC(3) | ATMEL_TSADCC_NOCNT); | ||
| 132 | atmel_tsadcc_write(ATMEL_TSADCC_IER, ATMEL_TSADCC_PENCNT); | ||
| 133 | |||
| 134 | input_report_key(input_dev, BTN_TOUCH, 0); | ||
| 135 | ts_dev->bufferedmeasure = 0; | ||
| 136 | input_sync(input_dev); | ||
| 137 | |||
