// SPDX-License-Identifier: GPL-2.0-or-later
/*
- TSC2005 touchscreen driver
- Copyright © 2006-2010 Nokia Corporation
- Copyright © 2015 QWERTY Embedded Design
- Copyright © 2015 EMAC Inc.
*/
#include <linux/input.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/spi/spi.h>
#include <linux/regmap.h>
#include “tsc200x-core.h”
static const struct input_id tsc2005_input_id = {
.bustype = BUS_SPI,
.product = 2005,
};
static int tsc2005_cmd(struct device *dev, u8 cmd)
{
u8 tx = TSC200X_CMD | TSC200X_CMD_12BIT | cmd;
struct spi_transfer xfer = {
.tx_buf = &tx,
.len = 1,
.bits_per_word = 8,
};
struct spi_message msg;
struct spi_device *spi = to_spi_device(dev);
int error;