From: Jonathan Cameron <jic23@kernel.org>
To: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Cc: linux-iio@vger.kernel.org, linus.walleij@linaro.org,
lorenzo.bianconi@st.com
Subject: Re: [PATCH 3/4] iio: magnetometer: add support to LIS2MDL
Date: Thu, 17 Aug 2017 15:52:57 +0100 [thread overview]
Message-ID: <20170817155257.1871a2c4@archlinux> (raw)
In-Reply-To: <20170816170253.8382-4-lorenzo.bianconi@st.com>
On Wed, 16 Aug 2017 19:02:52 +0200
Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> wrote:
> add support to STMicroelectronics LIS2MDL magnetometer in
> st_magn framework
>
> http://www.st.com/resource/en/datasheet/lis2mdl.pdf
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
There was no dependency really between patches 1 and 2 (fixes) and the new
support. I would have slightly preferred them as two series.
Anyhow, applied to the togreg branch of iio.git and pushed out as
testing.
Thanks,
Jonathan
> ---
> drivers/iio/magnetometer/st_magn.h | 1 +
> drivers/iio/magnetometer/st_magn_core.c | 1 +
> drivers/iio/magnetometer/st_magn_i2c.c | 5 +++++
> drivers/iio/magnetometer/st_magn_spi.c | 5 +++++
> 4 files changed, 12 insertions(+)
>
> diff --git a/drivers/iio/magnetometer/st_magn.h b/drivers/iio/magnetometer/st_magn.h
> index 9daca4681922..8fe51ce427bd 100644
> --- a/drivers/iio/magnetometer/st_magn.h
> +++ b/drivers/iio/magnetometer/st_magn.h
> @@ -19,6 +19,7 @@
> #define LSM303DLM_MAGN_DEV_NAME "lsm303dlm_magn"
> #define LIS3MDL_MAGN_DEV_NAME "lis3mdl"
> #define LSM303AGR_MAGN_DEV_NAME "lsm303agr_magn"
> +#define LIS2MDL_MAGN_DEV_NAME "lis2mdl"
>
> int st_magn_common_probe(struct iio_dev *indio_dev);
> void st_magn_common_remove(struct iio_dev *indio_dev);
> diff --git a/drivers/iio/magnetometer/st_magn_core.c b/drivers/iio/magnetometer/st_magn_core.c
> index cd89962f2de3..e68368b5b2a3 100644
> --- a/drivers/iio/magnetometer/st_magn_core.c
> +++ b/drivers/iio/magnetometer/st_magn_core.c
> @@ -323,6 +323,7 @@ static const struct st_sensor_settings st_magn_sensors_settings[] = {
> .wai_addr = 0x4f,
> .sensors_supported = {
> [0] = LSM303AGR_MAGN_DEV_NAME,
> + [1] = LIS2MDL_MAGN_DEV_NAME,
> },
> .ch = (struct iio_chan_spec *)st_magn_3_16bit_channels,
> .odr = {
> diff --git a/drivers/iio/magnetometer/st_magn_i2c.c b/drivers/iio/magnetometer/st_magn_i2c.c
> index 6a6c8121ac2c..feaa28cf6a77 100644
> --- a/drivers/iio/magnetometer/st_magn_i2c.c
> +++ b/drivers/iio/magnetometer/st_magn_i2c.c
> @@ -40,6 +40,10 @@ static const struct of_device_id st_magn_of_match[] = {
> .compatible = "st,lsm303agr-magn",
> .data = LSM303AGR_MAGN_DEV_NAME,
> },
> + {
> + .compatible = "st,lis2mdl",
> + .data = LIS2MDL_MAGN_DEV_NAME,
> + },
> {},
> };
> MODULE_DEVICE_TABLE(of, st_magn_of_match);
> @@ -85,6 +89,7 @@ static const struct i2c_device_id st_magn_id_table[] = {
> { LSM303DLM_MAGN_DEV_NAME },
> { LIS3MDL_MAGN_DEV_NAME },
> { LSM303AGR_MAGN_DEV_NAME },
> + { LIS2MDL_MAGN_DEV_NAME },
> {},
> };
> MODULE_DEVICE_TABLE(i2c, st_magn_id_table);
> diff --git a/drivers/iio/magnetometer/st_magn_spi.c b/drivers/iio/magnetometer/st_magn_spi.c
> index 1ea64dd318aa..7b7cd08fcc32 100644
> --- a/drivers/iio/magnetometer/st_magn_spi.c
> +++ b/drivers/iio/magnetometer/st_magn_spi.c
> @@ -33,6 +33,10 @@ static const struct of_device_id st_magn_of_match[] = {
> .compatible = "st,lsm303agr-magn",
> .data = LSM303AGR_MAGN_DEV_NAME,
> },
> + {
> + .compatible = "st,lis2mdl",
> + .data = LIS2MDL_MAGN_DEV_NAME,
> + },
> {}
> };
> MODULE_DEVICE_TABLE(of, st_magn_of_match);
> @@ -74,6 +78,7 @@ static int st_magn_spi_remove(struct spi_device *spi)
> static const struct spi_device_id st_magn_id_table[] = {
> { LIS3MDL_MAGN_DEV_NAME },
> { LSM303AGR_MAGN_DEV_NAME },
> + { LIS2MDL_MAGN_DEV_NAME },
> {},
> };
> MODULE_DEVICE_TABLE(spi, st_magn_id_table);
next prev parent reply other threads:[~2017-08-17 14:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-16 17:02 [PATCH 0/4] Add support to LIS2MDL magnetometer sensor Lorenzo Bianconi
2017-08-16 17:02 ` [PATCH 1/4] iio: magnetometer: st_magn: fix status register address for LSM303AGR Lorenzo Bianconi
2017-08-17 14:43 ` Jonathan Cameron
2017-08-16 17:02 ` [PATCH 2/4] iio: magnetometer: st_magn: remove ihl property " Lorenzo Bianconi
2017-08-17 14:48 ` Jonathan Cameron
2017-08-16 17:02 ` [PATCH 3/4] iio: magnetometer: add support to LIS2MDL Lorenzo Bianconi
2017-08-17 14:52 ` Jonathan Cameron [this message]
2017-08-16 17:02 ` [PATCH 4/4] dt-bindings: iio: magn: add LIS2MDL sensor device binding Lorenzo Bianconi
2017-08-17 7:01 ` Lorenzo Bianconi
2017-08-17 14:55 ` Jonathan Cameron
2017-08-16 18:52 ` [PATCH 0/4] Add support to LIS2MDL magnetometer sensor Lorenzo Bianconi
2017-08-16 23:21 ` Jonathan Cameron
2017-08-16 21:07 ` 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=20170817155257.1871a2c4@archlinux \
--to=jic23@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=lorenzo.bianconi83@gmail.com \
--cc=lorenzo.bianconi@st.com \
/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).