Re: [PATCH v16 13/16] HID: nintendo: add IMU support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 11 Sep 2021, Daniel J. Ogorchock wrote:

[ CCing Dmitry ]

> This patch adds support for the controller's IMU. The accelerometer and
> gyro data are both provided to userspace using a second input device.
> The devices can be associated using their uniq value (set to the
> controller's MAC address).
> 
> A large part of this patch's functionality was provided by Carl Mueller.
> 
> The IMU device is blacklisted from the joydev input handler.
> 
> Signed-off-by: Daniel J. Ogorchock <djogorchock@xxxxxxxxx>
[ ... snip ... ]
> diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c
> index 947d440a3be63..b45ddb4570028 100644
> --- a/drivers/input/joydev.c
> +++ b/drivers/input/joydev.c
> @@ -758,6 +758,12 @@ static void joydev_cleanup(struct joydev *joydev)
>  #define USB_VENDOR_ID_THQ			0x20d6
>  #define USB_DEVICE_ID_THQ_PS3_UDRAW			0xcb17
>  
> +#define USB_VENDOR_ID_NINTENDO		0x057e
> +#define USB_DEVICE_ID_NINTENDO_JOYCONL	0x2006
> +#define USB_DEVICE_ID_NINTENDO_JOYCONR	0x2007
> +#define USB_DEVICE_ID_NINTENDO_PROCON	0x2009
> +#define USB_DEVICE_ID_NINTENDO_CHRGGRIP	0x200E
> +
>  #define ACCEL_DEV(vnd, prd)						\
>  	{								\
>  		.flags = INPUT_DEVICE_ID_MATCH_VENDOR |			\
> @@ -789,6 +795,10 @@ static const struct input_device_id joydev_blacklist[] = {
>  	ACCEL_DEV(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2),
>  	ACCEL_DEV(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_DONGLE),
>  	ACCEL_DEV(USB_VENDOR_ID_THQ, USB_DEVICE_ID_THQ_PS3_UDRAW),
> +	ACCEL_DEV(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_PROCON),
> +	ACCEL_DEV(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_CHRGGRIP),
> +	ACCEL_DEV(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_JOYCONL),
> +	ACCEL_DEV(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_JOYCONR),
>  	{ /* sentinel */ }

Dmitry, could you please Ack the joydev.c part so that I could take it 
through HID tree with the rest of the patchset?

Thanks,

-- 
Jiri Kosina
SUSE Labs




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux