root/include/linux/platform_data/cyttsp4.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /* SPDX-License-Identifier: GPL-2.0-only */
   2 /*
   3  * Header file for:
   4  * Cypress TrueTouch(TM) Standard Product (TTSP) touchscreen drivers.
   5  * For use with Cypress Txx3xx parts.
   6  * Supported parts include:
   7  * CY8CTST341
   8  * CY8CTMA340
   9  *
  10  * Copyright (C) 2009, 2010, 2011 Cypress Semiconductor, Inc.
  11  * Copyright (C) 2012 Javier Martinez Canillas <javier@dowhile0.org>
  12  *
  13  * Contact Cypress Semiconductor at www.cypress.com (kev@cypress.com)
  14  */
  15 #ifndef _CYTTSP4_H_
  16 #define _CYTTSP4_H_
  17 
  18 #define CYTTSP4_MT_NAME "cyttsp4_mt"
  19 #define CYTTSP4_I2C_NAME "cyttsp4_i2c_adapter"
  20 #define CYTTSP4_SPI_NAME "cyttsp4_spi_adapter"
  21 
  22 #define CY_TOUCH_SETTINGS_MAX 32
  23 
  24 struct touch_framework {
  25         const uint16_t  *abs;
  26         uint8_t         size;
  27         uint8_t         enable_vkeys;
  28 } __packed;
  29 
  30 struct cyttsp4_mt_platform_data {
  31         struct touch_framework *frmwrk;
  32         unsigned short flags;
  33         char const *inp_dev_name;
  34 };
  35 
  36 struct touch_settings {
  37         const uint8_t *data;
  38         uint32_t size;
  39         uint8_t tag;
  40 } __packed;
  41 
  42 struct cyttsp4_core_platform_data {
  43         int irq_gpio;
  44         int rst_gpio;
  45         int level_irq_udelay;
  46         int (*xres)(struct cyttsp4_core_platform_data *pdata,
  47                 struct device *dev);
  48         int (*init)(struct cyttsp4_core_platform_data *pdata,
  49                 int on, struct device *dev);
  50         int (*power)(struct cyttsp4_core_platform_data *pdata,
  51                 int on, struct device *dev, atomic_t *ignore_irq);
  52         int (*irq_stat)(struct cyttsp4_core_platform_data *pdata,
  53                 struct device *dev);
  54         struct touch_settings *sett[CY_TOUCH_SETTINGS_MAX];
  55 };
  56 
  57 struct cyttsp4_platform_data {
  58         struct cyttsp4_core_platform_data *core_pdata;
  59         struct cyttsp4_mt_platform_data *mt_pdata;
  60 };
  61 
  62 #endif /* _CYTTSP4_H_ */

/* [<][>][^][v][top][bottom][index][help] */