From: Jonathan Cameron <jic23@kernel.org>
To: linux-iio@vger.kernel.org
Cc: device-drivers-devel@blackfin.uclinux.org, lars@metafoo.de,
ldewangan@nvidia.com, Jonathan Cameron <jic23@kernel.org>
Subject: [PATCH] staging:iio:isl29028 Add IIO_CHAN_INFO_RAW/PROCESSED entries
Date: Sun, 15 Apr 2012 12:41:57 +0100 [thread overview]
Message-ID: <1334490117-28009-1-git-send-email-jic23@kernel.org> (raw)
Precursor to making value read / write attribute optional.
This one stands along as it merged just before the series
doing all the other drivers.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
---
This driver crossed with review of these patches. To test
just apply it after the series
[PATCH 00/13 V2] IIO: Make the value attribute optional for channels
Fairly trivial case, but obviously I can't push out the removal
of the old code until this is in place. In the meantime I'll push
the rest of the conversion patches to Greg.
drivers/staging/iio/light/isl29028.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/iio/light/isl29028.c b/drivers/staging/iio/light/isl29028.c
index e705e45..5ef2d0d 100644
--- a/drivers/staging/iio/light/isl29028.c
+++ b/drivers/staging/iio/light/isl29028.c
@@ -330,7 +330,8 @@ static int isl29028_read_raw(struct iio_dev *indio_dev,
mutex_lock(&chip->lock);
switch (mask) {
- case 0:
+ case IIO_CHAN_INFO_RAW:
+ case IIO_CHAN_INFO_PROCESSED:
switch (chan->type) {
case IIO_LIGHT:
ret = isl29028_als_get(chip, val);
@@ -391,12 +392,15 @@ static const struct iio_chan_spec isl29028_channels[] = {
{
.type = IIO_LIGHT,
.processed_val = 1,
- .info_mask = IIO_CHAN_INFO_SCALE_SEPARATE_BIT,
+ .info_mask = IIO_CHAN_INFO_PROCESSED_SEPARATE_BIT |
+ IIO_CHAN_INFO_SCALE_SEPARATE_BIT,
}, {
.type = IIO_INTENSITY,
+ .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT,
}, {
.type = IIO_PROXIMITY,
- .info_mask = IIO_CHAN_INFO_SAMP_FREQ_SEPARATE_BIT,
+ .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT |
+ IIO_CHAN_INFO_SAMP_FREQ_SEPARATE_BIT,
}
};
--
1.7.9.4
next reply other threads:[~2012-04-15 11:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-15 11:41 Jonathan Cameron [this message]
2012-04-15 13:42 ` [PATCH] staging:iio:isl29028 Add IIO_CHAN_INFO_RAW/PROCESSED entries Jonathan Cameron
2012-04-15 15:31 ` Laxman Dewangan
2012-04-15 16:29 ` Jonathan Cameron
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=1334490117-28009-1-git-send-email-jic23@kernel.org \
--to=jic23@kernel.org \
--cc=device-drivers-devel@blackfin.uclinux.org \
--cc=lars@metafoo.de \
--cc=ldewangan@nvidia.com \
--cc=linux-iio@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;
as well as URLs for NNTP newsgroup(s).