linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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>,
	Linus Walleij <linus.walleij@linaro.org>,
	Denis Ciocca <denis.ciocca@st.com>,
	Giuseppe Barba <giuseppe.barba@st.com>,
	Crestez Dan Leonard <leonard.crestez@intel.com>
Subject: Re: [PATCH v2 6/7] iio:st_pressure:lps22hb: temperature support
Date: Mon, 4 Jul 2016 18:15:50 +0100	[thread overview]
Message-ID: <46681bfa-b6ec-ddd4-207b-1b379f5949a2@kernel.org> (raw)
In-Reply-To: <da77fa06126cd8c41f663965344dc8d7c18e619e.1467023672.git.gregor.boirie@parrot.com>

On 27/06/16 11:38, Gregor Boirie wrote:
> Implement lps22hb temperature sampling channel.
> 
> Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com>
Applied. Thanks.
> ---
>  drivers/iio/pressure/st_pressure_core.c | 26 +++++++++++++++++++++++---
>  1 file changed, 23 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/pressure/st_pressure_core.c b/drivers/iio/pressure/st_pressure_core.c
> index 70230a1..274cdec 100644
> --- a/drivers/iio/pressure/st_pressure_core.c
> +++ b/drivers/iio/pressure/st_pressure_core.c
> @@ -196,6 +196,10 @@
>   * See LPS22HB datasheet:
>   * http://www2.st.com/resource/en/datasheet/lps22hb.pdf
>   */
> +
> +/* LPS22HB temperature sensitivity */
> +#define ST_PRESS_LPS22HB_LSB_PER_CELSIUS	100UL
> +
>  #define ST_PRESS_LPS22HB_WAI_EXP		0xb1
>  #define ST_PRESS_LPS22HB_ODR_ADDR		0x10
>  #define ST_PRESS_LPS22HB_ODR_MASK		0x70
> @@ -307,7 +311,22 @@ 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)
> +	{
> +		.type = IIO_TEMP,
> +		.address = ST_TEMP_1_OUT_L_ADDR,
> +		.scan_index = 1,
> +		.scan_type = {
> +			.sign = 's',
> +			.realbits = 16,
> +			.storagebits = 16,
> +			.endianness = IIO_LE,
> +		},
> +		.info_mask_separate =
> +			BIT(IIO_CHAN_INFO_RAW) |
> +			BIT(IIO_CHAN_INFO_SCALE),
> +		.info_mask_shared_by_all = BIT(IIO_CHAN_INFO_SAMP_FREQ),
> +	},
> +	IIO_CHAN_SOFT_TIMESTAMP(2)
>  };
>  
>  static const struct st_sensor_settings st_press_sensors_settings[] = {
> @@ -494,12 +513,13 @@ static const struct st_sensor_settings st_press_sensors_settings[] = {
>  		.fs = {
>  			.fs_avl = {
>  				/*
> -				 * Sensitivity values as defined in table 3 of
> -				 * LPS22HB datasheet.
> +				 * Pressure and temperature sensitivity values
> +				 * as defined in table 3 of LPS22HB datasheet.
>  				 */
>  				[0] = {
>  					.num = ST_PRESS_FS_AVL_1260MB,
>  					.gain = ST_PRESS_KPASCAL_NANO_SCALE,
> +					.gain2 = ST_PRESS_LPS22HB_LSB_PER_CELSIUS,
>  				},
>  			},
>  		},
> 


  reply	other threads:[~2016-07-04 17:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-27 10:38 [PATCH v2 0/7] iio:st_pressure: improvements Gregor Boirie
2016-06-27 10:38 ` [PATCH v2 1/7] iio:st_sensors: align on storagebits boundaries Gregor Boirie
2016-07-04 17:09   ` Jonathan Cameron
2016-06-27 10:38 ` [PATCH v2 2/7] iio:st_pressure: align storagebits on power of 2 Gregor Boirie
2016-07-04 17:10   ` Jonathan Cameron
2016-06-27 10:38 ` [PATCH v2 3/7] iio:st_pressure: document sampling gains Gregor Boirie
2016-06-27 16:44   ` Linus Walleij
2016-06-28  8:41     ` Gregor Boirie
2016-07-03  9:29       ` Jonathan Cameron
2016-07-04  8:16         ` Linus Walleij
2016-07-04 17:05           ` Jonathan Cameron
2016-07-04 17:15   ` Jonathan Cameron
2016-06-27 10:38 ` [PATCH v2 4/7] iio:st_pressure: temperature triggered buffering Gregor Boirie
2016-07-04 17:15   ` Jonathan Cameron
2016-06-27 10:38 ` [PATCH v2 5/7] iio:st_pressure:lps22hb: open drain support Gregor Boirie
2016-07-04 17:15   ` Jonathan Cameron
2016-06-27 10:38 ` [PATCH v2 6/7] iio:st_pressure:lps22hb: temperature support Gregor Boirie
2016-07-04 17:15   ` Jonathan Cameron [this message]
2016-06-27 10:38 ` [PATCH v2 7/7] iio:st_pressure: clean useless static channel initializers Gregor Boirie
2016-07-04 17:17   ` Jonathan Cameron
2016-07-05 12:48     ` Linus Walleij
2016-07-04  8:15 ` [PATCH v2 0/7] iio:st_pressure: improvements Linus Walleij

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=46681bfa-b6ec-ddd4-207b-1b379f5949a2@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=leonard.crestez@intel.com \
    --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).