Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752794AbZKWRFu (ORCPT ); Mon, 23 Nov 2009 12:05:50 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752672AbZKWRFt (ORCPT ); Mon, 23 Nov 2009 12:05:49 -0500 Received: from mail-yw0-f182.google.com ([209.85.211.182]:56706 "EHLO mail-yw0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752636AbZKWRFr (ORCPT ); Mon, 23 Nov 2009 12:05:47 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=E90wTXog9DWv69I/SU5KBo/Hx2pwrSMVW8A3zXzJhetDQSpnWSz90/40k+8swK6UrW 1iXsfy26Ui5LdX/8F7v39y3cSH+9ak2oozcQx1+X0ovbOv+DCJnow7IZW8l0phqt7p95 7DmMutbVagDOqtqRqeK57VV9q7uHkx9JMN8o8= MIME-Version: 1.0 In-Reply-To: <829197380911230720k233c3c86t659180d1413aa0dd@mail.gmail.com> References: <200910200956.33391.jarod@redhat.com> <200910200958.50574.jarod@redhat.com> <4B0A765F.7010204@redhat.com> <4B0A81BF.4090203@redhat.com> <829197380911230720k233c3c86t659180d1413aa0dd@mail.gmail.com> Date: Mon, 23 Nov 2009 17:05:53 +0000 X-Google-Sender-Auth: 4bf56259ac8ed55d Message-ID: Subject: Re: [RFC] Should we create a raw input interface for IR's ? - Was: Re: [PATCH 1/3 v2] lirc core device driver infrastructure From: James Mastros To: Devin Heitmueller Cc: Krzysztof Halasa , Mauro Carvalho Chehab , Jarod Wilson , Dmitry Torokhov , linux-kernel@vger.kernel.org, Mario Limonciello , linux-input@vger.kernel.org, linux-media@vger.kernel.org, Janne Grunau , Christoph Bartelmus Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2127 Lines: 38 2009/11/23 Devin Heitmueller : > Just bear in mind that with the current in-kernel code, users do *not > * have to manually select the RC code to use if they are using the > default remote that shipped with the product. This could still happen, if LIRC checks the identifiers of the reciving device, and has a database that tells it mappings between those devices and the remote controls that shipped with them. However, it occours to me that the IR circumstances map pretty well to what happens with ps/2 and serial devices now: 1: There are a variety of drivers for serio computer-side hardware, each of which speaks the serio interface to the next-higher level. These corrospond to the drivers for IR recievers. 2: There's a raw serio interface, for those wishing to do strange things. 3: There's also a variety of things that take data, using the kernel serio API, and decode it into input events -- the ps2 keyboard driver, the basic mouse driver, the advanced mice drivers. This is where the interface falls down a little bit -- the ps2 keyboard driver is the closest analogue to what I'm suggesting. The ps2 keyboard driver creates scancode events, which map nicely to what the keyboard is sending -- these are, for ex, rc5 codes. It will also produce key-up/key-down events, if it has a keymap loaded. (This is the difference with a ps2 keyboard -- a ps2 keyboard gets a map assigned to it at boottime, so it works out-of-box. This isn't really possible with an IR remote -- though perhaps rc5 is standarized enough, I don't think other protocols neccessarly are.) Userspace would have to load a keymap; those don't really belong in kernel code. Of course, userspace could look at the device identifiers to pick a reasonable default keymap if it's not configured to load another, solving the out-of-box experince. -=- James Mastros -- 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/