Merge branch 'next' into for-linus
Prepare first round of input updates for 4.5 merge window.
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#define ALPS_CMD_NIBBLE_10 0x01f2
|
||||
|
||||
#define ALPS_REG_BASE_RUSHMORE 0xc2c0
|
||||
#define ALPS_REG_BASE_V7 0xc2c0
|
||||
#define ALPS_REG_BASE_PINNACLE 0x0000
|
||||
|
||||
static const struct alps_nibble_commands alps_v3_nibble_commands[] = {
|
||||
@@ -2047,7 +2048,7 @@ static int alps_absolute_mode_v3(struct psmouse *psmouse)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int alps_probe_trackstick_v3(struct psmouse *psmouse, int reg_base)
|
||||
static int alps_probe_trackstick_v3_v7(struct psmouse *psmouse, int reg_base)
|
||||
{
|
||||
int ret = -EIO, reg_val;
|
||||
|
||||
@@ -2128,15 +2129,12 @@ error:
|
||||
|
||||
static int alps_hw_init_v3(struct psmouse *psmouse)
|
||||
{
|
||||
struct alps_data *priv = psmouse->private;
|
||||
struct ps2dev *ps2dev = &psmouse->ps2dev;
|
||||
int reg_val;
|
||||
unsigned char param[4];
|
||||
|
||||
reg_val = alps_probe_trackstick_v3(psmouse, ALPS_REG_BASE_PINNACLE);
|
||||
if (reg_val == -EIO)
|
||||
goto error;
|
||||
|
||||
if (reg_val == 0 &&
|
||||
if ((priv->flags & ALPS_DUALPOINT) &&
|
||||
alps_setup_trackstick_v3(psmouse, ALPS_REG_BASE_PINNACLE) == -EIO)
|
||||
goto error;
|
||||
|
||||
@@ -2613,6 +2611,11 @@ static int alps_set_protocol(struct psmouse *psmouse,
|
||||
priv->decode_fields = alps_decode_pinnacle;
|
||||
priv->nibble_commands = alps_v3_nibble_commands;
|
||||
priv->addr_command = PSMOUSE_CMD_RESET_WRAP;
|
||||
|
||||
if (alps_probe_trackstick_v3_v7(psmouse,
|
||||
ALPS_REG_BASE_PINNACLE) < 0)
|
||||
priv->flags &= ~ALPS_DUALPOINT;
|
||||
|
||||
break;
|
||||
|
||||
case ALPS_PROTO_V3_RUSHMORE:
|
||||
@@ -2625,8 +2628,8 @@ static int alps_set_protocol(struct psmouse *psmouse,
|
||||
priv->x_bits = 16;
|
||||
priv->y_bits = 12;
|
||||
|
||||
if (alps_probe_trackstick_v3(psmouse,
|
||||
ALPS_REG_BASE_RUSHMORE) < 0)
|
||||
if (alps_probe_trackstick_v3_v7(psmouse,
|
||||
ALPS_REG_BASE_RUSHMORE) < 0)
|
||||
priv->flags &= ~ALPS_DUALPOINT;
|
||||
|
||||
break;
|
||||
@@ -2676,6 +2679,9 @@ static int alps_set_protocol(struct psmouse *psmouse,
|
||||
if (priv->fw_ver[1] != 0xba)
|
||||
priv->flags |= ALPS_BUTTONPAD;
|
||||
|
||||
if (alps_probe_trackstick_v3_v7(psmouse, ALPS_REG_BASE_V7) < 0)
|
||||
priv->flags &= ~ALPS_DUALPOINT;
|
||||
|
||||
break;
|
||||
|
||||
case ALPS_PROTO_V8:
|
||||
|
@@ -1222,7 +1222,7 @@ static int elantech_set_input_params(struct psmouse *psmouse)
|
||||
input_set_abs_params(dev, ABS_TOOL_WIDTH, ETP_WMIN_V2,
|
||||
ETP_WMAX_V2, 0, 0);
|
||||
}
|
||||
input_mt_init_slots(dev, 2, 0);
|
||||
input_mt_init_slots(dev, 2, INPUT_MT_SEMI_MT);
|
||||
input_set_abs_params(dev, ABS_MT_POSITION_X, x_min, x_max, 0, 0);
|
||||
input_set_abs_params(dev, ABS_MT_POSITION_Y, y_min, y_max, 0, 0);
|
||||
break;
|
||||
|
@@ -49,12 +49,6 @@ int focaltech_detect(struct psmouse *psmouse, bool set_properties)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void focaltech_reset(struct psmouse *psmouse)
|
||||
{
|
||||
ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_RESET_DIS);
|
||||
psmouse_reset(psmouse);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MOUSE_PS2_FOCALTECH
|
||||
|
||||
/*
|
||||
@@ -300,6 +294,12 @@ static int focaltech_switch_protocol(struct psmouse *psmouse)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void focaltech_reset(struct psmouse *psmouse)
|
||||
{
|
||||
ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_RESET_DIS);
|
||||
psmouse_reset(psmouse);
|
||||
}
|
||||
|
||||
static void focaltech_disconnect(struct psmouse *psmouse)
|
||||
{
|
||||
focaltech_reset(psmouse);
|
||||
@@ -456,14 +456,4 @@ fail:
|
||||
kfree(priv);
|
||||
return error;
|
||||
}
|
||||
|
||||
#else /* CONFIG_MOUSE_PS2_FOCALTECH */
|
||||
|
||||
int focaltech_init(struct psmouse *psmouse)
|
||||
{
|
||||
focaltech_reset(psmouse);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_MOUSE_PS2_FOCALTECH */
|
||||
|
@@ -18,6 +18,14 @@
|
||||
#define _FOCALTECH_H
|
||||
|
||||
int focaltech_detect(struct psmouse *psmouse, bool set_properties);
|
||||
|
||||
#ifdef CONFIG_MOUSE_PS2_FOCALTECH
|
||||
int focaltech_init(struct psmouse *psmouse);
|
||||
#else
|
||||
static inline int focaltech_init(struct psmouse *psmouse)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@@ -325,7 +325,7 @@ static void ps2pp_set_model_properties(struct psmouse *psmouse,
|
||||
* that support it.
|
||||
*/
|
||||
|
||||
int ps2pp_init(struct psmouse *psmouse, bool set_properties)
|
||||
int ps2pp_detect(struct psmouse *psmouse, bool set_properties)
|
||||
{
|
||||
struct ps2dev *ps2dev = &psmouse->ps2dev;
|
||||
unsigned char param[4];
|
||||
|
@@ -12,9 +12,9 @@
|
||||
#define _LOGIPS2PP_H
|
||||
|
||||
#ifdef CONFIG_MOUSE_PS2_LOGIPS2PP
|
||||
int ps2pp_init(struct psmouse *psmouse, bool set_properties);
|
||||
int ps2pp_detect(struct psmouse *psmouse, bool set_properties);
|
||||
#else
|
||||
inline int ps2pp_init(struct psmouse *psmouse, bool set_properties)
|
||||
static inline int ps2pp_detect(struct psmouse *psmouse, bool set_properties)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user