I found out a solution by modifying kernel source and recompiling it, basically i added :
#define USB_DEVICE_ID_GREENASIA_DUAL_SS_JOYPAD 0x3010
#define USB_DEVICE_ID_GREENASIA_DUAL_PS_JOYPAD 0x1006
to drivers/hid/hid-ids.h
And
{ USB_VENDOR_ID_GREENASIA, USB_DEVICE_ID_GREENASIA_DUAL_SS_JOYPAD, HID_QUIRK_MULTI_INPUT },
{ USB_VENDOR_ID_GREENASIA, USB_DEVICE_ID_GREENASIA_DUAL_PS_JOYPAD, HID_QUIRK_MULTI_INPUT },
to drivers/hid/usbhid/hid-quirks.c
Now each adapters are recognized as 2 joystick
Now i have another issue with autoconf, both my adapters (PS and SS) will name my joypads “HuiJia USB GamePad”, i need to differentiate them since i can’t have the same mapping for PS pads and SS pads.
udevadm info return this :
looking at device ‘/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0/0003:0E8F:1006.000B/input/input30/js0’:
KERNEL==“js0”
SUBSYSTEM==“input”
DRIVER==""
looking at parent device ‘/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0/0003:0E8F:1006.000B/input/input30’:
KERNELS==“input30”
SUBSYSTEMS==“input”
DRIVERS==""
ATTRS{name}==“HuiJia USB GamePad”
ATTRS{phys}==“usb-0000:00:1a.0-1.2/input0”
ATTRS{uniq}==""
ATTRS{properties}==“0”
looking at parent device ‘/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0/0003:0E8F:1006.000B’:
KERNELS==“0003:0E8F:1006.000B”
SUBSYSTEMS==“hid”
DRIVERS==“hid-generic”
looking at parent device ‘/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0’:
KERNELS==“3-1.2:1.0”
SUBSYSTEMS==“usb”
DRIVERS==“usbhid”
ATTRS{bInterfaceClass}==“03”
ATTRS{bInterfaceSubClass}==“00”
ATTRS{bInterfaceProtocol}==“00”
ATTRS{bNumEndpoints}==“01”
ATTRS{supports_autosuspend}==“1”
ATTRS{bAlternateSetting}==" 0"
ATTRS{bInterfaceNumber}==“00”
looking at parent device ‘/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2’:
KERNELS==“3-1.2”
SUBSYSTEMS==“usb”
DRIVERS==“usb”
ATTRS{bDeviceSubClass}==“00”
ATTRS{bDeviceProtocol}==“00”
ATTRS{devpath}==“1.2”
ATTRS{idVendor}==“0e8f”
ATTRS{speed}==“1.5”
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}==“1”
ATTRS{bMaxPacketSize0}==“8”
ATTRS{busnum}==“3”
ATTRS{devnum}==“7”
ATTRS{configuration}==""
ATTRS{bMaxPower}==“300mA”
ATTRS{authorized}==“1”
ATTRS{bmAttributes}==“80”
ATTRS{bNumConfigurations}==“1”
ATTRS{maxchild}==“0”
ATTRS{bcdDevice}==“0110”
ATTRS{avoid_reset_quirk}==“0”
ATTRS{quirks}==“0x0”
ATTRS{version}==" 1.10"
ATTRS{urbnum}==“13”
ATTRS{ltm_capable}==“no”
ATTRS{manufacturer}=="HuiJia "
ATTRS{removable}==“removable”
ATTRS{idProduct}==“1006” (or “3010” for the SS one)
ATTRS{bDeviceClass}==“00”
ATTRS{product}==“USB GamePad”
…
I thought writing an udev rule like this would work :
SUBSYSTEMS==“usb”, ATTRS{idVendor}==“0e8f”, ATTRS{idProduct}==“3010”, ATTRS{product}=“USB GamePad SS”
SUBSYSTEMS==“usb”, ATTRS{idVendor}==“0e8f”, ATTRS{idProduct}==“1006”, ATTRS{product}=“USB GamePad PS”
but no success. I know this is not exactly the right place to discuss about udev rules, but if someone was kind enough to point my mistake, i would be really happy.