From: Jonathan Cameron <jic23@kernel.org>
To: Gregor Boirie <gregor.boirie@parrot.com>, linux-iio@vger.kernel.org
Cc: Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Denis Ciocca <denis.ciocca@st.com>,
Linus Walleij <linus.walleij@linaro.org>,
Giuseppe Barba <giuseppe.barba@st.com>
Subject: Re: [RFC PATCH v1 6/9] iio:st_pressure: temperature triggered buffering
Date: Sun, 24 Apr 2016 11:58:58 +0100 [thread overview]
Message-ID: <940bb299-878f-0799-1b04-c241ae165127@kernel.org> (raw)
In-Reply-To: <daed8183e0916a573de8e40f166bdd8fb364395d.1461056711.git.gregor.boirie@parrot.com>
On 19/04/16 10:18, Gregor Boirie wrote:
> Enable support for triggered buffering of temperature samples.
>
> Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com>
I was a little curious as to why this wasn't done previously!
Anyhow, again ideally would like an Ack from Denis.
Jonathan
> ---
> drivers/iio/pressure/st_pressure_core.c | 20 +++++++++-----------
> 1 file changed, 9 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/iio/pressure/st_pressure_core.c b/drivers/iio/pressure/st_pressure_core.c
> index 13f1c2d..bacdf6c 100644
> --- a/drivers/iio/pressure/st_pressure_core.c
> +++ b/drivers/iio/pressure/st_pressure_core.c
> @@ -39,8 +39,6 @@
> #define ST_PRESS_LSB_PER_CELSIUS 480UL
> #define ST_PRESS_MILLI_CELSIUS_OFFSET 42500UL
>
> -#define ST_PRESS_NUMBER_DATA_CHANNELS 1
> -
> /* FULLSCALE */
> #define ST_PRESS_FS_AVL_1100MB 1100
> #define ST_PRESS_FS_AVL_1260MB 1260
> @@ -163,7 +161,7 @@ static const struct iio_chan_spec st_press_1_channels[] = {
> .type = IIO_PRESSURE,
> .channel2 = IIO_NO_MOD,
> .address = ST_PRESS_1_OUT_XL_ADDR,
> - .scan_index = ST_SENSORS_SCAN_X,
> + .scan_index = 0,
> .scan_type = {
> .sign = 'u',
> .realbits = 24,
> @@ -178,7 +176,7 @@ static const struct iio_chan_spec st_press_1_channels[] = {
> .type = IIO_TEMP,
> .channel2 = IIO_NO_MOD,
> .address = ST_TEMP_1_OUT_L_ADDR,
> - .scan_index = -1,
> + .scan_index = 1,
> .scan_type = {
> .sign = 'u',
> .realbits = 16,
> @@ -191,7 +189,7 @@ static const struct iio_chan_spec st_press_1_channels[] = {
> BIT(IIO_CHAN_INFO_OFFSET),
> .modified = 0,
> },
> - IIO_CHAN_SOFT_TIMESTAMP(1)
> + IIO_CHAN_SOFT_TIMESTAMP(2)
> };
>
> static const struct iio_chan_spec st_press_lps001wp_channels[] = {
> @@ -199,7 +197,7 @@ static const struct iio_chan_spec st_press_lps001wp_channels[] = {
> .type = IIO_PRESSURE,
> .channel2 = IIO_NO_MOD,
> .address = ST_PRESS_LPS001WP_OUT_L_ADDR,
> - .scan_index = ST_SENSORS_SCAN_X,
> + .scan_index = 0,
> .scan_type = {
> .sign = 'u',
> .realbits = 16,
> @@ -215,7 +213,7 @@ static const struct iio_chan_spec st_press_lps001wp_channels[] = {
> .type = IIO_TEMP,
> .channel2 = IIO_NO_MOD,
> .address = ST_TEMP_LPS001WP_OUT_L_ADDR,
> - .scan_index = -1,
> + .scan_index = 1,
> .scan_type = {
> .sign = 'u',
> .realbits = 16,
> @@ -227,7 +225,7 @@ static const struct iio_chan_spec st_press_lps001wp_channels[] = {
> BIT(IIO_CHAN_INFO_SCALE),
> .modified = 0,
> },
> - IIO_CHAN_SOFT_TIMESTAMP(1)
> + IIO_CHAN_SOFT_TIMESTAMP(2)
> };
>
> static const struct iio_chan_spec st_press_lps22hb_channels[] = {
> @@ -252,7 +250,7 @@ static const struct iio_chan_spec st_press_lps22hb_channels[] = {
> .type = IIO_TEMP,
> .channel2 = IIO_NO_MOD,
> .address = ST_TEMP_1_OUT_L_ADDR,
> - .scan_index = -1,
> + .scan_index = 1,
> .scan_type = {
> .sign = 'u',
> .realbits = 16,
> @@ -265,7 +263,7 @@ static const struct iio_chan_spec st_press_lps22hb_channels[] = {
> .info_mask_shared_by_all = BIT(IIO_CHAN_INFO_SAMP_FREQ),
> .modified = 0,
> },
> - IIO_CHAN_SOFT_TIMESTAMP(1)
> + IIO_CHAN_SOFT_TIMESTAMP(2)
> };
>
> static const struct st_sensor_settings st_press_sensors_settings[] = {
> @@ -598,7 +596,7 @@ int st_press_common_probe(struct iio_dev *indio_dev)
> if (err < 0)
> return err;
>
> - press_data->num_data_channels = ST_PRESS_NUMBER_DATA_CHANNELS;
> + press_data->num_data_channels = press_data->sensor_settings->num_ch - 1;
> press_data->multiread_bit = press_data->sensor_settings->multi_read_bit;
> indio_dev->channels = press_data->sensor_settings->ch;
> indio_dev->num_channels = press_data->sensor_settings->num_ch;
>
next prev parent reply other threads:[~2016-04-24 10:59 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-19 9:18 [RFC PATCH v1 0/9] iio:st_sensors: fixes and lps22hb pressure sensor Gregor Boirie
2016-04-19 9:18 ` [RFC PATCH v1 1/9] iio:st_pressure:initial lps22hb sensor support Gregor Boirie
2016-04-24 9:29 ` Jonathan Cameron
2016-05-01 19:28 ` Jonathan Cameron
2016-05-29 14:14 ` Jonathan Cameron
2016-04-19 9:18 ` [RFC PATCH v1 2/9] iio:st_pressure: fix sampling gains Gregor Boirie
2016-05-29 15:14 ` Jonathan Cameron
2016-05-30 8:17 ` Linus Walleij
2016-05-30 12:23 ` Jonathan Cameron
2016-04-19 9:18 ` [RFC PATCH v1 3/9] iio:st_pressure: lps22hb temperature support Gregor Boirie
2016-05-29 14:53 ` Jonathan Cameron
2016-04-19 9:18 ` [RFC PATCH v1 4/9] iio:st_sensors: align on storagebits boundaries Gregor Boirie
2016-04-24 9:35 ` Jonathan Cameron
2016-05-01 19:27 ` Jonathan Cameron
2016-05-02 8:19 ` Gregor Boirie
2016-05-14 17:54 ` Jonathan Cameron
2016-05-03 16:20 ` Crestez Dan Leonard
2016-04-19 9:18 ` [RFC PATCH v1 5/9] iio:st_pressure: align storagebits on power of 2 Gregor Boirie
2016-04-19 9:18 ` [RFC PATCH v1 6/9] iio:st_pressure: temperature triggered buffering Gregor Boirie
2016-04-24 10:58 ` Jonathan Cameron [this message]
2016-05-29 14:57 ` Jonathan Cameron
2016-04-19 9:18 ` [RFC PATCH v1 7/9] iio:st_sensors: unexport st_sensors_get_buffer_element Gregor Boirie
2016-05-29 14:59 ` Jonathan Cameron
2016-04-19 9:18 ` [RFC PATCH v1 8/9] iio:st_sensors: emulate SMBus block read if needed Gregor Boirie
2016-05-29 15:06 ` Jonathan Cameron
2016-04-19 9:18 ` [RFC PATCH v1 9/9] iio:st_sensors: fix power regulator usage Gregor Boirie
2016-04-24 11:01 ` Jonathan Cameron
2016-04-24 11:02 ` Jonathan Cameron
2016-05-29 15:10 ` Jonathan Cameron
2016-04-27 11:26 ` [RFC PATCH v1 0/9] iio:st_sensors: fixes and lps22hb pressure sensor Linus Walleij
2016-04-27 12:02 ` Linus Walleij
2016-04-27 13:08 ` Gregor Boirie
2016-04-28 7:47 ` Linus Walleij
2016-04-28 14:57 ` Gregor Boirie
2016-04-28 15:02 ` Gregor Boirie
2016-06-11 17:36 ` Jonathan Cameron
2016-06-15 10:58 ` Gregor Boirie
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=940bb299-878f-0799-1b04-c241ae165127@kernel.org \
--to=jic23@kernel.org \
--cc=denis.ciocca@st.com \
--cc=giuseppe.barba@st.com \
--cc=gregor.boirie@parrot.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@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;
as well as URLs for NNTP newsgroup(s).