Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov: "A big update to the Atmel touchscreen driver, devm support for polled input devices, several drivers have been converted to using managed resources, and assorted driver fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (87 commits) Input: synaptics - fix resolution for manually provided min/max Input: atmel_mxt_ts - fix invalid return from mxt_get_bootloader_version Input: max8997_haptic - add error handling for regulator and pwm Input: elantech - don't set bit 1 of reg_10 when the no_hw_res quirk is set Input: elantech - deal with clickpads reporting right button events Input: edt-ft5x06 - fix an i2c write for M09 support Input: omap-keypad - remove platform data support ARM: OMAP2+: remove unused omap4-keypad file and code Input: ab8500-ponkey - switch to using managed resources Input: max8925_onkey - switch to using managed resources Input: 88pm860x-ts - switch to using managed resources Input: 88pm860x_onkey - switch to using managed resources Input: intel-mid-touch - switch to using managed resources Input: wacom - process outbound for newer Cintiqs Input: wacom - set stylus_in_proximity when pen is in range DTS: ARM: OMAP3-N900: Add tsc2005 support Input: tsc2005 - add DT support Input: add common DT binding for touchscreens Input: jornada680_kbd - switch top using managed resources Input: adp5520-keys - switch to using managed resources ...
This commit is contained in:
+36
-12
@@ -3,29 +3,53 @@
|
||||
|
||||
struct device;
|
||||
|
||||
/**
|
||||
* struct gpio_keys_button - configuration parameters
|
||||
* @code: input event code (KEY_*, SW_*)
|
||||
* @gpio: %-1 if this key does not support gpio
|
||||
* @active_low: %true indicates that button is considered
|
||||
* depressed when gpio is low
|
||||
* @desc: label that will be attached to button's gpio
|
||||
* @type: input event type (%EV_KEY, %EV_SW, %EV_ABS)
|
||||
* @wakeup: configure the button as a wake-up source
|
||||
* @debounce_interval: debounce ticks interval in msecs
|
||||
* @can_disable: %true indicates that userspace is allowed to
|
||||
* disable button via sysfs
|
||||
* @value: axis value for %EV_ABS
|
||||
* @irq: Irq number in case of interrupt keys
|
||||
*/
|
||||
struct gpio_keys_button {
|
||||
/* Configuration parameters */
|
||||
unsigned int code; /* input event code (KEY_*, SW_*) */
|
||||
int gpio; /* -1 if this key does not support gpio */
|
||||
unsigned int code;
|
||||
int gpio;
|
||||
int active_low;
|
||||
const char *desc;
|
||||
unsigned int type; /* input event type (EV_KEY, EV_SW, EV_ABS) */
|
||||
int wakeup; /* configure the button as a wake-up source */
|
||||
int debounce_interval; /* debounce ticks interval in msecs */
|
||||
unsigned int type;
|
||||
int wakeup;
|
||||
int debounce_interval;
|
||||
bool can_disable;
|
||||
int value; /* axis value for EV_ABS */
|
||||
unsigned int irq; /* Irq number in case of interrupt keys */
|
||||
int value;
|
||||
unsigned int irq;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct gpio_keys_platform_data - platform data for gpio_keys driver
|
||||
* @buttons: pointer to array of &gpio_keys_button structures
|
||||
* describing buttons attached to the device
|
||||
* @nbuttons: number of elements in @buttons array
|
||||
* @poll_interval: polling interval in msecs - for polling driver only
|
||||
* @rep: enable input subsystem auto repeat
|
||||
* @enable: platform hook for enabling the device
|
||||
* @disable: platform hook for disabling the device
|
||||
* @name: input device name
|
||||
*/
|
||||
struct gpio_keys_platform_data {
|
||||
struct gpio_keys_button *buttons;
|
||||
int nbuttons;
|
||||
unsigned int poll_interval; /* polling interval in msecs -
|
||||
for polling driver only */
|
||||
unsigned int rep:1; /* enable input subsystem auto repeat */
|
||||
unsigned int poll_interval;
|
||||
unsigned int rep:1;
|
||||
int (*enable)(struct device *dev);
|
||||
void (*disable)(struct device *dev);
|
||||
const char *name; /* input device name */
|
||||
const char *name;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -15,35 +15,14 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/* For key_map array */
|
||||
#define MXT_NUM_GPIO 4
|
||||
|
||||
/* Orient */
|
||||
#define MXT_NORMAL 0x0
|
||||
#define MXT_DIAGONAL 0x1
|
||||
#define MXT_HORIZONTAL_FLIP 0x2
|
||||
#define MXT_ROTATED_90_COUNTER 0x3
|
||||
#define MXT_VERTICAL_FLIP 0x4
|
||||
#define MXT_ROTATED_90 0x5
|
||||
#define MXT_ROTATED_180 0x6
|
||||
#define MXT_DIAGONAL_COUNTER 0x7
|
||||
|
||||
/* The platform data for the Atmel maXTouch touchscreen driver */
|
||||
struct mxt_platform_data {
|
||||
const u8 *config;
|
||||
size_t config_length;
|
||||
|
||||
unsigned int x_line;
|
||||
unsigned int y_line;
|
||||
unsigned int x_size;
|
||||
unsigned int y_size;
|
||||
unsigned int blen;
|
||||
unsigned int threshold;
|
||||
unsigned int voltage;
|
||||
unsigned char orient;
|
||||
u32 config_crc;
|
||||
unsigned long irqflags;
|
||||
bool is_tp;
|
||||
const unsigned int key_map[MXT_NUM_GPIO];
|
||||
u8 t19_num_keys;
|
||||
const unsigned int *t19_keymap;
|
||||
};
|
||||
|
||||
#endif /* __LINUX_ATMEL_MXT_TS_H */
|
||||
|
||||
@@ -48,9 +48,12 @@ struct input_polled_dev {
|
||||
|
||||
/* private: */
|
||||
struct delayed_work work;
|
||||
|
||||
bool devres_managed;
|
||||
};
|
||||
|
||||
struct input_polled_dev *input_allocate_polled_device(void);
|
||||
struct input_polled_dev *devm_input_allocate_polled_device(struct device *dev);
|
||||
void input_free_polled_device(struct input_polled_dev *dev);
|
||||
int input_register_polled_device(struct input_polled_dev *dev);
|
||||
void input_unregister_polled_device(struct input_polled_dev *dev);
|
||||
|
||||
@@ -1,10 +1,52 @@
|
||||
#ifndef _PIXCIR_I2C_TS_H
|
||||
#define _PIXCIR_I2C_TS_H
|
||||
|
||||
/*
|
||||
* Register map
|
||||
*/
|
||||
#define PIXCIR_REG_POWER_MODE 51
|
||||
#define PIXCIR_REG_INT_MODE 52
|
||||
|
||||
/*
|
||||
* Power modes:
|
||||
* active: max scan speed
|
||||
* idle: lower scan speed with automatic transition to active on touch
|
||||
* halt: datasheet says sleep but this is more like halt as the chip
|
||||
* clocks are cut and it can only be brought out of this mode
|
||||
* using the RESET pin.
|
||||
*/
|
||||
enum pixcir_power_mode {
|
||||
PIXCIR_POWER_ACTIVE,
|
||||
PIXCIR_POWER_IDLE,
|
||||
PIXCIR_POWER_HALT,
|
||||
};
|
||||
|
||||
#define PIXCIR_POWER_MODE_MASK 0x03
|
||||
#define PIXCIR_POWER_ALLOW_IDLE (1UL << 2)
|
||||
|
||||
/*
|
||||
* Interrupt modes:
|
||||
* periodical: interrupt is asserted periodicaly
|
||||
* diff coordinates: interrupt is asserted when coordinates change
|
||||
* level on touch: interrupt level asserted during touch
|
||||
* pulse on touch: interrupt pulse asserted druing touch
|
||||
*
|
||||
*/
|
||||
enum pixcir_int_mode {
|
||||
PIXCIR_INT_PERIODICAL,
|
||||
PIXCIR_INT_DIFF_COORD,
|
||||
PIXCIR_INT_LEVEL_TOUCH,
|
||||
PIXCIR_INT_PULSE_TOUCH,
|
||||
};
|
||||
|
||||
#define PIXCIR_INT_MODE_MASK 0x03
|
||||
#define PIXCIR_INT_ENABLE (1UL << 3)
|
||||
#define PIXCIR_INT_POL_HIGH (1UL << 2)
|
||||
|
||||
struct pixcir_ts_platform_data {
|
||||
int (*attb_read_val)(void);
|
||||
int x_max;
|
||||
int y_max;
|
||||
int gpio_attb; /* GPIO connected to ATTB line */
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright (c) 2014 Sebastian Reichel <sre@kernel.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 as published by
|
||||
* the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef _TOUCHSCREEN_H
|
||||
#define _TOUCHSCREEN_H
|
||||
|
||||
#include <linux/input.h>
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
void touchscreen_parse_of_params(struct input_dev *dev);
|
||||
#else
|
||||
static inline void touchscreen_parse_of_params(struct input_dev *dev)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,13 +0,0 @@
|
||||
#ifndef __LINUX_INPUT_OMAP4_KEYPAD_H
|
||||
#define __LINUX_INPUT_OMAP4_KEYPAD_H
|
||||
|
||||
#include <linux/input/matrix_keypad.h>
|
||||
|
||||
struct omap4_keypad_platform_data {
|
||||
const struct matrix_keymap_data *keymap_data;
|
||||
|
||||
u8 rows;
|
||||
u8 cols;
|
||||
};
|
||||
|
||||
#endif /* __LINUX_INPUT_OMAP4_KEYPAD_H */
|
||||
Reference in New Issue
Block a user