Patchwork [3/4] HID: udraw-ps3: Set INPUT_PROP_JOYDEV_IGNORE for motion sensor

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

Comments

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

Set the INPUT_PROP_JOYDEV_IGNORE flag for the motion sensor device,
so it won't get picked up by joydev.

Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
---
 drivers/hid/hid-udraw-ps3.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>
> 
> Set the INPUT_PROP_JOYDEV_IGNORE flag for the motion sensor device,
> so it won't get picked up by joydev.

Ditto on the reason.

> Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
> ---
>  drivers/hid/hid-udraw-ps3.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/hid/hid-udraw-ps3.c b/drivers/hid/hid-udraw-
> ps3.c
> index 88ea390..7ea4066 100644
> --- a/drivers/hid/hid-udraw-ps3.c
> +++ b/drivers/hid/hid-udraw-ps3.c
> @@ -379,6 +379,7 @@ static bool udraw_setup_accel(struct udraw
> *udraw,
>  	input_set_abs_params(input_dev, ABS_Z, -512, 512, 0, 0);
>  
>  	set_bit(INPUT_PROP_ACCELEROMETER, input_dev->propbit);
> +	set_bit(INPUT_PROP_JOYDEV_IGNORE, input_dev->propbit);
>  
>  	udraw->accel_input_dev = input_dev;
>  
--
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-udraw-ps3.c b/drivers/hid/hid-udraw-ps3.c
index 88ea390..7ea4066 100644
--- a/drivers/hid/hid-udraw-ps3.c
+++ b/drivers/hid/hid-udraw-ps3.c
@@ -379,6 +379,7 @@  static bool udraw_setup_accel(struct udraw *udraw,
 	input_set_abs_params(input_dev, ABS_Z, -512, 512, 0, 0);
 
 	set_bit(INPUT_PROP_ACCELEROMETER, input_dev->propbit);
+	set_bit(INPUT_PROP_JOYDEV_IGNORE, input_dev->propbit);
 
 	udraw->accel_input_dev = input_dev;