Patchwork [2/4] HID: sony: Set INPUT_PROP_JOYDEV_IGNORE flag for motion sensors.

login
register
mail settings
Submitter roderick@gaikai.com
Date Aug. 24, 2017, 11:11 p.m.
Message ID <20170824231153.8809-3-roderick@gaikai.com>
Download mbox | patch
Permalink /patch/9921087/
State New
Headers show

Comments

roderick@gaikai.com - Aug. 24, 2017, 11:11 p.m.
From: Roderick Colenbrander <roderick.colenbrander@sony.com>

Configure the motion sensor sub device with the INPUT_PROP_JOYDEV_IGNORE
flag to prevent joydev from picking it up.

Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
---
 drivers/hid/hid-sony.c | 1 +
 1 file changed, 1 insertion(+)
Bastien Nocera - Aug. 25, 2017, 8:46 a.m.
On Thu, 2017-08-24 at 16:11 -0700, Roderick Colenbrander wrote:
> From: Roderick Colenbrander <roderick.colenbrander@sony.com>
> 
> Configure the motion sensor sub device with the
> INPUT_PROP_JOYDEV_IGNORE
> flag to prevent joydev from picking it up.

Can you please add the reason why to the commit message?

> Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
> ---
>  drivers/hid/hid-sony.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
> index d03203a..6c290c6 100644
> --- a/drivers/hid/hid-sony.c
> +++ b/drivers/hid/hid-sony.c
> @@ -1375,6 +1375,7 @@ static int sony_register_sensors(struct sony_sc
> *sc)
>  	}
>  
>  	__set_bit(INPUT_PROP_ACCELEROMETER, sc->sensor_dev-
> >propbit);
> +	__set_bit(INPUT_PROP_JOYDEV_IGNORE, sc->sensor_dev-
> >propbit);
>  
>  	ret = input_register_device(sc->sensor_dev);
>  	if (ret < 0)
--
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

Patch

diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index d03203a..6c290c6 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -1375,6 +1375,7 @@  static int sony_register_sensors(struct sony_sc *sc)
 	}
 
 	__set_bit(INPUT_PROP_ACCELEROMETER, sc->sensor_dev->propbit);
+	__set_bit(INPUT_PROP_JOYDEV_IGNORE, sc->sensor_dev->propbit);
 
 	ret = input_register_device(sc->sensor_dev);
 	if (ret < 0)