1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-only */ 2*4882a593Smuzhiyun /* 3*4882a593Smuzhiyun * Copyright (c) 2011-2016 Synaptics Incorporated 4*4882a593Smuzhiyun * Copyright (c) 2011 Unixphere 5*4882a593Smuzhiyun */ 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun #ifndef _RMI_H 8*4882a593Smuzhiyun #define _RMI_H 9*4882a593Smuzhiyun #include <linux/kernel.h> 10*4882a593Smuzhiyun #include <linux/device.h> 11*4882a593Smuzhiyun #include <linux/interrupt.h> 12*4882a593Smuzhiyun #include <linux/input.h> 13*4882a593Smuzhiyun #include <linux/kfifo.h> 14*4882a593Smuzhiyun #include <linux/list.h> 15*4882a593Smuzhiyun #include <linux/module.h> 16*4882a593Smuzhiyun #include <linux/types.h> 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun #define NAME_BUFFER_SIZE 256 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun /** 21*4882a593Smuzhiyun * struct rmi_2d_axis_alignment - target axis alignment 22*4882a593Smuzhiyun * @swap_axes: set to TRUE if desired to swap x- and y-axis 23*4882a593Smuzhiyun * @flip_x: set to TRUE if desired to flip direction on x-axis 24*4882a593Smuzhiyun * @flip_y: set to TRUE if desired to flip direction on y-axis 25*4882a593Smuzhiyun * @clip_x_low - reported X coordinates below this setting will be clipped to 26*4882a593Smuzhiyun * the specified value 27*4882a593Smuzhiyun * @clip_x_high - reported X coordinates above this setting will be clipped to 28*4882a593Smuzhiyun * the specified value 29*4882a593Smuzhiyun * @clip_y_low - reported Y coordinates below this setting will be clipped to 30*4882a593Smuzhiyun * the specified value 31*4882a593Smuzhiyun * @clip_y_high - reported Y coordinates above this setting will be clipped to 32*4882a593Smuzhiyun * the specified value 33*4882a593Smuzhiyun * @offset_x - this value will be added to all reported X coordinates 34*4882a593Smuzhiyun * @offset_y - this value will be added to all reported Y coordinates 35*4882a593Smuzhiyun * @rel_report_enabled - if set to true, the relative reporting will be 36*4882a593Smuzhiyun * automatically enabled for this sensor. 37*4882a593Smuzhiyun */ 38*4882a593Smuzhiyun struct rmi_2d_axis_alignment { 39*4882a593Smuzhiyun bool swap_axes; 40*4882a593Smuzhiyun bool flip_x; 41*4882a593Smuzhiyun bool flip_y; 42*4882a593Smuzhiyun u16 clip_x_low; 43*4882a593Smuzhiyun u16 clip_y_low; 44*4882a593Smuzhiyun u16 clip_x_high; 45*4882a593Smuzhiyun u16 clip_y_high; 46*4882a593Smuzhiyun u16 offset_x; 47*4882a593Smuzhiyun u16 offset_y; 48*4882a593Smuzhiyun u8 delta_x_threshold; 49*4882a593Smuzhiyun u8 delta_y_threshold; 50*4882a593Smuzhiyun }; 51*4882a593Smuzhiyun 52*4882a593Smuzhiyun /** This is used to override any hints an F11 2D sensor might have provided 53*4882a593Smuzhiyun * as to what type of sensor it is. 54*4882a593Smuzhiyun * 55*4882a593Smuzhiyun * @rmi_f11_sensor_default - do not override, determine from F11_2D_QUERY14 if 56*4882a593Smuzhiyun * available. 57*4882a593Smuzhiyun * @rmi_f11_sensor_touchscreen - treat the sensor as a touchscreen (direct 58*4882a593Smuzhiyun * pointing). 59*4882a593Smuzhiyun * @rmi_f11_sensor_touchpad - thread the sensor as a touchpad (indirect 60*4882a593Smuzhiyun * pointing). 61*4882a593Smuzhiyun */ 62*4882a593Smuzhiyun enum rmi_sensor_type { 63*4882a593Smuzhiyun rmi_sensor_default = 0, 64*4882a593Smuzhiyun rmi_sensor_touchscreen, 65*4882a593Smuzhiyun rmi_sensor_touchpad 66*4882a593Smuzhiyun }; 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun #define RMI_F11_DISABLE_ABS_REPORT BIT(0) 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun /** 71*4882a593Smuzhiyun * struct rmi_2d_sensor_data - overrides defaults for a 2D sensor. 72*4882a593Smuzhiyun * @axis_align - provides axis alignment overrides (see above). 73*4882a593Smuzhiyun * @sensor_type - Forces the driver to treat the sensor as an indirect 74*4882a593Smuzhiyun * pointing device (touchpad) rather than a direct pointing device 75*4882a593Smuzhiyun * (touchscreen). This is useful when F11_2D_QUERY14 register is not 76*4882a593Smuzhiyun * available. 77*4882a593Smuzhiyun * @disable_report_mask - Force data to not be reported even if it is supported 78*4882a593Smuzhiyun * by the firware. 79*4882a593Smuzhiyun * @topbuttonpad - Used with the "5 buttons touchpads" found on the Lenovo 40 80*4882a593Smuzhiyun * series 81*4882a593Smuzhiyun * @kernel_tracking - most moderns RMI f11 firmwares implement Multifinger 82*4882a593Smuzhiyun * Type B protocol. However, there are some corner cases where the user 83*4882a593Smuzhiyun * triggers some jumps by tapping with two fingers on the touchpad. 84*4882a593Smuzhiyun * Use this setting and dmax to filter out these jumps. 85*4882a593Smuzhiyun * Also, when using an old sensor using MF Type A behavior, set to true to 86*4882a593Smuzhiyun * report an actual MT protocol B. 87*4882a593Smuzhiyun * @dmax - the maximum distance (in sensor units) the kernel tracking allows two 88*4882a593Smuzhiyun * distincts fingers to be considered the same. 89*4882a593Smuzhiyun */ 90*4882a593Smuzhiyun struct rmi_2d_sensor_platform_data { 91*4882a593Smuzhiyun struct rmi_2d_axis_alignment axis_align; 92*4882a593Smuzhiyun enum rmi_sensor_type sensor_type; 93*4882a593Smuzhiyun int x_mm; 94*4882a593Smuzhiyun int y_mm; 95*4882a593Smuzhiyun int disable_report_mask; 96*4882a593Smuzhiyun u16 rezero_wait; 97*4882a593Smuzhiyun bool topbuttonpad; 98*4882a593Smuzhiyun bool kernel_tracking; 99*4882a593Smuzhiyun int dmax; 100*4882a593Smuzhiyun int dribble; 101*4882a593Smuzhiyun int palm_detect; 102*4882a593Smuzhiyun }; 103*4882a593Smuzhiyun 104*4882a593Smuzhiyun /** 105*4882a593Smuzhiyun * struct rmi_gpio_data - overrides defaults for a single F30/F3A GPIOs/LED 106*4882a593Smuzhiyun * chip. 107*4882a593Smuzhiyun * @buttonpad - the touchpad is a buttonpad, so enable only the first actual 108*4882a593Smuzhiyun * button that is found. 109*4882a593Smuzhiyun * @trackstick_buttons - Set when the function 30 or 3a is handling the physical 110*4882a593Smuzhiyun * buttons of the trackstick (as a PS/2 passthrough device). 111*4882a593Smuzhiyun * @disable - the touchpad incorrectly reports F30/F3A and it should be ignored. 112*4882a593Smuzhiyun * This is a special case which is due to misconfigured firmware. 113*4882a593Smuzhiyun */ 114*4882a593Smuzhiyun struct rmi_gpio_data { 115*4882a593Smuzhiyun bool buttonpad; 116*4882a593Smuzhiyun bool trackstick_buttons; 117*4882a593Smuzhiyun bool disable; 118*4882a593Smuzhiyun }; 119*4882a593Smuzhiyun 120*4882a593Smuzhiyun 121*4882a593Smuzhiyun /* 122*4882a593Smuzhiyun * Set the state of a register 123*4882a593Smuzhiyun * DEFAULT - use the default value set by the firmware config 124*4882a593Smuzhiyun * OFF - explicitly disable the register 125*4882a593Smuzhiyun * ON - explicitly enable the register 126*4882a593Smuzhiyun */ 127*4882a593Smuzhiyun enum rmi_reg_state { 128*4882a593Smuzhiyun RMI_REG_STATE_DEFAULT = 0, 129*4882a593Smuzhiyun RMI_REG_STATE_OFF = 1, 130*4882a593Smuzhiyun RMI_REG_STATE_ON = 2 131*4882a593Smuzhiyun }; 132*4882a593Smuzhiyun 133*4882a593Smuzhiyun /** 134*4882a593Smuzhiyun * struct rmi_f01_power_management -When non-zero, these values will be written 135*4882a593Smuzhiyun * to the touch sensor to override the default firmware settigns. For a 136*4882a593Smuzhiyun * detailed explanation of what each field does, see the corresponding 137*4882a593Smuzhiyun * documention in the RMI4 specification. 138*4882a593Smuzhiyun * 139*4882a593Smuzhiyun * @nosleep - specifies whether the device is permitted to sleep or doze (that 140*4882a593Smuzhiyun * is, enter a temporary low power state) when no fingers are touching the 141*4882a593Smuzhiyun * sensor. 142*4882a593Smuzhiyun * @wakeup_threshold - controls the capacitance threshold at which the touch 143*4882a593Smuzhiyun * sensor will decide to wake up from that low power state. 144*4882a593Smuzhiyun * @doze_holdoff - controls how long the touch sensor waits after the last 145*4882a593Smuzhiyun * finger lifts before entering the doze state, in units of 100ms. 146*4882a593Smuzhiyun * @doze_interval - controls the interval between checks for finger presence 147*4882a593Smuzhiyun * when the touch sensor is in doze mode, in units of 10ms. 148*4882a593Smuzhiyun */ 149*4882a593Smuzhiyun struct rmi_f01_power_management { 150*4882a593Smuzhiyun enum rmi_reg_state nosleep; 151*4882a593Smuzhiyun u8 wakeup_threshold; 152*4882a593Smuzhiyun u8 doze_holdoff; 153*4882a593Smuzhiyun u8 doze_interval; 154*4882a593Smuzhiyun }; 155*4882a593Smuzhiyun 156*4882a593Smuzhiyun /** 157*4882a593Smuzhiyun * struct rmi_device_platform_data_spi - provides parameters used in SPI 158*4882a593Smuzhiyun * communications. All Synaptics SPI products support a standard SPI 159*4882a593Smuzhiyun * interface; some also support what is called SPI V2 mode, depending on 160*4882a593Smuzhiyun * firmware and/or ASIC limitations. In V2 mode, the touch sensor can 161*4882a593Smuzhiyun * support shorter delays during certain operations, and these are specified 162*4882a593Smuzhiyun * separately from the standard mode delays. 163*4882a593Smuzhiyun * 164*4882a593Smuzhiyun * @block_delay - for standard SPI transactions consisting of both a read and 165*4882a593Smuzhiyun * write operation, the delay (in microseconds) between the read and write 166*4882a593Smuzhiyun * operations. 167*4882a593Smuzhiyun * @split_read_block_delay_us - for V2 SPI transactions consisting of both a 168*4882a593Smuzhiyun * read and write operation, the delay (in microseconds) between the read and 169*4882a593Smuzhiyun * write operations. 170*4882a593Smuzhiyun * @read_delay_us - the delay between each byte of a read operation in normal 171*4882a593Smuzhiyun * SPI mode. 172*4882a593Smuzhiyun * @write_delay_us - the delay between each byte of a write operation in normal 173*4882a593Smuzhiyun * SPI mode. 174*4882a593Smuzhiyun * @split_read_byte_delay_us - the delay between each byte of a read operation 175*4882a593Smuzhiyun * in V2 mode. 176*4882a593Smuzhiyun * @pre_delay_us - the delay before the start of a SPI transaction. This is 177*4882a593Smuzhiyun * typically useful in conjunction with custom chip select assertions (see 178*4882a593Smuzhiyun * below). 179*4882a593Smuzhiyun * @post_delay_us - the delay after the completion of an SPI transaction. This 180*4882a593Smuzhiyun * is typically useful in conjunction with custom chip select assertions (see 181*4882a593Smuzhiyun * below). 182*4882a593Smuzhiyun * @cs_assert - For systems where the SPI subsystem does not control the CS/SSB 183*4882a593Smuzhiyun * line, or where such control is broken, you can provide a custom routine to 184*4882a593Smuzhiyun * handle a GPIO as CS/SSB. This routine will be called at the beginning and 185*4882a593Smuzhiyun * end of each SPI transaction. The RMI SPI implementation will wait 186*4882a593Smuzhiyun * pre_delay_us after this routine returns before starting the SPI transfer; 187*4882a593Smuzhiyun * and post_delay_us after completion of the SPI transfer(s) before calling it 188*4882a593Smuzhiyun * with assert==FALSE. 189*4882a593Smuzhiyun */ 190*4882a593Smuzhiyun struct rmi_device_platform_data_spi { 191*4882a593Smuzhiyun u32 block_delay_us; 192*4882a593Smuzhiyun u32 split_read_block_delay_us; 193*4882a593Smuzhiyun u32 read_delay_us; 194*4882a593Smuzhiyun u32 write_delay_us; 195*4882a593Smuzhiyun u32 split_read_byte_delay_us; 196*4882a593Smuzhiyun u32 pre_delay_us; 197*4882a593Smuzhiyun u32 post_delay_us; 198*4882a593Smuzhiyun u8 bits_per_word; 199*4882a593Smuzhiyun u16 mode; 200*4882a593Smuzhiyun 201*4882a593Smuzhiyun void *cs_assert_data; 202*4882a593Smuzhiyun int (*cs_assert)(const void *cs_assert_data, const bool assert); 203*4882a593Smuzhiyun }; 204*4882a593Smuzhiyun 205*4882a593Smuzhiyun /** 206*4882a593Smuzhiyun * struct rmi_device_platform_data - system specific configuration info. 207*4882a593Smuzhiyun * 208*4882a593Smuzhiyun * @reset_delay_ms - after issuing a reset command to the touch sensor, the 209*4882a593Smuzhiyun * driver waits a few milliseconds to give the firmware a chance to 210*4882a593Smuzhiyun * re-initialize. You can override the default wait period here. 211*4882a593Smuzhiyun * @irq: irq associated with the attn gpio line, or negative 212*4882a593Smuzhiyun */ 213*4882a593Smuzhiyun struct rmi_device_platform_data { 214*4882a593Smuzhiyun int reset_delay_ms; 215*4882a593Smuzhiyun int irq; 216*4882a593Smuzhiyun 217*4882a593Smuzhiyun struct rmi_device_platform_data_spi spi_data; 218*4882a593Smuzhiyun 219*4882a593Smuzhiyun /* function handler pdata */ 220*4882a593Smuzhiyun struct rmi_2d_sensor_platform_data sensor_pdata; 221*4882a593Smuzhiyun struct rmi_f01_power_management power_management; 222*4882a593Smuzhiyun struct rmi_gpio_data gpio_data; 223*4882a593Smuzhiyun }; 224*4882a593Smuzhiyun 225*4882a593Smuzhiyun /** 226*4882a593Smuzhiyun * struct rmi_function_descriptor - RMI function base addresses 227*4882a593Smuzhiyun * 228*4882a593Smuzhiyun * @query_base_addr: The RMI Query base address 229*4882a593Smuzhiyun * @command_base_addr: The RMI Command base address 230*4882a593Smuzhiyun * @control_base_addr: The RMI Control base address 231*4882a593Smuzhiyun * @data_base_addr: The RMI Data base address 232*4882a593Smuzhiyun * @interrupt_source_count: The number of irqs this RMI function needs 233*4882a593Smuzhiyun * @function_number: The RMI function number 234*4882a593Smuzhiyun * 235*4882a593Smuzhiyun * This struct is used when iterating the Page Description Table. The addresses 236*4882a593Smuzhiyun * are 16-bit values to include the current page address. 237*4882a593Smuzhiyun * 238*4882a593Smuzhiyun */ 239*4882a593Smuzhiyun struct rmi_function_descriptor { 240*4882a593Smuzhiyun u16 query_base_addr; 241*4882a593Smuzhiyun u16 command_base_addr; 242*4882a593Smuzhiyun u16 control_base_addr; 243*4882a593Smuzhiyun u16 data_base_addr; 244*4882a593Smuzhiyun u8 interrupt_source_count; 245*4882a593Smuzhiyun u8 function_number; 246*4882a593Smuzhiyun u8 function_version; 247*4882a593Smuzhiyun }; 248*4882a593Smuzhiyun 249*4882a593Smuzhiyun struct rmi_device; 250*4882a593Smuzhiyun 251*4882a593Smuzhiyun /** 252*4882a593Smuzhiyun * struct rmi_transport_dev - represent an RMI transport device 253*4882a593Smuzhiyun * 254*4882a593Smuzhiyun * @dev: Pointer to the communication device, e.g. i2c or spi 255*4882a593Smuzhiyun * @rmi_dev: Pointer to the RMI device 256*4882a593Smuzhiyun * @proto_name: name of the transport protocol (SPI, i2c, etc) 257*4882a593Smuzhiyun * @ops: pointer to transport operations implementation 258*4882a593Smuzhiyun * 259*4882a593Smuzhiyun * The RMI transport device implements the glue between different communication 260*4882a593Smuzhiyun * buses such as I2C and SPI. 261*4882a593Smuzhiyun * 262*4882a593Smuzhiyun */ 263*4882a593Smuzhiyun struct rmi_transport_dev { 264*4882a593Smuzhiyun struct device *dev; 265*4882a593Smuzhiyun struct rmi_device *rmi_dev; 266*4882a593Smuzhiyun 267*4882a593Smuzhiyun const char *proto_name; 268*4882a593Smuzhiyun const struct rmi_transport_ops *ops; 269*4882a593Smuzhiyun 270*4882a593Smuzhiyun struct rmi_device_platform_data pdata; 271*4882a593Smuzhiyun 272*4882a593Smuzhiyun struct input_dev *input; 273*4882a593Smuzhiyun }; 274*4882a593Smuzhiyun 275*4882a593Smuzhiyun /** 276*4882a593Smuzhiyun * struct rmi_transport_ops - defines transport protocol operations. 277*4882a593Smuzhiyun * 278*4882a593Smuzhiyun * @write_block: Writing a block of data to the specified address 279*4882a593Smuzhiyun * @read_block: Read a block of data from the specified address. 280*4882a593Smuzhiyun */ 281*4882a593Smuzhiyun struct rmi_transport_ops { 282*4882a593Smuzhiyun int (*write_block)(struct rmi_transport_dev *xport, u16 addr, 283*4882a593Smuzhiyun const void *buf, size_t len); 284*4882a593Smuzhiyun int (*read_block)(struct rmi_transport_dev *xport, u16 addr, 285*4882a593Smuzhiyun void *buf, size_t len); 286*4882a593Smuzhiyun int (*reset)(struct rmi_transport_dev *xport, u16 reset_addr); 287*4882a593Smuzhiyun }; 288*4882a593Smuzhiyun 289*4882a593Smuzhiyun /** 290*4882a593Smuzhiyun * struct rmi_driver - driver for an RMI4 sensor on the RMI bus. 291*4882a593Smuzhiyun * 292*4882a593Smuzhiyun * @driver: Device driver model driver 293*4882a593Smuzhiyun * @reset_handler: Called when a reset is detected. 294*4882a593Smuzhiyun * @clear_irq_bits: Clear the specified bits in the current interrupt mask. 295*4882a593Smuzhiyun * @set_irq_bist: Set the specified bits in the current interrupt mask. 296*4882a593Smuzhiyun * @store_productid: Callback for cache product id from function 01 297*4882a593Smuzhiyun * @data: Private data pointer 298*4882a593Smuzhiyun * 299*4882a593Smuzhiyun */ 300*4882a593Smuzhiyun struct rmi_driver { 301*4882a593Smuzhiyun struct device_driver driver; 302*4882a593Smuzhiyun 303*4882a593Smuzhiyun int (*reset_handler)(struct rmi_device *rmi_dev); 304*4882a593Smuzhiyun int (*clear_irq_bits)(struct rmi_device *rmi_dev, unsigned long *mask); 305*4882a593Smuzhiyun int (*set_irq_bits)(struct rmi_device *rmi_dev, unsigned long *mask); 306*4882a593Smuzhiyun int (*store_productid)(struct rmi_device *rmi_dev); 307*4882a593Smuzhiyun int (*set_input_params)(struct rmi_device *rmi_dev, 308*4882a593Smuzhiyun struct input_dev *input); 309*4882a593Smuzhiyun void *data; 310*4882a593Smuzhiyun }; 311*4882a593Smuzhiyun 312*4882a593Smuzhiyun /** 313*4882a593Smuzhiyun * struct rmi_device - represents an RMI4 sensor device on the RMI bus. 314*4882a593Smuzhiyun * 315*4882a593Smuzhiyun * @dev: The device created for the RMI bus 316*4882a593Smuzhiyun * @number: Unique number for the device on the bus. 317*4882a593Smuzhiyun * @driver: Pointer to associated driver 318*4882a593Smuzhiyun * @xport: Pointer to the transport interface 319*4882a593Smuzhiyun * 320*4882a593Smuzhiyun */ 321*4882a593Smuzhiyun struct rmi_device { 322*4882a593Smuzhiyun struct device dev; 323*4882a593Smuzhiyun int number; 324*4882a593Smuzhiyun 325*4882a593Smuzhiyun struct rmi_driver *driver; 326*4882a593Smuzhiyun struct rmi_transport_dev *xport; 327*4882a593Smuzhiyun 328*4882a593Smuzhiyun }; 329*4882a593Smuzhiyun 330*4882a593Smuzhiyun struct rmi4_attn_data { 331*4882a593Smuzhiyun unsigned long irq_status; 332*4882a593Smuzhiyun size_t size; 333*4882a593Smuzhiyun void *data; 334*4882a593Smuzhiyun }; 335*4882a593Smuzhiyun 336*4882a593Smuzhiyun struct rmi_driver_data { 337*4882a593Smuzhiyun struct list_head function_list; 338*4882a593Smuzhiyun 339*4882a593Smuzhiyun struct rmi_device *rmi_dev; 340*4882a593Smuzhiyun 341*4882a593Smuzhiyun struct rmi_function *f01_container; 342*4882a593Smuzhiyun struct rmi_function *f34_container; 343*4882a593Smuzhiyun bool bootloader_mode; 344*4882a593Smuzhiyun 345*4882a593Smuzhiyun int num_of_irq_regs; 346*4882a593Smuzhiyun int irq_count; 347*4882a593Smuzhiyun void *irq_memory; 348*4882a593Smuzhiyun unsigned long *irq_status; 349*4882a593Smuzhiyun unsigned long *fn_irq_bits; 350*4882a593Smuzhiyun unsigned long *current_irq_mask; 351*4882a593Smuzhiyun unsigned long *new_irq_mask; 352*4882a593Smuzhiyun struct mutex irq_mutex; 353*4882a593Smuzhiyun struct input_dev *input; 354*4882a593Smuzhiyun 355*4882a593Smuzhiyun struct irq_domain *irqdomain; 356*4882a593Smuzhiyun 357*4882a593Smuzhiyun u8 pdt_props; 358*4882a593Smuzhiyun 359*4882a593Smuzhiyun u8 num_rx_electrodes; 360*4882a593Smuzhiyun u8 num_tx_electrodes; 361*4882a593Smuzhiyun 362*4882a593Smuzhiyun bool enabled; 363*4882a593Smuzhiyun struct mutex enabled_mutex; 364*4882a593Smuzhiyun 365*4882a593Smuzhiyun struct rmi4_attn_data attn_data; 366*4882a593Smuzhiyun DECLARE_KFIFO(attn_fifo, struct rmi4_attn_data, 16); 367*4882a593Smuzhiyun }; 368*4882a593Smuzhiyun 369*4882a593Smuzhiyun int rmi_register_transport_device(struct rmi_transport_dev *xport); 370*4882a593Smuzhiyun void rmi_unregister_transport_device(struct rmi_transport_dev *xport); 371*4882a593Smuzhiyun 372*4882a593Smuzhiyun void rmi_set_attn_data(struct rmi_device *rmi_dev, unsigned long irq_status, 373*4882a593Smuzhiyun void *data, size_t size); 374*4882a593Smuzhiyun 375*4882a593Smuzhiyun int rmi_driver_suspend(struct rmi_device *rmi_dev, bool enable_wake); 376*4882a593Smuzhiyun int rmi_driver_resume(struct rmi_device *rmi_dev, bool clear_wake); 377*4882a593Smuzhiyun #endif 378