All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] HID:hid-lg: Fixed ReportDescriptor for Logitech Formular Vibration to split Accel/Brake into seperate axis
@ 2013-10-10  0:04 Simon Wood
  2013-10-10  0:04 ` [PATCH 2/3] HID:hid-lg: Fixed Report Descriptor for Logitech MOMO Force (Black) " Simon Wood
  2013-10-10  0:04 ` [PATCH " Simon Wood
  0 siblings, 2 replies; 10+ messages in thread
From: Simon Wood @ 2013-10-10  0:04 UTC (permalink / raw)
  To: linux-input
  Cc: Jiri Kosina, linux-kernel, simon, Elias Vanderstuyft, Michal Malý

Requires https://patchwork.kernel.org/patch/2998241/

Signed-off-by: Simon Wood <simon@mungewell.org>
---
 drivers/hid/hid-lg.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 77 insertions(+)

diff --git a/drivers/hid/hid-lg.c b/drivers/hid/hid-lg.c
index c2c7dab..c6efdae 100644
--- a/drivers/hid/hid-lg.c
+++ b/drivers/hid/hid-lg.c
@@ -45,6 +45,7 @@
 /* Size of the original descriptors of the Driving Force (and Pro) wheels */
 #define DF_RDESC_ORIG_SIZE	130
 #define DFP_RDESC_ORIG_SIZE	97
+#define FV_RDESC_ORIG_SIZE	130
 #define MOMO_RDESC_ORIG_SIZE	87
 
 /* Fixed report descriptors for Logitech Driving Force (and Pro)
@@ -170,6 +171,73 @@ static __u8 dfp_rdesc_fixed[] = {
 0xC0                /*  End Collection                          */
 };
 
+static __u8 fv_rdesc_fixed[] = {
+0x05, 0x01,         /*  Usage Page (Desktop),                   */
+0x09, 0x04,         /*  Usage (Joystik),                        */
+0xA1, 0x01,         /*  Collection (Application),               */
+0xA1, 0x02,         /*      Collection (Logical),               */
+0x95, 0x01,         /*          Report Count (1),               */
+0x75, 0x0A,         /*          Report Size (10),               */
+0x15, 0x00,         /*          Logical Minimum (0),            */
+0x26, 0xFF, 0x03,   /*          Logical Maximum (1023),         */
+0x35, 0x00,         /*          Physical Minimum (0),           */
+0x46, 0xFF, 0x03,   /*          Physical Maximum (1023),        */
+0x09, 0x30,         /*          Usage (X),                      */
+0x81, 0x02,         /*          Input (Variable),               */
+0x95, 0x0C,         /*          Report Count (12),              */
+0x75, 0x01,         /*          Report Size (1),                */
+0x25, 0x01,         /*          Logical Maximum (1),            */
+0x45, 0x01,         /*          Physical Maximum (1),           */
+0x05, 0x09,         /*          Usage Page (Button),            */
+0x19, 0x01,         /*          Usage Minimum (01h),            */
+0x29, 0x0C,         /*          Usage Maximum (0Ch),            */
+0x81, 0x02,         /*          Input (Variable),               */
+0x95, 0x02,         /*          Report Count (2),               */
+0x06, 0x00, 0xFF,   /*          Usage Page (FF00h),             */
+0x09, 0x01,         /*          Usage (01h),                    */
+0x81, 0x02,         /*          Input (Variable),               */
+0x09, 0x02,         /*          Usage (02h),                    */
+0x26, 0xFF, 0x00,   /*          Logical Maximum (255),          */
+0x46, 0xFF, 0x00,   /*          Physical Maximum (255),         */
+0x95, 0x01,         /*          Report Count (1),               */
+0x75, 0x08,         /*          Report Size (8),                */
+0x81, 0x02,         /*          Input (Variable),               */
+0x05, 0x01,         /*          Usage Page (Desktop),           */
+0x25, 0x07,         /*          Logical Maximum (7),            */
+0x46, 0x3B, 0x01,   /*          Physical Maximum (315),         */
+0x75, 0x04,         /*          Report Size (4),                */
+0x65, 0x14,         /*          Unit (Degrees),                 */
+0x09, 0x39,         /*          Usage (Hat Switch),             */
+0x81, 0x42,         /*          Input (Variable, Null State),   */
+0x75, 0x01,         /*          Report Size (1),                */
+0x95, 0x04,         /*          Report Count (4),               */
+0x65, 0x00,         /*          Unit,                           */
+0x06, 0x00, 0xFF,   /*          Usage Page (FF00h),             */
+0x09, 0x01,         /*          Usage (01h),                    */
+0x25, 0x01,         /*          Logical Maximum (1),            */
+0x45, 0x01,         /*          Physical Maximum (1),           */
+0x81, 0x02,         /*          Input (Variable),               */
+0x05, 0x01,         /*          Usage Page (Desktop),           */
+0x95, 0x01,         /*          Report Count (1),               */
+0x75, 0x08,         /*          Report Size (8),                */
+0x26, 0xFF, 0x00,   /*          Logical Maximum (255),          */
+0x46, 0xFF, 0x00,   /*          Physical Maximum (255),         */
+0x09, 0x31,         /*          Usage (Y),                      */
+0x81, 0x02,         /*          Input (Variable),               */
+0x09, 0x32,         /*          Usage (Z),                      */
+0x81, 0x02,         /*          Input (Variable),               */
+0xC0,               /*      End Collection,                     */
+0xA1, 0x02,         /*      Collection (Logical),               */
+0x26, 0xFF, 0x00,   /*          Logical Maximum (255),          */
+0x46, 0xFF, 0x00,   /*          Physical Maximum (255),         */
+0x95, 0x07,         /*          Report Count (7),               */
+0x75, 0x08,         /*          Report Size (8),                */
+0x09, 0x03,         /*          Usage (03h),                    */
+0x91, 0x02,         /*          Output (Variable),              */
+0xC0,               /*      End Collection,                     */
+0xC0                /*  End Collection                          */
+};
+
 static __u8 momo_rdesc_fixed[] = {
 0x05, 0x01,         /*  Usage Page (Desktop),               */
 0x09, 0x04,         /*  Usage (Joystik),                    */
@@ -275,6 +343,15 @@ static __u8 *lg_report_fixup(struct hid_device *hdev, __u8 *rdesc,
 		}
 		break;
 
+	case USB_DEVICE_ID_LOGITECH_VIBRATION_WHEEL:
+		if (*rsize == FV_RDESC_ORIG_SIZE) {
+			hid_info(hdev,
+				"fixing up Logitech Formula Vibration report descriptor\n");
+			rdesc = fv_rdesc_fixed;
+			*rsize = sizeof(fv_rdesc_fixed);
+		}
+		break;
+
 	case USB_DEVICE_ID_LOGITECH_DFP_WHEEL:
 		if (*rsize == DFP_RDESC_ORIG_SIZE) {
 			hid_info(hdev,
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/3] HID:hid-lg: Fixed Report Descriptor for Logitech MOMO Force (Black) to split Accel/Brake into seperate axis
  2013-10-10  0:04 [PATCH 1/3] HID:hid-lg: Fixed ReportDescriptor for Logitech Formular Vibration to split Accel/Brake into seperate axis Simon Wood
@ 2013-10-10  0:04 ` Simon Wood
  2013-10-10  8:02   ` Jiri Kosina
  2013-10-10  0:04 ` [PATCH " Simon Wood
  1 sibling, 1 reply; 10+ messages in thread
From: Simon Wood @ 2013-10-10  0:04 UTC (permalink / raw)
  To: linux-input
  Cc: Jiri Kosina, linux-kernel, simon, Elias Vanderstuyft, Michal Malý


Signed-off-by: Simon Wood <simon@mungewell.org>
---
 drivers/hid/hid-lg.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/drivers/hid/hid-lg.c b/drivers/hid/hid-lg.c
index c6efdae..545da44 100644
--- a/drivers/hid/hid-lg.c
+++ b/drivers/hid/hid-lg.c
@@ -47,6 +47,7 @@
 #define DFP_RDESC_ORIG_SIZE	97
 #define FV_RDESC_ORIG_SIZE	130
 #define MOMO_RDESC_ORIG_SIZE	87
+#define MOMO2_RDESC_ORIG_SIZE	87
 
 /* Fixed report descriptors for Logitech Driving Force (and Pro)
  * wheel controllers
@@ -284,6 +285,54 @@ static __u8 momo_rdesc_fixed[] = {
 0xC0                /*  End Collection                      */
 };
 
+static __u8 momo2_rdesc_fixed[] = {
+0x05, 0x01,         /*  Usage Page (Desktop),               */
+0x09, 0x04,         /*  Usage (Joystik),                    */
+0xA1, 0x01,         /*  Collection (Application),           */
+0xA1, 0x02,         /*      Collection (Logical),           */
+0x95, 0x01,         /*          Report Count (1),           */
+0x75, 0x0A,         /*          Report Size (10),           */
+0x15, 0x00,         /*          Logical Minimum (0),        */
+0x26, 0xFF, 0x03,   /*          Logical Maximum (1023),     */
+0x35, 0x00,         /*          Physical Minimum (0),       */
+0x46, 0xFF, 0x03,   /*          Physical Maximum (1023),    */
+0x09, 0x30,         /*          Usage (X),                  */
+0x81, 0x02,         /*          Input (Variable),           */
+0x95, 0x0A,         /*          Report Count (10),          */
+0x75, 0x01,         /*          Report Size (1),            */
+0x25, 0x01,         /*          Logical Maximum (1),        */
+0x45, 0x01,         /*          Physical Maximum (1),       */
+0x05, 0x09,         /*          Usage Page (Button),        */
+0x19, 0x01,         /*          Usage Minimum (01h),        */
+0x29, 0x0A,         /*          Usage Maximum (0Ah),        */
+0x81, 0x02,         /*          Input (Variable),           */
+0x06, 0x00, 0xFF,   /*          Usage Page (FF00h),         */
+0x09, 0x00,         /*          Usage (00h),                */
+0x95, 0x04,         /*          Report Count (4),           */
+0x81, 0x02,         /*          Input (Variable),           */
+0x95, 0x01,         /*          Report Count (1),           */
+0x75, 0x08,         /*          Report Size (8),            */
+0x26, 0xFF, 0x00,   /*          Logical Maximum (255),      */
+0x46, 0xFF, 0x00,   /*          Physical Maximum (255),     */
+0x09, 0x01,         /*          Usage (01h),                */
+0x81, 0x02,         /*          Input (Variable),           */
+0x05, 0x01,         /*          Usage Page (Desktop),       */
+0x09, 0x31,         /*          Usage (Y),                  */
+0x81, 0x02,         /*          Input (Variable),           */
+0x09, 0x32,         /*          Usage (Z),                  */
+0x81, 0x02,         /*          Input (Variable),           */
+0x06, 0x00, 0xFF,   /*          Usage Page (FF00h),         */
+0x09, 0x00,         /*          Usage (00h),                */
+0x81, 0x02,         /*          Input (Variable),           */
+0xC0,               /*      End Collection,                 */
+0xA1, 0x02,         /*      Collection (Logical),           */
+0x09, 0x02,         /*          Usage (02h),                */
+0x95, 0x07,         /*          Report Count (7),           */
+0x91, 0x02,         /*          Output (Variable),          */
+0xC0,               /*      End Collection,                 */
+0xC0                /*  End Collection                      */
+};
+
 /*
  * Certain Logitech keyboards send in report #3 keys which are far
  * above the logical maximum described in descriptor. This extends
@@ -343,6 +392,15 @@ static __u8 *lg_report_fixup(struct hid_device *hdev, __u8 *rdesc,
 		}
 		break;
 
+	case USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2:
+		if (*rsize == MOMO2_RDESC_ORIG_SIZE) {
+			hid_info(hdev,
+				"fixing up Logitech Momo Racing Force (Black) report descriptor\n");
+			rdesc = momo2_rdesc_fixed;
+			*rsize = sizeof(momo2_rdesc_fixed);
+		}
+		break;
+
 	case USB_DEVICE_ID_LOGITECH_VIBRATION_WHEEL:
 		if (*rsize == FV_RDESC_ORIG_SIZE) {
 			hid_info(hdev,
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/3] HID:Kconfig: Correct MOMO description in wrong place (handled by LG4FF).
  2013-10-10  0:04 [PATCH 1/3] HID:hid-lg: Fixed ReportDescriptor for Logitech Formular Vibration to split Accel/Brake into seperate axis Simon Wood
  2013-10-10  0:04 ` [PATCH 2/3] HID:hid-lg: Fixed Report Descriptor for Logitech MOMO Force (Black) " Simon Wood
@ 2013-10-10  0:04 ` Simon Wood
  1 sibling, 0 replies; 10+ messages in thread
From: Simon Wood @ 2013-10-10  0:04 UTC (permalink / raw)
  To: linux-input
  Cc: Jiri Kosina, linux-kernel, simon, Elias Vanderstuyft, Michal Malý


Signed-off-by: Simon Wood <simon@mungewell.org>
---
 drivers/hid/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 46fd27f..aee7182 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -362,7 +362,6 @@ config LOGITECH_FF
 	  - Logitech WingMan Force 3D
 	  - Logitech Formula Force EX
 	  - Logitech WingMan Formula Force GP
-	  - Logitech MOMO Force wheel
 
 	  and if you want to enable force feedback for them.
 	  Note: if you say N here, this device will still be supported, but without
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/3] HID:hid-lg: Fixed Report Descriptor for Logitech MOMO Force (Black) to split Accel/Brake into seperate axis
  2013-10-10  0:04 ` [PATCH 2/3] HID:hid-lg: Fixed Report Descriptor for Logitech MOMO Force (Black) " Simon Wood
@ 2013-10-10  8:02   ` Jiri Kosina
  2013-10-10 14:20     ` [PATCHv2 1/3] HID:hid-lg: Fixed ReportDescriptor for Logitech Formula Vibration " Simon Wood
  0 siblings, 1 reply; 10+ messages in thread
From: Jiri Kosina @ 2013-10-10  8:02 UTC (permalink / raw)
  To: Simon Wood
  Cc: linux-input, linux-kernel, Elias Vanderstuyft, Michal Malý

On Wed, 9 Oct 2013, Simon Wood wrote:

> 
> Signed-off-by: Simon Wood <simon@mungewell.org>

Simon,

thanks for the series. I however very much dislike commits without a 
single line of changelog ... could you please resend the series with a few 
sentences as a patch description (i.e. what, why, how).

Thanks a lot.

> ---
>  drivers/hid/hid-lg.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 58 insertions(+)
> 
> diff --git a/drivers/hid/hid-lg.c b/drivers/hid/hid-lg.c
> index c6efdae..545da44 100644
> --- a/drivers/hid/hid-lg.c
> +++ b/drivers/hid/hid-lg.c
> @@ -47,6 +47,7 @@
>  #define DFP_RDESC_ORIG_SIZE	97
>  #define FV_RDESC_ORIG_SIZE	130
>  #define MOMO_RDESC_ORIG_SIZE	87
> +#define MOMO2_RDESC_ORIG_SIZE	87
>  
>  /* Fixed report descriptors for Logitech Driving Force (and Pro)
>   * wheel controllers
> @@ -284,6 +285,54 @@ static __u8 momo_rdesc_fixed[] = {
>  0xC0                /*  End Collection                      */
>  };
>  
> +static __u8 momo2_rdesc_fixed[] = {
> +0x05, 0x01,         /*  Usage Page (Desktop),               */
> +0x09, 0x04,         /*  Usage (Joystik),                    */
> +0xA1, 0x01,         /*  Collection (Application),           */
> +0xA1, 0x02,         /*      Collection (Logical),           */
> +0x95, 0x01,         /*          Report Count (1),           */
> +0x75, 0x0A,         /*          Report Size (10),           */
> +0x15, 0x00,         /*          Logical Minimum (0),        */
> +0x26, 0xFF, 0x03,   /*          Logical Maximum (1023),     */
> +0x35, 0x00,         /*          Physical Minimum (0),       */
> +0x46, 0xFF, 0x03,   /*          Physical Maximum (1023),    */
> +0x09, 0x30,         /*          Usage (X),                  */
> +0x81, 0x02,         /*          Input (Variable),           */
> +0x95, 0x0A,         /*          Report Count (10),          */
> +0x75, 0x01,         /*          Report Size (1),            */
> +0x25, 0x01,         /*          Logical Maximum (1),        */
> +0x45, 0x01,         /*          Physical Maximum (1),       */
> +0x05, 0x09,         /*          Usage Page (Button),        */
> +0x19, 0x01,         /*          Usage Minimum (01h),        */
> +0x29, 0x0A,         /*          Usage Maximum (0Ah),        */
> +0x81, 0x02,         /*          Input (Variable),           */
> +0x06, 0x00, 0xFF,   /*          Usage Page (FF00h),         */
> +0x09, 0x00,         /*          Usage (00h),                */
> +0x95, 0x04,         /*          Report Count (4),           */
> +0x81, 0x02,         /*          Input (Variable),           */
> +0x95, 0x01,         /*          Report Count (1),           */
> +0x75, 0x08,         /*          Report Size (8),            */
> +0x26, 0xFF, 0x00,   /*          Logical Maximum (255),      */
> +0x46, 0xFF, 0x00,   /*          Physical Maximum (255),     */
> +0x09, 0x01,         /*          Usage (01h),                */
> +0x81, 0x02,         /*          Input (Variable),           */
> +0x05, 0x01,         /*          Usage Page (Desktop),       */
> +0x09, 0x31,         /*          Usage (Y),                  */
> +0x81, 0x02,         /*          Input (Variable),           */
> +0x09, 0x32,         /*          Usage (Z),                  */
> +0x81, 0x02,         /*          Input (Variable),           */
> +0x06, 0x00, 0xFF,   /*          Usage Page (FF00h),         */
> +0x09, 0x00,         /*          Usage (00h),                */
> +0x81, 0x02,         /*          Input (Variable),           */
> +0xC0,               /*      End Collection,                 */
> +0xA1, 0x02,         /*      Collection (Logical),           */
> +0x09, 0x02,         /*          Usage (02h),                */
> +0x95, 0x07,         /*          Report Count (7),           */
> +0x91, 0x02,         /*          Output (Variable),          */
> +0xC0,               /*      End Collection,                 */
> +0xC0                /*  End Collection                      */
> +};
> +
>  /*
>   * Certain Logitech keyboards send in report #3 keys which are far
>   * above the logical maximum described in descriptor. This extends
> @@ -343,6 +392,15 @@ static __u8 *lg_report_fixup(struct hid_device *hdev, __u8 *rdesc,
>  		}
>  		break;
>  
> +	case USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2:
> +		if (*rsize == MOMO2_RDESC_ORIG_SIZE) {
> +			hid_info(hdev,
> +				"fixing up Logitech Momo Racing Force (Black) report descriptor\n");
> +			rdesc = momo2_rdesc_fixed;
> +			*rsize = sizeof(momo2_rdesc_fixed);
> +		}
> +		break;
> +
>  	case USB_DEVICE_ID_LOGITECH_VIBRATION_WHEEL:
>  		if (*rsize == FV_RDESC_ORIG_SIZE) {
>  			hid_info(hdev,
> -- 
> 1.8.1.2
> 

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCHv2 1/3] HID:hid-lg: Fixed ReportDescriptor for Logitech Formula Vibration to split Accel/Brake into seperate axis
  2013-10-10  8:02   ` Jiri Kosina
@ 2013-10-10 14:20     ` Simon Wood
  2013-10-10 14:20       ` [PATCHv2 2/3] HID:hid-lg: Fixed Report Descriptor for Logitech MOMO Force (Black) " Simon Wood
  2013-10-10 14:20       ` [PATCHv2 3/3] HID:Kconfig: Correct MOMO description in wrong place (handled by LG4FF) Simon Wood
  0 siblings, 2 replies; 10+ messages in thread
From: Simon Wood @ 2013-10-10 14:20 UTC (permalink / raw)
  To: linux-input
  Cc: Jiri Kosina, linux-kernel, simon, Elias Vanderstuyft, Michal Malý

Requires https://patchwork.kernel.org/patch/2998241/

By default the Logitech Formula Vibration presents a combined accel/brake
axis ('Y'). This patch modifies the HID descriptor to present seperate    
accel/brake axes ('Y' and 'Z').

Signed-off-by: Simon Wood <simon@mungewell.org>
---
 drivers/hid/hid-lg.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 77 insertions(+)

diff --git a/drivers/hid/hid-lg.c b/drivers/hid/hid-lg.c
index c2c7dab..c6efdae 100644
--- a/drivers/hid/hid-lg.c
+++ b/drivers/hid/hid-lg.c
@@ -45,6 +45,7 @@
 /* Size of the original descriptors of the Driving Force (and Pro) wheels */
 #define DF_RDESC_ORIG_SIZE	130
 #define DFP_RDESC_ORIG_SIZE	97
+#define FV_RDESC_ORIG_SIZE	130
 #define MOMO_RDESC_ORIG_SIZE	87
 
 /* Fixed report descriptors for Logitech Driving Force (and Pro)
@@ -170,6 +171,73 @@ static __u8 dfp_rdesc_fixed[] = {
 0xC0                /*  End Collection                          */
 };
 
+static __u8 fv_rdesc_fixed[] = {
+0x05, 0x01,         /*  Usage Page (Desktop),                   */
+0x09, 0x04,         /*  Usage (Joystik),                        */
+0xA1, 0x01,         /*  Collection (Application),               */
+0xA1, 0x02,         /*      Collection (Logical),               */
+0x95, 0x01,         /*          Report Count (1),               */
+0x75, 0x0A,         /*          Report Size (10),               */
+0x15, 0x00,         /*          Logical Minimum (0),            */
+0x26, 0xFF, 0x03,   /*          Logical Maximum (1023),         */
+0x35, 0x00,         /*          Physical Minimum (0),           */
+0x46, 0xFF, 0x03,   /*          Physical Maximum (1023),        */
+0x09, 0x30,         /*          Usage (X),                      */
+0x81, 0x02,         /*          Input (Variable),               */
+0x95, 0x0C,         /*          Report Count (12),              */
+0x75, 0x01,         /*          Report Size (1),                */
+0x25, 0x01,         /*          Logical Maximum (1),            */
+0x45, 0x01,         /*          Physical Maximum (1),           */
+0x05, 0x09,         /*          Usage Page (Button),            */
+0x19, 0x01,         /*          Usage Minimum (01h),            */
+0x29, 0x0C,         /*          Usage Maximum (0Ch),            */
+0x81, 0x02,         /*          Input (Variable),               */
+0x95, 0x02,         /*          Report Count (2),               */
+0x06, 0x00, 0xFF,   /*          Usage Page (FF00h),             */
+0x09, 0x01,         /*          Usage (01h),                    */
+0x81, 0x02,         /*          Input (Variable),               */
+0x09, 0x02,         /*          Usage (02h),                    */
+0x26, 0xFF, 0x00,   /*          Logical Maximum (255),          */
+0x46, 0xFF, 0x00,   /*          Physical Maximum (255),         */
+0x95, 0x01,         /*          Report Count (1),               */
+0x75, 0x08,         /*          Report Size (8),                */
+0x81, 0x02,         /*          Input (Variable),               */
+0x05, 0x01,         /*          Usage Page (Desktop),           */
+0x25, 0x07,         /*          Logical Maximum (7),            */
+0x46, 0x3B, 0x01,   /*          Physical Maximum (315),         */
+0x75, 0x04,         /*          Report Size (4),                */
+0x65, 0x14,         /*          Unit (Degrees),                 */
+0x09, 0x39,         /*          Usage (Hat Switch),             */
+0x81, 0x42,         /*          Input (Variable, Null State),   */
+0x75, 0x01,         /*          Report Size (1),                */
+0x95, 0x04,         /*          Report Count (4),               */
+0x65, 0x00,         /*          Unit,                           */
+0x06, 0x00, 0xFF,   /*          Usage Page (FF00h),             */
+0x09, 0x01,         /*          Usage (01h),                    */
+0x25, 0x01,         /*          Logical Maximum (1),            */
+0x45, 0x01,         /*          Physical Maximum (1),           */
+0x81, 0x02,         /*          Input (Variable),               */
+0x05, 0x01,         /*          Usage Page (Desktop),           */
+0x95, 0x01,         /*          Report Count (1),               */
+0x75, 0x08,         /*          Report Size (8),                */
+0x26, 0xFF, 0x00,   /*          Logical Maximum (255),          */
+0x46, 0xFF, 0x00,   /*          Physical Maximum (255),         */
+0x09, 0x31,         /*          Usage (Y),                      */
+0x81, 0x02,         /*          Input (Variable),               */
+0x09, 0x32,         /*          Usage (Z),                      */
+0x81, 0x02,         /*          Input (Variable),               */
+0xC0,               /*      End Collection,                     */
+0xA1, 0x02,         /*      Collection (Logical),               */
+0x26, 0xFF, 0x00,   /*          Logical Maximum (255),          */
+0x46, 0xFF, 0x00,   /*          Physical Maximum (255),         */
+0x95, 0x07,         /*          Report Count (7),               */
+0x75, 0x08,         /*          Report Size (8),                */
+0x09, 0x03,         /*          Usage (03h),                    */
+0x91, 0x02,         /*          Output (Variable),              */
+0xC0,               /*      End Collection,                     */
+0xC0                /*  End Collection                          */
+};
+
 static __u8 momo_rdesc_fixed[] = {
 0x05, 0x01,         /*  Usage Page (Desktop),               */
 0x09, 0x04,         /*  Usage (Joystik),                    */
@@ -275,6 +343,15 @@ static __u8 *lg_report_fixup(struct hid_device *hdev, __u8 *rdesc,
 		}
 		break;
 
+	case USB_DEVICE_ID_LOGITECH_VIBRATION_WHEEL:
+		if (*rsize == FV_RDESC_ORIG_SIZE) {
+			hid_info(hdev,
+				"fixing up Logitech Formula Vibration report descriptor\n");
+			rdesc = fv_rdesc_fixed;
+			*rsize = sizeof(fv_rdesc_fixed);
+		}
+		break;
+
 	case USB_DEVICE_ID_LOGITECH_DFP_WHEEL:
 		if (*rsize == DFP_RDESC_ORIG_SIZE) {
 			hid_info(hdev,
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCHv2 2/3] HID:hid-lg: Fixed Report Descriptor for Logitech MOMO Force (Black) to split Accel/Brake into seperate axis
  2013-10-10 14:20     ` [PATCHv2 1/3] HID:hid-lg: Fixed ReportDescriptor for Logitech Formula Vibration " Simon Wood
@ 2013-10-10 14:20       ` Simon Wood
  2013-10-10 14:20       ` [PATCHv2 3/3] HID:Kconfig: Correct MOMO description in wrong place (handled by LG4FF) Simon Wood
  1 sibling, 0 replies; 10+ messages in thread
From: Simon Wood @ 2013-10-10 14:20 UTC (permalink / raw)
  To: linux-input
  Cc: Jiri Kosina, linux-kernel, simon, Elias Vanderstuyft, Michal Malý

By default the Logitech MOMO Force (Black) presents a combined accel/brake
axis ('Y'). This patch modifies the HID descriptor to present seperate 
accel/brake axes ('Y' and 'Z').

Signed-off-by: Simon Wood <simon@mungewell.org>
---
 drivers/hid/hid-lg.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/drivers/hid/hid-lg.c b/drivers/hid/hid-lg.c
index c6efdae..545da44 100644
--- a/drivers/hid/hid-lg.c
+++ b/drivers/hid/hid-lg.c
@@ -47,6 +47,7 @@
 #define DFP_RDESC_ORIG_SIZE	97
 #define FV_RDESC_ORIG_SIZE	130
 #define MOMO_RDESC_ORIG_SIZE	87
+#define MOMO2_RDESC_ORIG_SIZE	87
 
 /* Fixed report descriptors for Logitech Driving Force (and Pro)
  * wheel controllers
@@ -284,6 +285,54 @@ static __u8 momo_rdesc_fixed[] = {
 0xC0                /*  End Collection                      */
 };
 
+static __u8 momo2_rdesc_fixed[] = {
+0x05, 0x01,         /*  Usage Page (Desktop),               */
+0x09, 0x04,         /*  Usage (Joystik),                    */
+0xA1, 0x01,         /*  Collection (Application),           */
+0xA1, 0x02,         /*      Collection (Logical),           */
+0x95, 0x01,         /*          Report Count (1),           */
+0x75, 0x0A,         /*          Report Size (10),           */
+0x15, 0x00,         /*          Logical Minimum (0),        */
+0x26, 0xFF, 0x03,   /*          Logical Maximum (1023),     */
+0x35, 0x00,         /*          Physical Minimum (0),       */
+0x46, 0xFF, 0x03,   /*          Physical Maximum (1023),    */
+0x09, 0x30,         /*          Usage (X),                  */
+0x81, 0x02,         /*          Input (Variable),           */
+0x95, 0x0A,         /*          Report Count (10),          */
+0x75, 0x01,         /*          Report Size (1),            */
+0x25, 0x01,         /*          Logical Maximum (1),        */
+0x45, 0x01,         /*          Physical Maximum (1),       */
+0x05, 0x09,         /*          Usage Page (Button),        */
+0x19, 0x01,         /*          Usage Minimum (01h),        */
+0x29, 0x0A,         /*          Usage Maximum (0Ah),        */
+0x81, 0x02,         /*          Input (Variable),           */
+0x06, 0x00, 0xFF,   /*          Usage Page (FF00h),         */
+0x09, 0x00,         /*          Usage (00h),                */
+0x95, 0x04,         /*          Report Count (4),           */
+0x81, 0x02,         /*          Input (Variable),           */
+0x95, 0x01,         /*          Report Count (1),           */
+0x75, 0x08,         /*          Report Size (8),            */
+0x26, 0xFF, 0x00,   /*          Logical Maximum (255),      */
+0x46, 0xFF, 0x00,   /*          Physical Maximum (255),     */
+0x09, 0x01,         /*          Usage (01h),                */
+0x81, 0x02,         /*          Input (Variable),           */
+0x05, 0x01,         /*          Usage Page (Desktop),       */
+0x09, 0x31,         /*          Usage (Y),                  */
+0x81, 0x02,         /*          Input (Variable),           */
+0x09, 0x32,         /*          Usage (Z),                  */
+0x81, 0x02,         /*          Input (Variable),           */
+0x06, 0x00, 0xFF,   /*          Usage Page (FF00h),         */
+0x09, 0x00,         /*          Usage (00h),                */
+0x81, 0x02,         /*          Input (Variable),           */
+0xC0,               /*      End Collection,                 */
+0xA1, 0x02,         /*      Collection (Logical),           */
+0x09, 0x02,         /*          Usage (02h),                */
+0x95, 0x07,         /*          Report Count (7),           */
+0x91, 0x02,         /*          Output (Variable),          */
+0xC0,               /*      End Collection,                 */
+0xC0                /*  End Collection                      */
+};
+
 /*
  * Certain Logitech keyboards send in report #3 keys which are far
  * above the logical maximum described in descriptor. This extends
@@ -343,6 +392,15 @@ static __u8 *lg_report_fixup(struct hid_device *hdev, __u8 *rdesc,
 		}
 		break;
 
+	case USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2:
+		if (*rsize == MOMO2_RDESC_ORIG_SIZE) {
+			hid_info(hdev,
+				"fixing up Logitech Momo Racing Force (Black) report descriptor\n");
+			rdesc = momo2_rdesc_fixed;
+			*rsize = sizeof(momo2_rdesc_fixed);
+		}
+		break;
+
 	case USB_DEVICE_ID_LOGITECH_VIBRATION_WHEEL:
 		if (*rsize == FV_RDESC_ORIG_SIZE) {
 			hid_info(hdev,
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCHv2 3/3] HID:Kconfig: Correct MOMO description in wrong place (handled by LG4FF).
  2013-10-10 14:20     ` [PATCHv2 1/3] HID:hid-lg: Fixed ReportDescriptor for Logitech Formula Vibration " Simon Wood
  2013-10-10 14:20       ` [PATCHv2 2/3] HID:hid-lg: Fixed Report Descriptor for Logitech MOMO Force (Black) " Simon Wood
@ 2013-10-10 14:20       ` Simon Wood
       [not found]         ` <CADbOyBQodqzSb04OCO6oduJSZvveZXxQjSdp+CdyKKk5Bs=O7w@mail.gmail.com>
  1 sibling, 1 reply; 10+ messages in thread
From: Simon Wood @ 2013-10-10 14:20 UTC (permalink / raw)
  To: linux-input
  Cc: Jiri Kosina, linux-kernel, simon, Elias Vanderstuyft, Michal Malý

Minor correction to the description in Kconfig.

The Logitect MOMO wheel is actually handled by the LOGITECH_WHEELS (hid-lg4ff) 
section, not by the LOGITECH_FF (hid-lgff).

Signed-off-by: Simon Wood <simon@mungewell.org>
---
 drivers/hid/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 46fd27f..aee7182 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -362,7 +362,6 @@ config LOGITECH_FF
 	  - Logitech WingMan Force 3D
 	  - Logitech Formula Force EX
 	  - Logitech WingMan Formula Force GP
-	  - Logitech MOMO Force wheel
 
 	  and if you want to enable force feedback for them.
 	  Note: if you say N here, this device will still be supported, but without
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCHv2 3/3] HID:Kconfig: Correct MOMO description in wrong place (handled by LG4FF).
       [not found]         ` <CADbOyBQodqzSb04OCO6oduJSZvveZXxQjSdp+CdyKKk5Bs=O7w@mail.gmail.com>
@ 2013-10-14 14:03           ` Jiri Kosina
  2013-10-14 14:58             ` simon
  0 siblings, 1 reply; 10+ messages in thread
From: Jiri Kosina @ 2013-10-14 14:03 UTC (permalink / raw)
  To: Elias Vanderstuyft, Simon Wood
  Cc: linux-input, linux-kernel, Michal Malý

On Thu, 10 Oct 2013, Elias Vanderstuyft wrote:

> I don't see any report-descriptor being fixed up, this results in having
> only two axes: steering and combined accel-brake axis.
> So, same procedure as the Formula Vibration wheel, I'll send you the report
> descriptor and some hidraw data when using the accel and brake pedals, in
> my next mail.

So should I wait for v3, where the rdesc fixup for splitting the axes will 
be done, or are you planning to submit it to me as a followup patch?

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCHv2 3/3] HID:Kconfig: Correct MOMO description in wrong place (handled by LG4FF).
  2013-10-14 14:03           ` Jiri Kosina
@ 2013-10-14 14:58             ` simon
  2013-10-14 18:48               ` Jiri Kosina
  0 siblings, 1 reply; 10+ messages in thread
From: simon @ 2013-10-14 14:58 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Elias Vanderstuyft, Simon Wood, linux-input, linux-kernel,
	"Michal Malý"

> On Thu, 10 Oct 2013, Elias Vanderstuyft wrote:
>
>> I don't see any report-descriptor being fixed up, this results in having
>> only two axes: steering and combined accel-brake axis.
>> So, same procedure as the Formula Vibration wheel, I'll send you the
>> report
>> descriptor and some hidraw data when using the accel and brake pedals,
>> in
>> my next mail.
>
> So should I wait for v3, where the rdesc fixup for splitting the axes will
> be done, or are you planning to submit it to me as a followup patch?

The HID descriptor for the MOMO Black was re-written in part2 of the patch
series:
https://patchwork.kernel.org/patch/3016111/

Simon


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCHv2 3/3] HID:Kconfig: Correct MOMO description in wrong place (handled by LG4FF).
  2013-10-14 14:58             ` simon
@ 2013-10-14 18:48               ` Jiri Kosina
  0 siblings, 0 replies; 10+ messages in thread
From: Jiri Kosina @ 2013-10-14 18:48 UTC (permalink / raw)
  To: Simon Wood
  Cc: Elias Vanderstuyft, linux-input, linux-kernel,
	"Michal Malý"

On Mon, 14 Oct 2013, simon@mungewell.org wrote:

> >> only two axes: steering and combined accel-brake axis.
> >> So, same procedure as the Formula Vibration wheel, I'll send you the
> >> report
> >> descriptor and some hidraw data when using the accel and brake pedals,
> >> in
> >> my next mail.
> >
> > So should I wait for v3, where the rdesc fixup for splitting the axes will
> > be done, or are you planning to submit it to me as a followup patch?
> 
> The HID descriptor for the MOMO Black was re-written in part2 of the patch
> series:
> https://patchwork.kernel.org/patch/3016111/

Bah, you are right, I was still by mistake looking at the original series.

I am now applying all the 3 patches from v2.

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-10-14 18:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-10  0:04 [PATCH 1/3] HID:hid-lg: Fixed ReportDescriptor for Logitech Formular Vibration to split Accel/Brake into seperate axis Simon Wood
2013-10-10  0:04 ` [PATCH 2/3] HID:hid-lg: Fixed Report Descriptor for Logitech MOMO Force (Black) " Simon Wood
2013-10-10  8:02   ` Jiri Kosina
2013-10-10 14:20     ` [PATCHv2 1/3] HID:hid-lg: Fixed ReportDescriptor for Logitech Formula Vibration " Simon Wood
2013-10-10 14:20       ` [PATCHv2 2/3] HID:hid-lg: Fixed Report Descriptor for Logitech MOMO Force (Black) " Simon Wood
2013-10-10 14:20       ` [PATCHv2 3/3] HID:Kconfig: Correct MOMO description in wrong place (handled by LG4FF) Simon Wood
     [not found]         ` <CADbOyBQodqzSb04OCO6oduJSZvveZXxQjSdp+CdyKKk5Bs=O7w@mail.gmail.com>
2013-10-14 14:03           ` Jiri Kosina
2013-10-14 14:58             ` simon
2013-10-14 18:48               ` Jiri Kosina
2013-10-10  0:04 ` [PATCH " Simon Wood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.