Re: [PATCH] HID: sony: Enable Gasia third-party PS3 controllers

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

 



Hi,

On Sat, 7 Feb 2015 17:31:33 +0100
Antonio Ospite <ao2@xxxxxx> wrote:
> > > +#include <linux/usb/input.h>
> > 
> > Please don't.
> > HID should be transport agnostic, so please refrain from directly call usb.
> >
> 
> I agree with Benjamin here.
> 
> > > +
> > > +       ret = usb_interrupt_msg(dev, usb_sndintpipe(dev, 0x02),
> > > +                               buf2, sizeof(buf2),
> > > +                               &transfered, USB_CTRL_SET_TIMEOUT);
> > 
> > Can't you simply use a hid_hw_output_report request instead of hard
> > coding the device specific endpoint?
> > And I'd also prefer it to be guarded against your specific controller.
> > 
> 
> usb_interrupt_msg() is called in usbhid_output_report() indeed, so it
> should be possible to use the generic HID interface.

Regarding the USB. This is a comment from Andrew's patch:

// doesn't work. gets sent as a SET_REPORT Request intstead of a
// URB_INTERRUPT out. I guess usbhid->urbout is null
//if ( hdev->hid_output_raw_report(hdev, buf2, sizeof(buf2),

I took his word for it, and did not attempt it. Do you think it would
work with the current kernel? If so, I can test later. Had quite an
enjoyable evening playing some FF7 once I had the controller working ;)

Antonio, others, can you test with official Sony controllers that the
current patch did not break them? I only have the Gasia.

> > > +       if (ret < 0)
> > > +               hid_err(hdev, "can't set operational mode on the interrupt EP\n");
> 
> And adjust this message accordingly. Call it "step 3" perhaps?

Sure, will edit the error messages.

- Lauri
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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