From: Samu Onkalo <samu.p.onkalo@nokia.com>
To: eric.piel@tremplin-utc.net
Cc: linux-kernel@vger.kernel.org, Samu Onkalo <samu.p.onkalo@nokia.com>
Subject: [PATCH 1/2] LIS3LV02D: axis remap, irq and resource setup / release added to platform data
Date: Thu, 1 Oct 2009 13:06:30 +0300 [thread overview]
Message-ID: <1254391591-9696-2-git-send-email-samu.p.onkalo@nokia.com> (raw)
In-Reply-To: <1254391591-9696-1-git-send-email-samu.p.onkalo@nokia.com>
Adds axis remapping and second IRQ request to platform data.
Second IRQ request doesn't exists in all lis3xxx variants.
Setup and release functions added to support
platform specific operations.
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
---
drivers/hwmon/lis3lv02d.h | 1 +
include/linux/lis3lv02d.h | 13 +++++++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/drivers/hwmon/lis3lv02d.h b/drivers/hwmon/lis3lv02d.h
index 3e1ff46..b89f465 100644
--- a/drivers/hwmon/lis3lv02d.h
+++ b/drivers/hwmon/lis3lv02d.h
@@ -207,6 +207,7 @@ struct lis3lv02d {
struct axis_conversion ac; /* hw -> logical axis */
u32 irq; /* IRQ number */
+ u32 irq2; /* IRQ number (LIS302DL) */
struct fasync_struct *async_queue; /* queue for the misc device */
wait_queue_head_t misc_wait; /* Wait queue for the misc device */
unsigned long misc_opened; /* bit0: whether the device is open */
diff --git a/include/linux/lis3lv02d.h b/include/linux/lis3lv02d.h
index dbe0702..7ac1e56 100644
--- a/include/linux/lis3lv02d.h
+++ b/include/linux/lis3lv02d.h
@@ -43,6 +43,19 @@ struct lis3lv02d_platform_data {
#define LIS3_WAKEUP_Z_HI (1 << 5)
unsigned char wakeup_flags;
unsigned char wakeup_thresh;
+#define LIS3_NO_MAP 0
+#define LIS3_DEV_X 1
+#define LIS3_DEV_Y 2
+#define LIS3_DEV_Z 3
+#define LIS3_INV_DEV_X -1
+#define LIS3_INV_DEV_Y -2
+#define LIS3_INV_DEV_Z -3
+ s8 axis_x;
+ s8 axis_y;
+ s8 axis_z;
+ u32 irq2;
+ int (*setup_resources)(void);
+ int (*release_resources)(void);
};
#endif /* __LIS3LV02D_H_ */
--
1.5.6.3
next prev parent reply other threads:[~2009-10-01 10:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-01 10:06 [RFC][PATCH 0/2] LIS3LV02D I2C driver Samu Onkalo
2009-10-01 10:06 ` Samu Onkalo [this message]
2009-10-01 10:06 ` [PATCH 2/2] LIS3LV02D: I2C support Samu Onkalo
2009-10-02 8:20 ` Éric Piel
2009-10-07 16:31 ` [RFC][PATCH 0/2] LIS3LV02D I2C driver Jonathan Cameron
2009-10-07 17:01 ` Éric Piel
2009-10-07 17:20 ` Jonathan Cameron
2009-10-07 17:26 ` Éric Piel
2009-10-13 10:13 ` Onkalo Samu
2009-10-13 10:20 ` Trisal, Kalhan
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=1254391591-9696-2-git-send-email-samu.p.onkalo@nokia.com \
--to=samu.p.onkalo@nokia.com \
--cc=eric.piel@tremplin-utc.net \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®