From: li guang <lig.fnst@cn.fujitsu.com>
To: Chung-yih Wang <cywang@chromium.org>
Cc: linux-input@vger.kernel.org,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Tai-hwa Liang <avatar@sentelic.com>,
Rusty Russell <rusty@rustcorp.com.au>, Paul Fox <pgf@laptop.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: psmouse - retry getid command in psmouse_probe()
Date: Mon, 18 Feb 2013 17:26:00 +0800 [thread overview]
Message-ID: <1361179560.7859.5.camel@liguang.fnst.cn.fujitsu.com> (raw)
In-Reply-To: <1351678279-32615-1-git-send-email-cywang@chromium.org>
seems a special change for a special device
so, you may need to place this change with
corresponding CONFIG_xxx_xxx.
generally, if command F2 failed, we will assume
there's no ps2 device, it's normal,
or do you have some materials(SPEC) to specify
the change you have made?
在 2012-10-31三的 18:11 +0800,Chung-yih Wang写道:
> As the synaptics device may not respond to the first command in psmouse_probe
> when a machine is booting up, the patch gives a second probe if the first
> one fails.
>
> Signed-off-by: Chung-yih Wang <cywang@chromium.org>
> ---
> drivers/input/mouse/psmouse-base.c | 13 +++++++++++--
> 1 files changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
> index 22fe254..c4fc5ad 100644
> --- a/drivers/input/mouse/psmouse-base.c
> +++ b/drivers/input/mouse/psmouse-base.c
> @@ -1053,8 +1053,17 @@ static int psmouse_probe(struct psmouse *psmouse)
> */
>
> param[0] = 0xa5;
> - if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETID))
> - return -1;
> + if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETID)) {
> + /*
> + * Reprobe the device if it did not respond to the GETID
> + * command. Before retry, additional dummy command is sent
> + * to clear the 'RESEND' response if exists.
> + */
> + psmouse_warn(psmouse, "GETID probe failed, retrying...\n");
> + ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE11);
> + if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETID))
> + return -1;
> + }
>
> if (param[0] != 0x00 && param[0] != 0x03 &&
> param[0] != 0x04 && param[0] != 0xff)
next prev parent reply other threads:[~2013-02-18 9:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-31 10:11 Chung-yih Wang
[not found] ` <CAM2ehZbMyNP_AhP-9TmCC5-bw9mqd7yunTy3NETEqRX1bX5oYg@mail.gmail.com>
2013-02-18 8:21 ` Chung-Yih Wang (王崇懿)
2013-02-18 9:26 ` li guang [this message]
2013-02-18 9:45 ` Chung-Yih Wang (王崇懿)
2013-02-19 18:44 ` 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=1361179560.7859.5.camel@liguang.fnst.cn.fujitsu.com \
--to=lig.fnst@cn.fujitsu.com \
--cc=avatar@sentelic.com \
--cc=cywang@chromium.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pgf@laptop.org \
--cc=rusty@rustcorp.com.au \
/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
all inboxes | Powered by JetHome®