input: maxim_sti: clean up the driver
Remove unnecessary macros and fix checkpatch errors. Fix of_* apis to parse gpios and add pinctrl support. Change-Id: I0ed7e31eb490ccf950e599469ff78338cae137d4 Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
This commit is contained in:
parent
dfa24901bb
commit
bf4d970916
5 changed files with 203 additions and 362 deletions
|
@ -0,0 +1,47 @@
|
|||
Maxim STI touch controller:
|
||||
|
||||
Required properties:
|
||||
- spi-max-frequency: Maximum SPI frequency supported by the controller.
|
||||
- avdd-supply: analog power supply.
|
||||
- dvdd-supply: digial power supply.
|
||||
- maxim_sti,irq-gpio: irq gpio.
|
||||
- maxim_sti,reset-gpio: reset gpio.
|
||||
- maxim_sti,touch_fusion: path to touch_fusion daemon.
|
||||
- maxim_sti,config_file: path to config file.
|
||||
- maxim_sti,fw_name: name of firmware file.
|
||||
|
||||
Optional properties:
|
||||
- pinctrl-names : this should be defined if a target uses pinctrl framework.
|
||||
See "pinctrl" in documentation/devicetree/bindings/pinctrl/msm-pinctrl.txt.
|
||||
It should specify the names of the configs that pinctrl can install in driver.
|
||||
Following are the pinctrl configs that can be installed:
|
||||
"pmx_ts_active" : active configuration of pins. This should specify active
|
||||
config defined in pin groups of interrupt and reset gpios.
|
||||
"pmx_ts_suspend" : disabled configuration of pins. This should specify sleep
|
||||
config defined in pin groups of interrupt and reset gpios.
|
||||
|
||||
Example:
|
||||
|
||||
&spi_13 { /* BLSP1 QUP3 */
|
||||
status = "ok";
|
||||
maxim_sti@0 {
|
||||
compatible = "maxim,maxim_sti";
|
||||
reg = <0>;
|
||||
interrupt-parent = <&msm_gpio>;
|
||||
interrupts = <65 0>;
|
||||
spi-max-frequency = <16000000>;
|
||||
avdd-supply = <&pm8950_l17>;
|
||||
dvdd-supply = <&pm8950_l6>;
|
||||
spi-supply = <&pm8950_l5>;
|
||||
maxim_sti,irq-gpio = <&msm_gpio 65 0x00>;
|
||||
maxim_sti,reset-gpio = <&msm_gpio 64 0x00>;
|
||||
maxim_sti,touch_fusion = "/vendor/bin/touch_fusion";
|
||||
maxim_sti,config_file = "/vendor/firmware/touch_fusion_panel_id_0x%04x.cfg";
|
||||
maxim_sti,fw_name = "maxim_fp35.bin";
|
||||
pinctrl-names = "pmx_ts_active","pmx_ts_suspend","pmx_ts_release";
|
||||
pinctrl-0 = <&ts_int_active &ts_reset_active>;
|
||||
pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>;
|
||||
pinctrl-2 = <&ts_release>;
|
||||
};
|
||||
};
|
||||
|
|
@ -1106,4 +1106,16 @@ config TOUCHSCREEN_ROHM_BU21023
|
|||
To compile this driver as a module, choose M here: the
|
||||
module will be called bu21023_ts.
|
||||
|
||||
config TOUCHSCREEN_MAXIM_STI
|
||||
tristate "Maxim based STI touchscreens"
|
||||
depends on SPI_MASTER
|
||||
help
|
||||
Say Y here if you have a touchscreen interface using the
|
||||
Maxim STI based touch controller.
|
||||
|
||||
If unsure, say N
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called maxim_sti.
|
||||
|
||||
endif
|
||||
|
|
|
@ -45,6 +45,7 @@ obj-$(CONFIG_TOUCHSCREEN_INTEL_MID) += intel-mid-touch.o
|
|||
obj-$(CONFIG_TOUCHSCREEN_IPROC) += bcm_iproc_tsc.o
|
||||
obj-$(CONFIG_TOUCHSCREEN_LPC32XX) += lpc32xx_ts.o
|
||||
obj-$(CONFIG_TOUCHSCREEN_MAX11801) += max11801_ts.o
|
||||
obj-$(CONFIG_TOUCHSCREEN_MAXIM_STI) += maxim_sti.o
|
||||
obj-$(CONFIG_TOUCHSCREEN_MC13783) += mc13783_ts.o
|
||||
obj-$(CONFIG_TOUCHSCREEN_MCS5000) += mcs5000_ts.o
|
||||
obj-$(CONFIG_TOUCHSCREEN_MIGOR) += migor_ts.o
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -4,6 +4,7 @@
|
|||
*
|
||||
* Copyright (c)2013 Maxim Integrated Products, Inc.
|
||||
* Copyright (C) 2013, NVIDIA Corporation. All Rights Reserved.
|
||||
* Copyright (c) 2015, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
|
@ -44,7 +45,6 @@
|
|||
* Netlink: common kernel/user space macros *
|
||||
\****************************************************************************/
|
||||
|
||||
//#define NL_BUF_SIZE 8192
|
||||
#define NL_BUF_SIZE 30720
|
||||
|
||||
#define NL_ATTR_FIRST(nptr) \
|
||||
|
@ -118,11 +118,13 @@ nl_add_attr(void *buf, __u16 type, void *ptr, __u16 len)
|
|||
enum {
|
||||
MC_DRIVER,
|
||||
MC_FUSION,
|
||||
MC_REQUIRED_GROUPS,
|
||||
MC_EVENT_BROADCAST,
|
||||
MC_GROUPS,
|
||||
};
|
||||
|
||||
#define MC_DRIVER_NAME "driver"
|
||||
#define MC_FUSION_NAME "fusion"
|
||||
#define MC_EVENT_BROADCAST_NAME "event_broadcast"
|
||||
|
||||
#define NL_FAMILY_VERSION 1
|
||||
|
||||
|
@ -344,8 +346,8 @@ struct maxim_sti_pdata {
|
|||
u32 default_reset_state;
|
||||
u32 tx_buf_size;
|
||||
u32 rx_buf_size;
|
||||
u32 gpio_reset;
|
||||
u32 gpio_irq;
|
||||
int gpio_reset;
|
||||
int gpio_irq;
|
||||
int (*init)(struct maxim_sti_pdata *pdata, bool init);
|
||||
void (*reset)(struct maxim_sti_pdata *pdata, int value);
|
||||
int (*irq)(struct maxim_sti_pdata *pdata);
|
||||
|
|
Loading…
Add table
Reference in a new issue