From patchwork Thu Jun 17 11:29:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitriy Vasil'ev X-Patchwork-Id: 106667 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 o5HBTwJU024580 for ; Thu, 17 Jun 2010 11:29:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753510Ab0FQL35 (ORCPT ); Thu, 17 Jun 2010 07:29:57 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:48789 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752220Ab0FQL35 (ORCPT ); Thu, 17 Jun 2010 07:29:57 -0400 Received: by bwz7 with SMTP id 7so3362293bwz.19 for ; Thu, 17 Jun 2010 04:29:54 -0700 (PDT) Received: by 10.204.79.203 with SMTP id q11mr825401bkk.121.1276774194551; Thu, 17 Jun 2010 04:29:54 -0700 (PDT) Received: from tech ([93.153.226.186]) by mx.google.com with ESMTPS id z20sm33596527bkx.3.2010.06.17.04.29.53 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 17 Jun 2010 04:29:53 -0700 (PDT) Message-ID: From: "Dmitriy Vasil'ev" To: "Daniel Mack" Cc: References: <7A46ED6446BE4CF7AAC51205F1B5A88B@tech> <20100602132031.GB2695@buzzloop.caiaq.de> <20100602135251.GC2695@buzzloop.caiaq.de> <888FDE7800AB4E278ED6DF185FEDC869@tech> <20100617101021.GB17833@buzzloop.caiaq.de> <20100617112135.GC17833@buzzloop.caiaq.de> Subject: Re: rotary encoder Date: Thu, 17 Jun 2010 15:29:51 +0400 Organization: =?utf-8?B?0J7QkNCeICLQndCf0J8i0JTQuNCz0LjRgtC+0L0i?= MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 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]); Thu, 17 Jun 2010 11:29:58 +0000 (UTC) diff -ur linux-2.6.34/include/linux/rotary_encoder.h linux/include/linux/rotary_encoder.h --- linux-2.6.34/include/linux/rotary_encoder.h Mon May 17 01:17:36 2010 +++ linux/include/linux/rotary_encoder.h Thu Jun 17 14:23:26 2010 @@ -1,15 +1,28 @@ #ifndef __ROTARY_ENCODER_H__ #define __ROTARY_ENCODER_H__ +struct rotary_encoder_button { + /* Configuration parameters */ + u16 code; /* input event code (KEY_*, SW_*) */ + int gpio; + int active_low; + //char *desc; + u16 type; /* input event type (EV_KEY, EV_SW) */ + int debounce_interval; /* debounce ticks interval in msecs */ + bool rep;/* enable input subsystem auto repeat */ +}; + struct rotary_encoder_platform_data { unsigned int steps; - unsigned int axis; + u16 type; /*(EV_KEY, EV_REL, EV_ABS)*/ unsigned int gpio_a; unsigned int gpio_b; unsigned int inverted_a; unsigned int inverted_b; - bool relative_axis; + u16 codeleft; /*(REL_X, REL_Y, ABS_X, ABS_Y, KEY_...)*/ + u16 coderight; /*(REL_X, REL_Y, ABS_X, ABS_Y, KEY_...)*/ bool rollover; + struct rotary_encoder_button button; }; #endif /* __ROTARY_ENCODER_H__ */