From patchwork Tue Jun 29 15:06:24 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: 108687 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o5TFHBFd026855 for ; Tue, 29 Jun 2010 16:05:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756476Ab0F2PGd (ORCPT ); Tue, 29 Jun 2010 11:06:33 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:39691 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756457Ab0F2PGb (ORCPT ); Tue, 29 Jun 2010 11:06:31 -0400 Received: by bwz1 with SMTP id 1so765453bwz.19 for ; Tue, 29 Jun 2010 08:06:29 -0700 (PDT) Received: by 10.204.81.144 with SMTP id x16mr4801250bkk.55.1277823988620; Tue, 29 Jun 2010 08:06:28 -0700 (PDT) Received: from tech ([93.153.226.186]) by mx.google.com with ESMTPS id by5sm3026433bkb.20.2010.06.29.08.06.25 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 29 Jun 2010 08:06:27 -0700 (PDT) Message-ID: <6F142F21F5134B03BDACDD706E7BCA3C@tech> From: "Dmitriy Vasil'ev" To: "Daniel Mack" Cc: References: <20100602135251.GC2695@buzzloop.caiaq.de> <888FDE7800AB4E278ED6DF185FEDC869@tech> <20100617101021.GB17833@buzzloop.caiaq.de> <20100617112135.GC17833@buzzloop.caiaq.de> <20100617113725.GD17833@buzzloop.caiaq.de> <1E284238E08046EFA4038129CEA2527F@tech> <20100617120005.GF17833@buzzloop.caiaq.de> <20100628182225.GB7427@core.coreip.homeip.net> <20100628183229.GI2698@buzzloop.caiaq.de> Subject: Re: rotary encoder Date: Tue, 29 Jun 2010 19:06:24 +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]); Tue, 29 Jun 2010 16:05:50 +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__ */