Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758681AbbBGVps (ORCPT ); Sat, 7 Feb 2015 16:45:48 -0500 Received: from mout.gmx.net ([212.227.17.21]:58426 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756016AbbBGVpr (ORCPT ); Sat, 7 Feb 2015 16:45:47 -0500 Date: Sat, 7 Feb 2015 23:48:01 +0200 From: Lauri Kasanen To: Antonio Ospite Cc: linux-input@vger.kernel.org, Jiri Kosina , "linux-kernel@vger.kernel.org" , AndrewD207@aol.com, benjamin.tissoires@gmail.com Subject: Re: [PATCH] HID: sony: Enable Gasia third-party PS3 controllers Message-Id: <20150207234801.262dbe4f.cand@gmx.com> In-Reply-To: <20150207173133.0eda1917cbb26834f1885aa9@ao2.it> References: <20150207154859.89a7e4e3.cand@gmx.com> <20150207173133.0eda1917cbb26834f1885aa9@ao2.it> X-Mailer: Sylpheed 3.1.4 (GTK+ 2.18.6; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:YMOzsJMVtTyoO+mc2xvikiaPLp1TAiKUbUb3ZHnRLpY54RNWBuu wVnETXhRAm+y9w57UnsSyTelIikZiSGB/RiUBJ/4XGNi3lbdMcIEKblPwK9rOhSNDlK8SUU eMB68ECrwqly/vwjvpM6f4+/EKVHsC/UT2vH/eOTrD+56Xg/TGNCqKlFJSvYJjTEk+nuIhd PsATDg9Zug+22/vSzXltw== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1845 Lines: 51 Hi, On Sat, 7 Feb 2015 17:31:33 +0100 Antonio Ospite wrote: > > > +#include > > > > 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-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/