diff mbox series

[v2,3/4] iio:magnetometer: st_magn: add BDU settings

Message ID 20181026023812.29720-3-martin@martingkelly.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/4] iio: magnetometer: add clarifying comment | expand

Commit Message

Martin Kelly Oct. 26, 2018, 2:38 a.m. UTC
From: Martin Kelly <martin@martingkelly.com>

LIS3MDL and LSM9DS1 are missing BDU settings in their register maps, so add
them. I don't have a LIS3MDL sensor to test, but this works correctly on
the LSM9DS1, which has the same register map.

Signed-off-by: Martin Kelly <martin@martingkelly.com>
---
 drivers/iio/magnetometer/st_magn_core.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Jonathan Cameron Oct. 28, 2018, 6:51 p.m. UTC | #1
On Thu, 25 Oct 2018 19:38:11 -0700
Martin Kelly <martin@martingkelly.com> wrote:

> From: Martin Kelly <martin@martingkelly.com>
> 
> LIS3MDL and LSM9DS1 are missing BDU settings in their register maps, so add
> them. I don't have a LIS3MDL sensor to test, but this works correctly on
> the LSM9DS1, which has the same register map.
> 
> Signed-off-by: Martin Kelly <martin@martingkelly.com>
Applied thanks,

Jonathan

> ---
>  drivers/iio/magnetometer/st_magn_core.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/iio/magnetometer/st_magn_core.c b/drivers/iio/magnetometer/st_magn_core.c
> index a186b844d664..370b93db528d 100644
> --- a/drivers/iio/magnetometer/st_magn_core.c
> +++ b/drivers/iio/magnetometer/st_magn_core.c
> @@ -316,6 +316,10 @@ static const struct st_sensor_settings st_magn_sensors_settings[] = {
>  				},
>  			},
>  		},
> +		.bdu = {
> +			.addr = 0x24,
> +			.mask = 0x40,
> +		},
>  		.drdy_irq = {
>  			/* drdy line is routed drdy pin */
>  			.stat_drdy = {
diff mbox series

Patch

diff --git a/drivers/iio/magnetometer/st_magn_core.c b/drivers/iio/magnetometer/st_magn_core.c
index a186b844d664..370b93db528d 100644
--- a/drivers/iio/magnetometer/st_magn_core.c
+++ b/drivers/iio/magnetometer/st_magn_core.c
@@ -316,6 +316,10 @@  static const struct st_sensor_settings st_magn_sensors_settings[] = {
 				},
 			},
 		},
+		.bdu = {
+			.addr = 0x24,
+			.mask = 0x40,
+		},
 		.drdy_irq = {
 			/* drdy line is routed drdy pin */
 			.stat_drdy = {