Fix the touchscreen input device name.
No need in msg.spi = ts->spi assignments. It is done in
spi_async called from spi_sync.
No need in driver bus assignment. It is done in spi_driver_register.
Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
* during the last 20ms which means the pen has been lifted.
*/
* during the last 20ms which means the pen has been lifted.
*/
-#define TSC2005_HZ (14000000)
+#define TSC2005_VDD_LOWER_27
+
+#ifdef TSC2005_VDD_LOWER_27
+#define TSC2005_HZ (10000000)
+#else
+#define TSC2005_HZ (25000000)
+#endif
#define TSC2005_CMD (0x80)
#define TSC2005_REG (0x00)
#define TSC2005_CMD (0x80)
#define TSC2005_REG (0x00)
struct spi_message msg;
struct spi_transfer xfer = { 0 };
struct spi_message msg;
struct spi_transfer xfer = { 0 };
- spi_message_init(&msg);
- msg.spi = ts->spi;
xfer.tx_buf = &data;
xfer.rx_buf = NULL;
xfer.tx_buf = &data;
xfer.rx_buf = NULL;
+ spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
spi_sync(ts->spi, &msg);
}
spi_message_add_tail(&xfer, &msg);
spi_sync(ts->spi, &msg);
}
struct spi_transfer xfer = { 0 };
tx = (TSC2005_REG | reg | TSC2005_REG_PND0 |
struct spi_transfer xfer = { 0 };
tx = (TSC2005_REG | reg | TSC2005_REG_PND0 |
- TSC2005_REG_WRITE) << (2 * 8);
+ TSC2005_REG_WRITE) << 16;
- spi_message_init(&msg);
- msg.spi = ts->spi;
xfer.tx_buf = &tx;
xfer.rx_buf = NULL;
xfer.len = 4;
xfer.tx_buf = &tx;
xfer.rx_buf = NULL;
xfer.len = 4;
- xfer.bits_per_word = 3 * 8;
+ xfer.bits_per_word = 24;
+ spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
spi_sync(ts->spi, &msg);
}
spi_message_add_tail(&xfer, &msg);
spi_sync(ts->spi, &msg);
}
}
} else {
input_report_abs(ts->idev, ABS_PRESSURE, 0);
}
} else {
input_report_abs(ts->idev, ABS_PRESSURE, 0);
input_report_key(ts->idev, BTN_TOUCH, 0);
input_report_key(ts->idev, BTN_TOUCH, 0);
/*
* This interrupt is called when pen is down and coordinates are
/*
* This interrupt is called when pen is down and coordinates are
- * available. That is indicated by a falling edge on DEV line.
+ * available. That is indicated by a falling edge on DAV line.
*/
static irqreturn_t tsc2005_ts_irq_handler(int irq, void *dev_id)
{
*/
static irqreturn_t tsc2005_ts_irq_handler(int irq, void *dev_id)
{
int i;
spi_message_init(m);
int i;
spi_message_init(m);
for (i = 0; i < NUM_READ_REGS; i++, x++) {
x->tx_buf = &tsc2005_read_reg[i];
for (i = 0; i < NUM_READ_REGS; i++, x++) {
x->tx_buf = &tsc2005_read_reg[i];
- /*
- * TODO: should be "TSC2005 touchscreen", but X has hardcoded these
- * strings and doesn't accept TSC2005 yet...
- */
- idev->name = "TSC2301 touchscreen";
+ idev->name = "TSC2005 touchscreen";
snprintf(ts->phys, sizeof(ts->phys), "%s/input-ts",
ts->spi->dev.bus_id);
idev->phys = ts->phys;
snprintf(ts->phys, sizeof(ts->phys), "%s/input-ts",
ts->spi->dev.bus_id);
idev->phys = ts->phys;
static struct spi_driver tsc2005_driver = {
.driver = {
.name = "tsc2005",
static struct spi_driver tsc2005_driver = {
.driver = {
.name = "tsc2005",
.owner = THIS_MODULE,
},
#ifdef CONFIG_PM
.owner = THIS_MODULE,
},
#ifdef CONFIG_PM