From: Brian Masney <masneyb@onstation.org>
To: jic23@kernel.org, linux-iio@vger.kernel.org
Cc: devel@driverdev.osuosl.org, lars@metafoo.de,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
Jon.Brenner@ams.com, pmeerw@pmeerw.net, knaack.h@gmx.de
Subject: [PATCH 2/4] staging: iio: tsl2x7x: move IIO_CHAN_INFO_CALIB{SCALE, BIAS} to IIO_LIGHT channel
Date: Sat, 24 Mar 2018 16:05:53 -0400 [thread overview]
Message-ID: <20180324200555.1403-3-masneyb@onstation.org> (raw)
In-Reply-To: <20180324200555.1403-1-masneyb@onstation.org>
The IIO_CHAN_INFO_CALIBSCALE and IIO_CHAN_INFO_CALIBBIAS masks are
currently associated with the IIO_INTENSITY channel but should be
associated with the IIO_LIGHT channel since these values are used to
calculate the lux. Directory listing of the sysfs attributes for a
TSL2772 with this patch applied:
dev
events
in_illuminance0_calibbias
in_illuminance0_calibrate
in_illuminance0_calibscale
in_illuminance0_calibscale_available
in_illuminance0_input
in_illuminance0_integration_time
in_illuminance0_integration_time_available
in_illuminance0_lux_table
in_illuminance0_target_input
in_intensity0_raw
in_intensity1_raw
in_proximity0_calibrate
in_proximity0_calibscale
in_proximity0_calibscale_available
in_proximity0_raw
name
of_node
power
subsystem
uevent
Signed-off-by: Brian Masney <masneyb@onstation.org>
---
drivers/staging/iio/light/tsl2x7x.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light/tsl2x7x.c
index 8530bccdb317..d5a237fb0a0b 100644
--- a/drivers/staging/iio/light/tsl2x7x.c
+++ b/drivers/staging/iio/light/tsl2x7x.c
@@ -1491,14 +1491,14 @@ static const struct tsl2x7x_chip_info tsl2x7x_chip_info_tbl[] = {
.indexed = 1,
.channel = 0,
.info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED) |
- BIT(IIO_CHAN_INFO_INT_TIME),
+ BIT(IIO_CHAN_INFO_INT_TIME) |
+ BIT(IIO_CHAN_INFO_CALIBSCALE) |
+ BIT(IIO_CHAN_INFO_CALIBBIAS),
}, {
.type = IIO_INTENSITY,
.indexed = 1,
.channel = 0,
- .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |
- BIT(IIO_CHAN_INFO_CALIBSCALE) |
- BIT(IIO_CHAN_INFO_CALIBBIAS),
+ .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
.event_spec = tsl2x7x_events,
.num_event_specs = ARRAY_SIZE(tsl2x7x_events),
}, {
@@ -1531,14 +1531,14 @@ static const struct tsl2x7x_chip_info tsl2x7x_chip_info_tbl[] = {
.indexed = 1,
.channel = 0,
.info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED) |
- BIT(IIO_CHAN_INFO_INT_TIME),
+ BIT(IIO_CHAN_INFO_INT_TIME) |
+ BIT(IIO_CHAN_INFO_CALIBSCALE) |
+ BIT(IIO_CHAN_INFO_CALIBBIAS),
}, {
.type = IIO_INTENSITY,
.indexed = 1,
.channel = 0,
- .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |
- BIT(IIO_CHAN_INFO_CALIBSCALE) |
- BIT(IIO_CHAN_INFO_CALIBBIAS),
+ .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
.event_spec = tsl2x7x_events,
.num_event_specs = ARRAY_SIZE(tsl2x7x_events),
}, {
@@ -1580,14 +1580,14 @@ static const struct tsl2x7x_chip_info tsl2x7x_chip_info_tbl[] = {
.indexed = 1,
.channel = 0,
.info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED) |
- BIT(IIO_CHAN_INFO_INT_TIME),
+ BIT(IIO_CHAN_INFO_INT_TIME) |
+ BIT(IIO_CHAN_INFO_CALIBSCALE) |
+ BIT(IIO_CHAN_INFO_CALIBBIAS),
}, {
.type = IIO_INTENSITY,
.indexed = 1,
.channel = 0,
- .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |
- BIT(IIO_CHAN_INFO_CALIBSCALE) |
- BIT(IIO_CHAN_INFO_CALIBBIAS),
+ .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
.event_spec = tsl2x7x_events,
.num_event_specs = ARRAY_SIZE(tsl2x7x_events),
}, {
--
2.14.3
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
next prev parent reply other threads:[~2018-03-24 20:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-24 20:05 [PATCH 0/4] staging: iio: tsl2x7x: move out of staging Brian Masney
2018-03-24 20:05 ` [PATCH 1/4] staging: iio: tsl2x7x: use auto increment I2C protocol Brian Masney
2018-03-25 17:09 ` Jonathan Cameron
2018-03-24 20:05 ` Brian Masney [this message]
2018-03-25 17:17 ` [PATCH 2/4] staging: iio: tsl2x7x: move IIO_CHAN_INFO_CALIB{SCALE,BIAS} to IIO_LIGHT channel Jonathan Cameron
2018-03-24 20:05 ` [PATCH 3/4] staging: iio: tsl2x7x: use either direction for IIO_EV_INFO_{ENABLE, PERIOD} Brian Masney
2018-03-25 17:19 ` [PATCH 3/4] staging: iio: tsl2x7x: use either direction for IIO_EV_INFO_{ENABLE,PERIOD} Jonathan Cameron
2018-03-24 20:05 ` [PATCH 4/4] staging: iio: tsl2x7x: move out of staging Brian Masney
2018-03-25 18:04 ` 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=20180324200555.1403-3-masneyb@onstation.org \
--to=masneyb@onstation.org \
--cc=Jon.Brenner@ams.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--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=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
all inboxes | Powered by JetHome®