From: Martin Kepplinger <martink@posteo.de>
To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de,
pmeerw@pmeerw.net, christoph.muellner@theobroma-systems.com,
mfuzzey@parkeon.com
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
Martin Kepplinger <martink@posteo.de>,
Martin Kepplinger <martin.kepplinger@theobroma-systems.com>
Subject: [PATCH 2/3] iio: mma8452: use enum for numbering the axis
Date: Wed, 11 Nov 2015 19:38:13 +0100 [thread overview]
Message-ID: <1447267094-2248-2-git-send-email-martink@posteo.de> (raw)
In-Reply-To: <1447267094-2248-1-git-send-email-martink@posteo.de>
Use the newly added enum that numbers x, y and z axis.
Signed-off-by: Martin Kepplinger <martin.kepplinger@theobroma-systems.com>
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
---
drivers/iio/accel/mma8452.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
index dedcc1d..38652e1 100644
--- a/drivers/iio/accel/mma8452.c
+++ b/drivers/iio/accel/mma8452.c
@@ -912,30 +912,30 @@ static struct attribute_group mma8452_event_attribute_group = {
}
static const struct iio_chan_spec mma8452_channels[] = {
- MMA8452_CHANNEL(X, 0, 12),
- MMA8452_CHANNEL(Y, 1, 12),
- MMA8452_CHANNEL(Z, 2, 12),
+ MMA8452_CHANNEL(X, axis_x, 12),
+ MMA8452_CHANNEL(Y, axis_y, 12),
+ MMA8452_CHANNEL(Z, axis_z, 12),
IIO_CHAN_SOFT_TIMESTAMP(3),
};
static const struct iio_chan_spec mma8453_channels[] = {
- MMA8452_CHANNEL(X, 0, 10),
- MMA8452_CHANNEL(Y, 1, 10),
- MMA8452_CHANNEL(Z, 2, 10),
+ MMA8452_CHANNEL(X, axis_x, 10),
+ MMA8452_CHANNEL(Y, axis_y, 10),
+ MMA8452_CHANNEL(Z, axis_z, 10),
IIO_CHAN_SOFT_TIMESTAMP(3),
};
static const struct iio_chan_spec mma8652_channels[] = {
- MMA8652_CHANNEL(X, 0, 12),
- MMA8652_CHANNEL(Y, 1, 12),
- MMA8652_CHANNEL(Z, 2, 12),
+ MMA8652_CHANNEL(X, axis_x, 12),
+ MMA8652_CHANNEL(Y, axis_y, 12),
+ MMA8652_CHANNEL(Z, axis_z, 12),
IIO_CHAN_SOFT_TIMESTAMP(3),
};
static const struct iio_chan_spec mma8653_channels[] = {
- MMA8652_CHANNEL(X, 0, 10),
- MMA8652_CHANNEL(Y, 1, 10),
- MMA8652_CHANNEL(Z, 2, 10),
+ MMA8652_CHANNEL(X, axis_x, 10),
+ MMA8652_CHANNEL(Y, axis_y, 10),
+ MMA8652_CHANNEL(Z, axis_z, 10),
IIO_CHAN_SOFT_TIMESTAMP(3),
};
--
2.1.4
next prev parent reply other threads:[~2015-11-11 18:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-11 18:38 [PATCH 1/3] iio: mma8452: add freefall detection for Freescale's accelerometers Martin Kepplinger
2015-11-11 18:38 ` Martin Kepplinger [this message]
2015-11-11 18:38 ` [PATCH 3/3] iio: mma8452: remove unused register description Martin Kepplinger
2015-11-11 19:08 ` [PATCH 1/3] iio: mma8452: add freefall detection for Freescale's accelerometers Lars-Peter Clausen
2015-11-12 15:00 ` Martin Kepplinger
2015-11-14 18:03 ` Jonathan Cameron
2015-11-14 18:45 ` Martin Kepplinger
2015-11-14 19:03 ` Jonathan Cameron
2015-11-17 19:24 ` Martin Kepplinger
2015-11-24 5:20 ` Martin Kepplinger
2015-11-24 9:45 ` Lars-Peter Clausen
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=1447267094-2248-2-git-send-email-martink@posteo.de \
--to=martink@posteo.de \
--cc=christoph.muellner@theobroma-systems.com \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.kepplinger@theobroma-systems.com \
--cc=mfuzzey@parkeon.com \
--cc=pmeerw@pmeerw.net \
/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