linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Tissoires <btissoir@redhat.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Peter Hutterer <peter.hutterer@redhat.com>,
	linux-input@vger.kernel.org
Subject: Re: [PATCH 2/2] input/mouse: Add missing POINTER / DIRECT properties to a bunch of drivers
Date: Tue, 2 Sep 2014 10:38:34 -0400	[thread overview]
Message-ID: <20140902143834.GC25423@mail.corp.redhat.com> (raw)
In-Reply-To: <1409661804-10489-3-git-send-email-hdegoede@redhat.com>

On Sep 02 2014 or thereabouts, Hans de Goede wrote:
> I've not done a full audit of all mouse drivers, I noticed these ones were
> missing the POINTER property while working on the POINTING_STICK property.

I am not sure about this one. INPUT_PROP_POINTER is the default behavior
when no properties are set. The current Xorg/libinput code should
already be aware of that and uses this to be able to be backward
compatible.
Adding the info now, will not change anything in the user-space code and
we will not be able to remove the compat code before a long time.

So, really, I am not in favor, nor I will opposite my vote regarding
this patch.

Cheers,
Benjamin

> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/input/mouse/alps.c          | 1 +
>  drivers/input/mouse/elantech.c      | 1 +
>  drivers/input/mouse/psmouse-base.c  | 2 ++
>  drivers/input/mouse/synaptics_usb.c | 5 +++++
>  drivers/input/mouse/trackpoint.c    | 1 +
>  5 files changed, 10 insertions(+)
> 
> diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
> index 9de3c25..d7020ad 100644
> --- a/drivers/input/mouse/alps.c
> +++ b/drivers/input/mouse/alps.c
> @@ -2373,6 +2373,7 @@ int alps_init(struct psmouse *psmouse)
>  	dev2->keybit[BIT_WORD(BTN_LEFT)] =
>  		BIT_MASK(BTN_LEFT) | BIT_MASK(BTN_MIDDLE) | BIT_MASK(BTN_RIGHT);
>  
> +	__set_bit(INPUT_PROP_POINTER, dev2->propbit);
>  	if (priv->flags & ALPS_DUALPOINT)
>  		__set_bit(INPUT_PROP_POINTING_STICK, dev2->propbit);
>  
> diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
> index c767f7e..daaf82f 100644
> --- a/drivers/input/mouse/elantech.c
> +++ b/drivers/input/mouse/elantech.c
> @@ -1608,6 +1608,7 @@ int elantech_init(struct psmouse *psmouse)
>  			BIT_MASK(BTN_LEFT) | BIT_MASK(BTN_MIDDLE) |
>  			BIT_MASK(BTN_RIGHT);
>  
> +		__set_bit(INPUT_PROP_POINTER, tp_dev->propbit);
>  		__set_bit(INPUT_PROP_POINTING_STICK, tp_dev->propbit);
>  
>  		error = input_register_device(etd->tp_dev);
> diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
> index 5c1237d..a44d655 100644
> --- a/drivers/input/mouse/psmouse-base.c
> +++ b/drivers/input/mouse/psmouse-base.c
> @@ -685,6 +685,8 @@ static void psmouse_apply_defaults(struct psmouse *psmouse)
>  	__set_bit(REL_X, input_dev->relbit);
>  	__set_bit(REL_Y, input_dev->relbit);
>  
> +	__set_bit(INPUT_PROP_POINTER, input_dev->propbit);
> +
>  	psmouse->set_rate = psmouse_set_rate;
>  	psmouse->set_resolution = psmouse_set_resolution;
>  	psmouse->poll = psmouse_poll;
> diff --git a/drivers/input/mouse/synaptics_usb.c b/drivers/input/mouse/synaptics_usb.c
> index db3973d..6bcc018 100644
> --- a/drivers/input/mouse/synaptics_usb.c
> +++ b/drivers/input/mouse/synaptics_usb.c
> @@ -402,6 +402,11 @@ static int synusb_probe(struct usb_interface *intf,
>  		__set_bit(BTN_TOOL_TRIPLETAP, input_dev->keybit);
>  	}
>  
> +	if (synusb->flags & SYNUSB_TOUCHSCREEN)
> +		__set_bit(INPUT_PROP_DIRECT, input_dev->propbit);
> +	else
> +		__set_bit(INPUT_PROP_POINTER, input_dev->propbit);
> +
>  	__set_bit(BTN_LEFT, input_dev->keybit);
>  	__set_bit(BTN_RIGHT, input_dev->keybit);
>  	__set_bit(BTN_MIDDLE, input_dev->keybit);
> diff --git a/drivers/input/mouse/trackpoint.c b/drivers/input/mouse/trackpoint.c
> index b377462..30c8b69 100644
> --- a/drivers/input/mouse/trackpoint.c
> +++ b/drivers/input/mouse/trackpoint.c
> @@ -393,6 +393,7 @@ int trackpoint_detect(struct psmouse *psmouse, bool set_properties)
>  	if ((button_info & 0x0f) >= 3)
>  		__set_bit(BTN_MIDDLE, psmouse->dev->keybit);
>  
> +	__set_bit(INPUT_PROP_POINTER, psmouse->dev->propbit);
>  	__set_bit(INPUT_PROP_POINTING_STICK, psmouse->dev->propbit);
>  
>  	trackpoint_defaults(psmouse->private);
> -- 
> 2.1.0
> 

  reply	other threads:[~2014-09-02 14:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02 12:43 [PATCH 0/2] input: Add INPUT_PROP_POINTING_STICK property Hans de Goede
2014-09-02 12:43 ` [PATCH 1/2] " Hans de Goede
2014-09-02 14:34   ` Benjamin Tissoires
2014-09-03  3:18   ` Peter Hutterer
2014-09-02 12:43 ` [PATCH 2/2] input/mouse: Add missing POINTER / DIRECT properties to a bunch of drivers Hans de Goede
2014-09-02 14:38   ` Benjamin Tissoires [this message]
2014-09-03  3:21     ` Peter Hutterer
2014-09-02 12:55 ` [PATCH 0/2] input: Add INPUT_PROP_POINTING_STICK property David Herrmann
2014-09-02 14:34   ` Benjamin Tissoires
     [not found]   ` <5405D6D4.4070406@redhat.com>
2014-09-02 14:50     ` David Herrmann
2014-09-03  3:24       ` Peter Hutterer
2014-09-08 21:45 ` 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=20140902143834.GC25423@mail.corp.redhat.com \
    --to=btissoir@redhat.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-input@vger.kernel.org \
    --cc=peter.hutterer@redhat.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).