linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denis Ciocca <denis.ciocca@st.com>
To: Giuseppe BARBA <giuseppe.barba@st.com>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Cc: "jic23@kernel.org" <jic23@kernel.org>
Subject: Re: [PATCH V4 4/5] iio: st-accel: add support for lsm303agr accelerometer
Date: Tue, 21 Jul 2015 18:44:26 +0800	[thread overview]
Message-ID: <55AE228A.2080505@st.com> (raw)
In-Reply-To: <1437467745-18435-5-git-send-email-giuseppe.barba@st.com>

Acked-by: Denis Ciocca <denis.ciocca@st.com>


On 07/21/2015 04:35 PM, Giuseppe BARBA wrote:
> This adds support for the lsm303agr accelerometer.
>
> Signed-off-by: Giuseppe Barba <giuseppe.barba@st.com>
> ---
>   Documentation/devicetree/bindings/iio/st-sensors.txt | 1 +
>   drivers/iio/accel/st_accel.h                         | 1 +
>   drivers/iio/accel/st_accel_core.c                    | 1 +
>   drivers/iio/accel/st_accel_i2c.c                     | 5 +++++
>   drivers/iio/accel/st_accel_spi.c                     | 1 +
>   5 files changed, 9 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/iio/st-sensors.txt b/Documentation/devicetree/bindings/iio/st-sensors.txt
> index 8a6be3b..d80bdaa 100644
> --- a/Documentation/devicetree/bindings/iio/st-sensors.txt
> +++ b/Documentation/devicetree/bindings/iio/st-sensors.txt
> @@ -35,6 +35,7 @@ Accelerometers:
>   - st,lsm303dl-accel
>   - st,lsm303dlm-accel
>   - st,lsm330-accel
> +- st,lsm303agr-accel
>   
>   Gyroscopes:
>   - st,l3g4200d-gyro
> diff --git a/drivers/iio/accel/st_accel.h b/drivers/iio/accel/st_accel.h
> index aa10019..468f21f 100644
> --- a/drivers/iio/accel/st_accel.h
> +++ b/drivers/iio/accel/st_accel.h
> @@ -26,6 +26,7 @@
>   #define LSM303DLH_ACCEL_DEV_NAME	"lsm303dlh_accel"
>   #define LSM303DLM_ACCEL_DEV_NAME	"lsm303dlm_accel"
>   #define LSM330_ACCEL_DEV_NAME		"lsm330_accel"
> +#define LSM303AGR_ACCEL_DEV_NAME	"lsm303agr_accel"
>   
>   /**
>   * struct st_sensors_platform_data - default accel platform data
> diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c
> index 12b42f6..ff30f88 100644
> --- a/drivers/iio/accel/st_accel_core.c
> +++ b/drivers/iio/accel/st_accel_core.c
> @@ -233,6 +233,7 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = {
>   			[2] = LSM330D_ACCEL_DEV_NAME,
>   			[3] = LSM330DL_ACCEL_DEV_NAME,
>   			[4] = LSM330DLC_ACCEL_DEV_NAME,
> +			[5] = LSM303AGR_ACCEL_DEV_NAME,
>   		},
>   		.ch = (struct iio_chan_spec *)st_accel_12bit_channels,
>   		.odr = {
> diff --git a/drivers/iio/accel/st_accel_i2c.c b/drivers/iio/accel/st_accel_i2c.c
> index a2f1c20..8b9cc84 100644
> --- a/drivers/iio/accel/st_accel_i2c.c
> +++ b/drivers/iio/accel/st_accel_i2c.c
> @@ -68,6 +68,10 @@ static const struct of_device_id st_accel_of_match[] = {
>   		.compatible = "st,lsm330-accel",
>   		.data = LSM330_ACCEL_DEV_NAME,
>   	},
> +	{
> +		.compatible = "st,lsm303agr-accel",
> +		.data = LSM303AGR_ACCEL_DEV_NAME,
> +	},
>   	{},
>   };
>   MODULE_DEVICE_TABLE(of, st_accel_of_match);
> @@ -116,6 +120,7 @@ static const struct i2c_device_id st_accel_id_table[] = {
>   	{ LSM303DL_ACCEL_DEV_NAME },
>   	{ LSM303DLM_ACCEL_DEV_NAME },
>   	{ LSM330_ACCEL_DEV_NAME },
> +	{ LSM303AGR_ACCEL_DEV_NAME },
>   	{},
>   };
>   MODULE_DEVICE_TABLE(i2c, st_accel_id_table);
> diff --git a/drivers/iio/accel/st_accel_spi.c b/drivers/iio/accel/st_accel_spi.c
> index 12ec293..54b61a3 100644
> --- a/drivers/iio/accel/st_accel_spi.c
> +++ b/drivers/iio/accel/st_accel_spi.c
> @@ -57,6 +57,7 @@ static const struct spi_device_id st_accel_id_table[] = {
>   	{ LSM303DL_ACCEL_DEV_NAME },
>   	{ LSM303DLM_ACCEL_DEV_NAME },
>   	{ LSM330_ACCEL_DEV_NAME },
> +	{ LSM303AGR_ACCEL_DEV_NAME },
>   	{},
>   };
>   MODULE_DEVICE_TABLE(spi, st_accel_id_table);


  reply	other threads:[~2015-07-21 10:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-21  8:35 [PATCH V4 0/5] Added ST LSM303AGR sensor Giuseppe Barba
2015-07-21  8:35 ` [PATCH V4 1/5] iio: st-sensors: add configuration for WhoAmI address Giuseppe Barba
2015-07-21 10:43   ` Denis Ciocca
2015-07-23 19:36     ` Jonathan Cameron
2015-07-21  8:35 ` [PATCH V4 2/5] iio: st-sensors: add support for single full scale device Giuseppe Barba
2015-07-21 10:44   ` Denis Ciocca
2015-07-21  8:35 ` [PATCH V4 3/5] iio: st_magn: Add irq trigger handling Giuseppe Barba
2015-07-21 10:44   ` Denis Ciocca
2015-07-21  8:35 ` [PATCH V4 4/5] iio: st-accel: add support for lsm303agr accelerometer Giuseppe Barba
2015-07-21 10:44   ` Denis Ciocca [this message]
2015-07-23 19:40     ` Jonathan Cameron
2015-07-21  8:35 ` [PATCH V4 5/5] iio: st-magn: add support for lsm303agr magnetometer Giuseppe Barba
2015-07-21 10:44   ` Denis Ciocca
2015-07-23 19:42     ` 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=55AE228A.2080505@st.com \
    --to=denis.ciocca@st.com \
    --cc=giuseppe.barba@st.com \
    --cc=jic23@kernel.org \
    --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).