From patchwork Sat Apr 3 23:13:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Fritz X-Patchwork-Id: 90553 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o33N9A9Q016978 for ; Sat, 3 Apr 2010 23:09:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752342Ab0DCXJC (ORCPT ); Sat, 3 Apr 2010 19:09:02 -0400 Received: from mail-fx0-f223.google.com ([209.85.220.223]:42836 "EHLO mail-fx0-f223.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752686Ab0DCXJB (ORCPT ); Sat, 3 Apr 2010 19:09:01 -0400 Received: by fxm23 with SMTP id 23so2155981fxm.21 for ; Sat, 03 Apr 2010 16:08:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=wQlj6mqA+6IjcGon3oz0fTCGapbCpxm1tFZMXCx7l9Q=; b=B2FtHjqxyI/wZp4UuSYBOIexkTwDM9pExJA/7z+o4hp7r6NUambOZ25vTT+uIX7ErN IX3SH2JNrmBBjHZ3lXYgrdZXyMmaYuP0wImmHB24zldbgqjizpP9Ixs2vcVp4gs7/bDL ego82lOlWMabt8TsYoaBCfwc4G125GP/CLnFw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=WlJs3CfhIvqph1TZV4aYgWnJyxnrl3VG8WOS02zctxEiRR7rqyrGN99tAGssAzS+Rf rb+NahJGjunS943GBP8OAy9QaS1a3YobfXs7QXnMfK6M0UcLlFhXuO3BQ9FHXKA+VUOf 7GU/1L2/6J3DFwhVJMfIQNqCMYssif6QCWkdE= Received: by 10.87.74.6 with SMTP id b6mr445684fgl.58.1270336138681; Sat, 03 Apr 2010 16:08:58 -0700 (PDT) Received: from [192.168.1.4] (p3EE04661.dip.t-dialin.net [62.224.70.97]) by mx.google.com with ESMTPS id d4sm8012886fga.20.2010.04.03.16.08.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 03 Apr 2010 16:08:58 -0700 (PDT) Subject: [PATCH 1/2] also allow joysticks with buttons only From: Christoph Fritz To: linux-input@vger.kernel.org Cc: Dmitry Torokhov , Dominic Cerquetti , Jan Kratochvil Date: Sun, 04 Apr 2010 01:13:53 +0200 Message-Id: <1270336433.4282.3.camel@lovely> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 03 Apr 2010 23:09:11 +0000 (UTC) diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index c52bec4..423e0e6 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c @@ -929,6 +929,24 @@ static const struct input_device_id joydev_ids[] = { .evbit = { BIT_MASK(EV_ABS) }, .absbit = { BIT_MASK(ABS_THROTTLE) }, }, + { + .flags = INPUT_DEVICE_ID_MATCH_EVBIT | + INPUT_DEVICE_ID_MATCH_KEYBIT, + .evbit = { BIT_MASK(EV_KEY) }, + .keybit = {[BIT_WORD(BTN_JOYSTICK)] = BIT_MASK(BTN_JOYSTICK) }, + }, + { + .flags = INPUT_DEVICE_ID_MATCH_EVBIT | + INPUT_DEVICE_ID_MATCH_KEYBIT, + .evbit = { BIT_MASK(EV_KEY) }, + .keybit = { [BIT_WORD(BTN_GAMEPAD)] = BIT_MASK(BTN_GAMEPAD) }, + }, + { + .flags = INPUT_DEVICE_ID_MATCH_EVBIT | + INPUT_DEVICE_ID_MATCH_KEYBIT, + .evbit = { BIT_MASK(EV_KEY) }, + .keybit = { [BIT_WORD(BTN_TRIGGER_HAPPY)] = BIT_MASK(BTN_TRIGGER_HAPPY) }, + }, { } /* Terminating entry */ };