linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Barry Song <21cnbao@gmail.com>
To: dbrownell@users.sourceforge.net, dmitry.torokhov@gmail.com, dtor@mail.ru
Cc: spi-devel-general@lists.sourceforge.net,
	linux-input@vger.kernel.org,
	uclinux-dist-devel@blackfin.uclinux.org,
	Barry Song <21cnbao@gmail.com>
Subject: [PATCH 1/2] add ad714x platform_data definition
Date: Tue, 1 Sep 2009 11:55:29 +0800	[thread overview]
Message-ID: <1251777330-16994-2-git-send-email-21cnbao@gmail.com> (raw)
In-Reply-To: <1251777330-16994-1-git-send-email-21cnbao@gmail.com>

AD714x is very flexible, it can be used as buttons, scrollwheel,
slider, touchpad at the same time. That depends on the boards.
The platform_data for the device's "struct device" holds these
information.
The data-struct defined in this file descript the hardware feature
of button/scrollwheel/slider/touchpad components on target boards,
which need be filled in the arch/mach-/.

Signed-off-by: Barry Song <21cnbao@gmail.com>
---
 include/linux/spi/ad714x.h |   60 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 60 insertions(+), 0 deletions(-)
 create mode 100644 include/linux/spi/ad714x.h

diff --git a/include/linux/spi/ad714x.h b/include/linux/spi/ad714x.h
new file mode 100644
index 0000000..f6439a9
--- /dev/null
+++ b/include/linux/spi/ad714x.h
@@ -0,0 +1,60 @@
+/*
+ * include/linux/ad714x.h
+ *
+ * AD714x is very flexible, it can be used as buttons, scrollwheel,
+ * slider, touchpad at the same time. That depends on the boards.
+ * The platform_data for the device's "struct device" holds this
+ * information.
+ */
+
+
+#ifndef AD714X_HW_H
+#define AD714X_HW_H
+
+#define STAGE_NUM              12
+#define STAGE_CFGREG_NUM       8
+#define SYS_CFGREG_NUM         8
+
+/* board information which need be initialized in arch/mach... */
+struct ad714x_slider_plat {
+	int start_stage;
+	int end_stage;
+	int max_coord;
+};
+
+struct ad714x_wheel_plat {
+	int start_stage;
+	int end_stage;
+	int max_coord;
+};
+
+struct ad714x_touchpad_plat {
+	int x_start_stage;
+	int x_end_stage;
+	int x_max_coord;
+
+	int y_start_stage;
+	int y_end_stage;
+	int y_max_coord;
+};
+
+struct ad714x_button_plat {
+	int keycode;
+	unsigned short l_mask;
+	unsigned short h_mask;
+};
+
+struct ad714x_platform_data {
+	int slider_num;
+	int wheel_num;
+	int touchpad_num;
+	int button_num;
+	struct ad714x_slider_plat *slider;
+	struct ad714x_wheel_plat *wheel;
+	struct ad714x_touchpad_plat *touchpad;
+	struct ad714x_button_plat *button;
+	unsigned short stage_cfg_reg[STAGE_NUM][STAGE_CFGREG_NUM];
+	unsigned short sys_cfg_reg[SYS_CFGREG_NUM];
+};
+
+#endif
-- 
1.5.6.3


  reply	other threads:[~2009-09-01  3:55 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-01  3:55 [PATCH 0/2] add ad714x captouch sensor input driver Barry Song
2009-09-01  3:55 ` Barry Song [this message]
2009-09-01  3:55   ` [PATCH 2/2] add ad714x input driver for button/scrollwhell/slider/touchpad Barry Song
     [not found]     ` <1251777330-16994-3-git-send-email-21cnbao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-09-01 19:30       ` Mike Frysinger
     [not found]         ` <8bd0f97a0909011230r50cb532ep46db64d65cbb49e5-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-09-02  2:04           ` [Uclinux-dist-devel] " David Brownell
2009-09-02  2:46         ` [Uclinux-dist-devel] [PATCH 2/2] add ad714x input driver forbutton/scrollwhell/slider/touchpad Song, Barry
2009-09-02  3:09           ` Mike Frysinger
2009-09-02  3:17             ` Song, Barry
2009-09-02  9:50               ` [Uclinux-dist-devel] [PATCH 2/2] add ad714x input driverforbutton/scrollwhell/slider/touchpad Robin Getz
2009-09-02  9:48                 ` Mike Frysinger
     [not found]           ` <0F1B54C89D5F954D8535DB252AF412FA04A5CADA-SGdA1W8gREmuVPpjEGsWsTcYPEmu4y7e@public.gmane.org>
2009-09-02  4:31             ` [Uclinux-dist-devel] [PATCH 2/2] add ad714x input driver forbutton/scrollwhell/slider/touchpad David Brownell
2009-09-02  7:51               ` Barry Song
2009-09-02  8:37                 ` Song, Barry
2009-09-02  8:41                 ` David Brownell
2009-09-02  1:51       ` [PATCH 2/2] add ad714x input driver for button/scrollwhell/slider/touchpad David Brownell
2009-09-02  6:26         ` [Uclinux-dist-devel] [PATCH 2/2] add ad714x input driver forbutton/scrollwhell/slider/touchpad Song, Barry
2009-09-08  6:34     ` [PATCH 2/2] add ad714x input driver for button/scrollwhell/slider/touchpad Dmitry Torokhov
2009-09-08  6:48       ` [Uclinux-dist-devel] [PATCH 2/2] add ad714x input driverfor button/scrollwhell/slider/touchpad Song, Barry
2009-09-01 18:41   ` [Uclinux-dist-devel] [PATCH 1/2] add ad714x platform_data definition Mike Frysinger
2009-09-02  2:09     ` [Uclinux-dist-devel] [PATCH 1/2] add ad714x platform_datadefinition Song, Barry
     [not found]   ` <1251777330-16994-2-git-send-email-21cnbao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-09-02  1:57     ` [PATCH 1/2] add ad714x platform_data definition David Brownell
2009-09-02  4:47       ` [Uclinux-dist-devel] [PATCH 1/2] add ad714x platform_datadefinition Song, Barry
     [not found]         ` <0F1B54C89D5F954D8535DB252AF412FA04A96A41-SGdA1W8gREmuVPpjEGsWsTcYPEmu4y7e@public.gmane.org>
2009-09-02  5:14           ` David Brownell
2009-09-02  5:24             ` [Uclinux-dist-devel] " Song, Barry
2009-09-02 12:16       ` [spi-devel-general] [PATCH 1/2] add ad714x platform_data definition Bill Gatliff
2009-09-01 18:46 ` [Uclinux-dist-devel] [PATCH 0/2] add ad714x captouch sensor input driver Mike Frysinger
     [not found]   ` <8bd0f97a0909011146t210cbacbx6b0fa323242ac3d3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-09-02  1:52     ` David Brownell
2009-09-02  2:08   ` [Uclinux-dist-devel] [PATCH 0/2] add ad714x captouch sensorinput driver Song, Barry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1251777330-16994-2-git-send-email-21cnbao@gmail.com \
    --to=21cnbao@gmail.com \
    --cc=dbrownell@users.sourceforge.net \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dtor@mail.ru \
    --cc=linux-input@vger.kernel.org \
    --cc=spi-devel-general@lists.sourceforge.net \
    --cc=uclinux-dist-devel@blackfin.uclinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).