From: Kevin Cernekee <cernekee@gmail.com>
To: dmitry.torokhov@gmail.com
Cc: seth.forshee@canonical.com, emmanuel.thome@inria.fr,
dturvene@dahetral.com, vincent.vanackere@gmail.com,
bgamari@gmail.com, linux-input@vger.kernel.org
Subject: [PATCH V2 07/14] Input: ALPS - Move {addr,nibble}_command settings into alps_set_defaults()
Date: Sun, 3 Feb 2013 15:56:47 -0800 [thread overview]
Message-ID: <1359935815-13507-8-git-send-email-cernekee@gmail.com> (raw)
In-Reply-To: <1359935815-13507-1-git-send-email-cernekee@gmail.com>
This allows alps_identify() to override these settings based on the
device characteristics, if it is ever necessary.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
---
drivers/input/mouse/alps.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index ffe0fad..6b0b2b9 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -1190,14 +1190,10 @@ static int alps_absolute_mode_v3(struct psmouse *psmouse)
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];
- priv->nibble_commands = alps_v3_nibble_commands;
- priv->addr_command = PSMOUSE_CMD_RESET_WRAP;
-
if (alps_enter_command_mode(psmouse, NULL))
goto error;
@@ -1343,13 +1339,9 @@ static int alps_absolute_mode_v4(struct psmouse *psmouse)
static int alps_hw_init_v4(struct psmouse *psmouse)
{
- struct alps_data *priv = psmouse->private;
struct ps2dev *ps2dev = &psmouse->ps2dev;
unsigned char param[4];
- priv->nibble_commands = alps_v4_nibble_commands;
- priv->addr_command = PSMOUSE_CMD_DISABLE;
-
if (alps_enter_command_mode(psmouse, NULL))
goto error;
@@ -1431,11 +1423,15 @@ static void alps_set_defaults(struct alps_data *priv)
priv->hw_init = alps_hw_init_v3;
priv->process_packet = alps_process_packet_v3;
priv->set_abs_params = alps_set_abs_params_mt;
+ priv->nibble_commands = alps_v3_nibble_commands;
+ priv->addr_command = PSMOUSE_CMD_RESET_WRAP;
break;
case ALPS_PROTO_V4:
priv->hw_init = alps_hw_init_v4;
priv->process_packet = alps_process_packet_v4;
priv->set_abs_params = alps_set_abs_params_mt;
+ priv->nibble_commands = alps_v4_nibble_commands;
+ priv->addr_command = PSMOUSE_CMD_DISABLE;
break;
}
}
--
1.7.10.4
next prev parent reply other threads:[~2013-02-03 23:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-03 23:56 [PATCH V2 00/14] Input: ALPS - Clean up and rework driver to support newer touchpads Kevin Cernekee
2013-02-03 23:56 ` [PATCH V2 01/14] Input: ALPS - Document the alps.h data structures Kevin Cernekee
2013-02-03 23:56 ` [PATCH V2 02/14] Input: ALPS - Copy "model" info into alps_data struct Kevin Cernekee
2013-02-03 23:56 ` [PATCH V2 03/14] Input: ALPS - Move alps_get_model() down below hw_init code Kevin Cernekee
2013-02-03 23:56 ` [PATCH V2 04/14] Input: ALPS - Introduce helper function for repeated commands Kevin Cernekee
2013-02-03 23:56 ` [PATCH V2 05/14] Input: ALPS - Rework detection sequence Kevin Cernekee
2013-02-03 23:56 ` [PATCH V2 06/14] Input: ALPS - Use function pointers for different protocol handlers Kevin Cernekee
2013-02-03 23:56 ` Kevin Cernekee [this message]
2013-02-03 23:56 ` [PATCH V2 08/14] Input: ALPS - Rework detection of Pinnacle AGx touchpads Kevin Cernekee
2013-02-03 23:56 ` [PATCH V2 09/14] Input: ALPS - Fix command mode check Kevin Cernekee
2013-02-03 23:56 ` [PATCH V2 10/14] Input: ALPS - Move pixel and bitmap info into alps_data struct Kevin Cernekee
2013-02-03 23:56 ` [PATCH V2 11/14] Input: ALPS - Make the V3 packet field decoder "pluggable" Kevin Cernekee
2013-02-03 23:56 ` [PATCH V2 12/14] Input: ALPS - Add support for "Rushmore" touchpads Kevin Cernekee
2013-02-03 23:56 ` [PATCH V2 13/14] Input: ALPS - Enable trackstick on Rushmore touchpads Kevin Cernekee
2013-02-03 23:56 ` [RFT V2 14/14] Input: ALPS - First attempt at "Dolphin" touchpad support Kevin Cernekee
2013-02-14 17:17 ` [PATCH V2 00/14] Input: ALPS - Clean up and rework driver to support newer touchpads Dmitry Torokhov
2013-02-14 18:02 ` Kevin Cernekee
2013-02-14 18:08 ` Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1359935815-13507-8-git-send-email-cernekee@gmail.com \
--to=cernekee@gmail.com \
--cc=bgamari@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=dturvene@dahetral.com \
--cc=emmanuel.thome@inria.fr \
--cc=linux-input@vger.kernel.org \
--cc=seth.forshee@canonical.com \
--cc=vincent.vanackere@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).