From patchwork Tue May 5 21:24:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Machek X-Patchwork-Id: 6343851 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8C98BBEEE1 for ; Tue, 5 May 2015 21:24:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B391F2021B for ; Tue, 5 May 2015 21:24:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BA8A220115 for ; Tue, 5 May 2015 21:24:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1945969AbbEEVYJ (ORCPT ); Tue, 5 May 2015 17:24:09 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:57130 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1945943AbbEEVYI (ORCPT ); Tue, 5 May 2015 17:24:08 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 6DAC881F83; Tue, 5 May 2015 23:24:07 +0200 (CEST) Date: Tue, 5 May 2015 23:24:06 +0200 From: Pavel Machek To: Frank Praznik Cc: linux-input@vger.kernel.org, jkosina@suse.cz Subject: Re: [PATCH 2/5] hid: sony: Add support for the Sony Motion Controller Message-ID: <20150505212406.GA15218@amd> References: <1430793272-11545-1-git-send-email-frank.praznik@oh.rr.com> <1430793272-11545-3-git-send-email-frank.praznik@oh.rr.com> <20150505211640.GA10272@amd> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150505211640.GA10272@amd> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue 2015-05-05 23:16:40, Pavel Machek wrote: > Hi! > > > Add a fixed-up HID descriptor for the Sony motion controller and enable > > controls for the LED light as well as force-feedback. > > > > The LED is multi-colored (red, green, blue) and has a 'global' control to > > allow it to be flashed or switched on an off atomically. Oh... I don't think the global control at this level is good idea. Let me test how it works, but assigning different triggers to global and red would be interesting, for example. > > The motion controller has a single rumble motor so the higher of the left and > > right values is used to set the speed. > > > > Signed-off-by: Pavel Machek > > Signed-off-by: Frank Praznik > > --- > > > > Pavel, can you please test this and make sure it works? > > I tried (on 4.1-rc2), and got this (full dmesg in attachment) Ok, that one was easy. Now it registers but the LEDs do not light. Pavel diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index 46e4ceb..09a8328 100644 --- a/drivers/hid/hid-sony.c +++ b/drivers/hid/hid-sony.c @@ -1770,7 +1770,7 @@ static int sony_allocate_output_report(struct sony_sc *sc) sc->output_report_dmabuf = kmalloc(DS4_REPORT_0x05_SIZE, GFP_KERNEL); else if (sc->quirks & MOTION_CONTROLLER) - kmalloc(sizeof(struct motion_output_report_02), + sc->output_report_dmabuf = kmalloc(sizeof(struct motion_output_report_02), GFP_KERNEL); else return 0;