linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Pali Rohár" <pali.rohar@gmail.com>
Cc: Ben Gamari <ben@smart-cactus.org>,
	linux-input@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>,
	Allen Hung <Allen_Hung@dell.com>,
	Masaki Ota <masaki.ota@jp.alps.com>,
	Ben Morgan <Ben_Morgan@dell.com>
Subject: Re: [PATCH 4/4] input/alps: Set DualPoint flag for 74 03 28 devices
Date: Mon, 20 Jun 2016 17:43:55 -0700	[thread overview]
Message-ID: <20160621004355.GF22426@dtor-ws> (raw)
In-Reply-To: <20160530091100.GP29844@pali>

On Mon, May 30, 2016 at 11:11:00AM +0200, Pali Rohár wrote:
> On Saturday 28 May 2016 14:01:02 Ben Gamari wrote:
> > Here we introduce logic in alps_identify to set the ALPS_DUALPOINT flag
> > for touchpad hardware responding to E7 report with 73 03 28, as is found
> > in the Dell Latitude E7470.
> > ---
> >  drivers/input/mouse/alps.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
> > index 25d2cad..431bc26 100644
> > --- a/drivers/input/mouse/alps.c
> > +++ b/drivers/input/mouse/alps.c
> > @@ -2776,6 +2776,7 @@ static int alps_identify(struct psmouse *psmouse, struct alps_data *priv)
> >  	const struct alps_protocol_info *protocol;
> >  	unsigned char e6[4], e7[4], ec[4];
> >  	int error;
> > +	int flags = 0;
> >  
> >  	/*
> >  	 * First try "E6 report".
> > @@ -2817,6 +2818,10 @@ static int alps_identify(struct psmouse *psmouse, struct alps_data *priv)
> >  		} else if (e7[0] == 0x73 && e7[1] == 0x03 &&
> >  			   e7[2] == 0x14 && ec[1] == 0x02) {
> >  			protocol = &alps_v8_protocol_data;
> > +		} else if (e7[0] == 0x73 && e7[1] == 0x03 &&
> > +			   e7[2] == 0x28 && ec[1] == 0x01) {
> > +			protocol = &alps_v8_protocol_data;
> > +			flags |= ALPS_DUALPOINT | ALPS_DUALPOINT_WITH_PRESSURE;
> >  		} else {
> >  			psmouse_dbg(psmouse,
> >  				    "Likely not an ALPS touchpad: E7=%3ph, EC=%3ph\n", e7, ec);
> > @@ -2830,6 +2835,7 @@ static int alps_identify(struct psmouse *psmouse, struct alps_data *priv)
> >  		error = alps_set_protocol(psmouse, priv, protocol);
> >  		if (error)
> >  			return error;
> > +		priv->flags |= flags;
> >  	}
> >  
> >  	return 0;
> 
> I would rather see setting flags in alps_set_protocol function. Where it
> is done for other protocols. But do not know if it is easily possible
> without rewriting lot of code...

Could probably key it off of prov->fw_ver[1] (which is ec[1]) in
alps_set_protocol() in V8 case.

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2016-06-21  1:40 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-28 12:00 [PATCH v2] Support for Alps SS5 touchpad Ben Gamari
2016-05-28 12:00 ` [PATCH 1/4] input/alps: Add touchstick support for SS5 hardware Ben Gamari
2016-06-13 13:47   ` Pali Rohár
2016-05-28 12:01 ` [PATCH 2/4] input/alps: Handle 0-pressure 1F events Ben Gamari
2016-06-13 13:49   ` Pali Rohár
2016-05-28 12:01 ` [PATCH 3/4] input/alps: Allow touchsticks to report pressure Ben Gamari
2016-05-28 12:40   ` Hans de Goede
2016-06-10 10:21     ` Ben Gamari
2016-06-10 10:57       ` Hans de Goede
2016-06-13  0:21         ` Peter Hutterer
2016-05-28 12:01 ` [PATCH 4/4] input/alps: Set DualPoint flag for 74 03 28 devices Ben Gamari
2016-05-30  9:11   ` Pali Rohár
2016-06-21  0:43     ` Dmitry Torokhov [this message]
2016-05-28 12:37 ` [PATCH v2] Support for Alps SS5 touchpad Hans de Goede
2016-05-28 13:16   ` Ben Gamari
2016-05-28 13:21     ` Hans de Goede
2016-05-30  9:13 ` Pali Rohár
2016-05-30  9:49   ` Ben Gamari
2016-06-20 17:48     ` Pali Rohár
2016-06-21  9:20       ` Ben Gamari
2016-06-29  9:46         ` Pali Rohár
2016-07-17 21:06           ` Ben Gamari
2016-07-17 21:42             ` Pali Rohár
2016-09-05  8:59 ` Pali Rohár
2016-09-06  3:38   ` Ben Gamari
2016-09-06  8:57     ` Pali Rohár

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=20160621004355.GF22426@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=Allen_Hung@dell.com \
    --cc=Ben_Morgan@dell.com \
    --cc=ben@smart-cactus.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-input@vger.kernel.org \
    --cc=masaki.ota@jp.alps.com \
    --cc=pali.rohar@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).