Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input layer fixes from Dmitry Torokhov: - a change to the ALPS driver where we had limit the quirk for trackstick handling from being active on all Dells to just a few models - a fix for a build dependency issue in the sur40 driver - a small clock handling fixup in the LPC32xx touchscreen driver * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: alps - only the Dell Latitude D420/430/620/630 have separate stick button bits Input: sur40 - add dependency on VIDEO_V4L2 Input: lpc32xx_ts - fix warnings caused by enabling unprepared clock
This commit is contained in:
Коммит
38dab9ac1c
|
@ -100,7 +100,7 @@ static const struct alps_nibble_commands alps_v6_nibble_commands[] = {
|
|||
#define ALPS_FOUR_BUTTONS 0x40 /* 4 direction button present */
|
||||
#define ALPS_PS2_INTERLEAVED 0x80 /* 3-byte PS/2 packet interleaved with
|
||||
6-byte ALPS packet */
|
||||
#define ALPS_DELL 0x100 /* device is a Dell laptop */
|
||||
#define ALPS_STICK_BITS 0x100 /* separate stick button bits */
|
||||
#define ALPS_BUTTONPAD 0x200 /* device is a clickpad */
|
||||
|
||||
static const struct alps_model_info alps_model_data[] = {
|
||||
|
@ -159,6 +159,43 @@ static const struct alps_protocol_info alps_v8_protocol_data = {
|
|||
ALPS_PROTO_V8, 0x18, 0x18, 0
|
||||
};
|
||||
|
||||
/*
|
||||
* Some v2 models report the stick buttons in separate bits
|
||||
*/
|
||||
static const struct dmi_system_id alps_dmi_has_separate_stick_buttons[] = {
|
||||
#if defined(CONFIG_DMI) && defined(CONFIG_X86)
|
||||
{
|
||||
/* Extrapolated from other entries */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Latitude D420"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Reported-by: Hans de Bruin <jmdebruin@xmsnet.nl> */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Latitude D430"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Reported-by: Hans de Goede <hdegoede@redhat.com> */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Latitude D620"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Extrapolated from other entries */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Latitude D630"),
|
||||
},
|
||||
},
|
||||
#endif
|
||||
{ }
|
||||
};
|
||||
|
||||
static void alps_set_abs_params_st(struct alps_data *priv,
|
||||
struct input_dev *dev1);
|
||||
static void alps_set_abs_params_semi_mt(struct alps_data *priv,
|
||||
|
@ -253,9 +290,8 @@ static void alps_process_packet_v1_v2(struct psmouse *psmouse)
|
|||
return;
|
||||
}
|
||||
|
||||
/* Dell non interleaved V2 dualpoint has separate stick button bits */
|
||||
if (priv->proto_version == ALPS_PROTO_V2 &&
|
||||
priv->flags == (ALPS_DELL | ALPS_PASS | ALPS_DUALPOINT)) {
|
||||
/* Some models have separate stick button bits */
|
||||
if (priv->flags & ALPS_STICK_BITS) {
|
||||
left |= packet[0] & 1;
|
||||
right |= packet[0] & 2;
|
||||
middle |= packet[0] & 4;
|
||||
|
@ -2552,8 +2588,6 @@ static int alps_set_protocol(struct psmouse *psmouse,
|
|||
priv->byte0 = protocol->byte0;
|
||||
priv->mask0 = protocol->mask0;
|
||||
priv->flags = protocol->flags;
|
||||
if (dmi_name_in_vendors("Dell"))
|
||||
priv->flags |= ALPS_DELL;
|
||||
|
||||
priv->x_max = 2000;
|
||||
priv->y_max = 1400;
|
||||
|
@ -2568,6 +2602,8 @@ static int alps_set_protocol(struct psmouse *psmouse,
|
|||
priv->set_abs_params = alps_set_abs_params_st;
|
||||
priv->x_max = 1023;
|
||||
priv->y_max = 767;
|
||||
if (dmi_check_system(alps_dmi_has_separate_stick_buttons))
|
||||
priv->flags |= ALPS_STICK_BITS;
|
||||
break;
|
||||
|
||||
case ALPS_PROTO_V3:
|
||||
|
|
|
@ -1006,6 +1006,7 @@ config TOUCHSCREEN_SUN4I
|
|||
config TOUCHSCREEN_SUR40
|
||||
tristate "Samsung SUR40 (Surface 2.0/PixelSense) touchscreen"
|
||||
depends on USB && MEDIA_USB_SUPPORT && HAS_DMA
|
||||
depends on VIDEO_V4L2
|
||||
select INPUT_POLLDEV
|
||||
select VIDEOBUF2_DMA_SG
|
||||
help
|
||||
|
|
|
@ -139,14 +139,14 @@ static void lpc32xx_stop_tsc(struct lpc32xx_tsc *tsc)
|
|||
tsc_readl(tsc, LPC32XX_TSC_CON) &
|
||||
~LPC32XX_TSC_ADCCON_AUTO_EN);
|
||||
|
||||
clk_disable(tsc->clk);
|
||||
clk_disable_unprepare(tsc->clk);
|
||||
}
|
||||
|
||||
static void lpc32xx_setup_tsc(struct lpc32xx_tsc *tsc)
|
||||
{
|
||||
u32 tmp;
|
||||
|
||||
clk_enable(tsc->clk);
|
||||
clk_prepare_enable(tsc->clk);
|
||||
|
||||
tmp = tsc_readl(tsc, LPC32XX_TSC_CON) & ~LPC32XX_TSC_ADCCON_POWER_UP;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче