* [PATCH 0/2] fix L3GD20H gyroscope sensor support @ 2017-06-19 20:04 Lorenzo Bianconi 2017-06-19 20:04 ` [PATCH 1/2] iio: gyro: st_gyro: fix L3GD20H support Lorenzo Bianconi 2017-06-19 20:04 ` [PATCH 2/2] dt-bindings: iio: gyro: add L3GD20H sensor device binding Lorenzo Bianconi 0 siblings, 2 replies; 9+ messages in thread From: Lorenzo Bianconi @ 2017-06-19 20:04 UTC (permalink / raw) To: jic23 Cc: robert.dolca, denis.ciocca, linus.walleij, linux-iio, devicetree, lorenzo.bianconi Lorenzo Bianconi (2): iio: gyro: st_gyro: fix L3GD20H support dt-bindings: iio: gyro: add L3GD20H sensor device binding Documentation/devicetree/bindings/iio/st-sensors.txt | 1 + drivers/iio/gyro/st_gyro.h | 1 + drivers/iio/gyro/st_gyro_core.c | 13 +++++++------ drivers/iio/gyro/st_gyro_i2c.c | 5 +++++ drivers/iio/gyro/st_gyro_spi.c | 1 + 5 files changed, 15 insertions(+), 6 deletions(-) -- 2.13.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/2] iio: gyro: st_gyro: fix L3GD20H support 2017-06-19 20:04 [PATCH 0/2] fix L3GD20H gyroscope sensor support Lorenzo Bianconi @ 2017-06-19 20:04 ` Lorenzo Bianconi 2017-06-20 11:28 ` Linus Walleij 2017-06-19 20:04 ` [PATCH 2/2] dt-bindings: iio: gyro: add L3GD20H sensor device binding Lorenzo Bianconi 1 sibling, 1 reply; 9+ messages in thread From: Lorenzo Bianconi @ 2017-06-19 20:04 UTC (permalink / raw) To: jic23 Cc: robert.dolca, denis.ciocca, linus.walleij, linux-iio, devicetree, lorenzo.bianconi Add proper support for L3GD20H gyroscope sensor. In particular: - use L3GD20H as device name instead of L3GD20 - fix available full scales - fix available sample frequencies Fixes: 9444a300c2be (IIO: Add support for L3GD20H gyroscope) Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com> --- drivers/iio/gyro/st_gyro.h | 1 + drivers/iio/gyro/st_gyro_core.c | 13 +++++++------ drivers/iio/gyro/st_gyro_i2c.c | 5 +++++ drivers/iio/gyro/st_gyro_spi.c | 1 + 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/iio/gyro/st_gyro.h b/drivers/iio/gyro/st_gyro.h index a5c5c4e29add..48923ae6ac3b 100644 --- a/drivers/iio/gyro/st_gyro.h +++ b/drivers/iio/gyro/st_gyro.h @@ -19,6 +19,7 @@ #define LSM330DL_GYRO_DEV_NAME "lsm330dl_gyro" #define LSM330DLC_GYRO_DEV_NAME "lsm330dlc_gyro" #define L3GD20_GYRO_DEV_NAME "l3gd20" +#define L3GD20H_GYRO_DEV_NAME "l3gd20h" #define L3G4IS_GYRO_DEV_NAME "l3g4is_ui" #define LSM330_GYRO_DEV_NAME "lsm330_gyro" #define LSM9DS0_GYRO_DEV_NAME "lsm9ds0_gyro" diff --git a/drivers/iio/gyro/st_gyro_core.c b/drivers/iio/gyro/st_gyro_core.c index 2a42b3d583e8..e366422e8512 100644 --- a/drivers/iio/gyro/st_gyro_core.c +++ b/drivers/iio/gyro/st_gyro_core.c @@ -35,6 +35,7 @@ #define ST_GYRO_DEFAULT_OUT_Z_L_ADDR 0x2c /* FULLSCALE */ +#define ST_GYRO_FS_AVL_245DPS 245 #define ST_GYRO_FS_AVL_250DPS 250 #define ST_GYRO_FS_AVL_500DPS 500 #define ST_GYRO_FS_AVL_2000DPS 2000 @@ -196,17 +197,17 @@ static const struct st_sensor_settings st_gyro_sensors_settings[] = { .wai = 0xd7, .wai_addr = ST_SENSORS_DEFAULT_WAI_ADDRESS, .sensors_supported = { - [0] = L3GD20_GYRO_DEV_NAME, + [0] = L3GD20H_GYRO_DEV_NAME, }, .ch = (struct iio_chan_spec *)st_gyro_16bit_channels, .odr = { .addr = 0x20, .mask = 0xc0, .odr_avl = { - { .hz = 95, .value = 0x00, }, - { .hz = 190, .value = 0x01, }, - { .hz = 380, .value = 0x02, }, - { .hz = 760, .value = 0x03, }, + { .hz = 100, .value = 0x00, }, + { .hz = 200, .value = 0x01, }, + { .hz = 400, .value = 0x02, }, + { .hz = 800, .value = 0x03, }, }, }, .pw = { @@ -224,7 +225,7 @@ static const struct st_sensor_settings st_gyro_sensors_settings[] = { .mask = 0x30, .fs_avl = { [0] = { - .num = ST_GYRO_FS_AVL_250DPS, + .num = ST_GYRO_FS_AVL_245DPS, .value = 0x00, .gain = IIO_DEGREE_TO_RAD(8750), }, diff --git a/drivers/iio/gyro/st_gyro_i2c.c b/drivers/iio/gyro/st_gyro_i2c.c index 40056b821036..3f628746cb93 100644 --- a/drivers/iio/gyro/st_gyro_i2c.c +++ b/drivers/iio/gyro/st_gyro_i2c.c @@ -41,6 +41,10 @@ static const struct of_device_id st_gyro_of_match[] = { .data = L3GD20_GYRO_DEV_NAME, }, { + .compatible = "st,l3gd20h-gyro", + .data = L3GD20H_GYRO_DEV_NAME, + }, + { .compatible = "st,l3g4is-gyro", .data = L3G4IS_GYRO_DEV_NAME, }, @@ -95,6 +99,7 @@ static const struct i2c_device_id st_gyro_id_table[] = { { LSM330DL_GYRO_DEV_NAME }, { LSM330DLC_GYRO_DEV_NAME }, { L3GD20_GYRO_DEV_NAME }, + { L3GD20H_GYRO_DEV_NAME }, { L3G4IS_GYRO_DEV_NAME }, { LSM330_GYRO_DEV_NAME }, { LSM9DS0_GYRO_DEV_NAME }, diff --git a/drivers/iio/gyro/st_gyro_spi.c b/drivers/iio/gyro/st_gyro_spi.c index fbf2faed501c..fa14d8f2170d 100644 --- a/drivers/iio/gyro/st_gyro_spi.c +++ b/drivers/iio/gyro/st_gyro_spi.c @@ -52,6 +52,7 @@ static const struct spi_device_id st_gyro_id_table[] = { { LSM330DL_GYRO_DEV_NAME }, { LSM330DLC_GYRO_DEV_NAME }, { L3GD20_GYRO_DEV_NAME }, + { L3GD20H_GYRO_DEV_NAME }, { L3G4IS_GYRO_DEV_NAME }, { LSM330_GYRO_DEV_NAME }, { LSM9DS0_GYRO_DEV_NAME }, -- 2.13.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] iio: gyro: st_gyro: fix L3GD20H support 2017-06-19 20:04 ` [PATCH 1/2] iio: gyro: st_gyro: fix L3GD20H support Lorenzo Bianconi @ 2017-06-20 11:28 ` Linus Walleij 2017-06-20 11:54 ` Lorenzo Bianconi 0 siblings, 1 reply; 9+ messages in thread From: Linus Walleij @ 2017-06-20 11:28 UTC (permalink / raw) To: Lorenzo Bianconi Cc: Jonathan Cameron, Robert Dolca, Denis CIOCCA, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Lorenzo Bianconi On Mon, Jun 19, 2017 at 10:04 PM, Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> wrote: > Add proper support for L3GD20H gyroscope sensor. In particular: > - use L3GD20H as device name instead of L3GD20 > - fix available full scales > - fix available sample frequencies > > Fixes: 9444a300c2be (IIO: Add support for L3GD20H gyroscope) > Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com> Is this then fixing the issue papered over by commit a0657716416f834ef7710a9044614d50a36c3bdc "iio:gyro: bug on L3GD20H gyroscope support" ? Then we should probably state that as a Fixes: too. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] iio: gyro: st_gyro: fix L3GD20H support 2017-06-20 11:28 ` Linus Walleij @ 2017-06-20 11:54 ` Lorenzo Bianconi 2017-06-20 16:40 ` Jonathan Cameron 0 siblings, 1 reply; 9+ messages in thread From: Lorenzo Bianconi @ 2017-06-20 11:54 UTC (permalink / raw) To: Linus Walleij Cc: Jonathan Cameron, Robert Dolca, Denis CIOCCA, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Lorenzo Bianconi > On Mon, Jun 19, 2017 at 10:04 PM, Lorenzo Bianconi > <lorenzo.bianconi83@gmail.com> wrote: > >> Add proper support for L3GD20H gyroscope sensor. In particular: >> - use L3GD20H as device name instead of L3GD20 >> - fix available full scales >> - fix available sample frequencies >> >> Fixes: 9444a300c2be (IIO: Add support for L3GD20H gyroscope) >> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com> > Hi Linus, > Is this then fixing the issue papered over by > commit a0657716416f834ef7710a9044614d50a36c3bdc > "iio:gyro: bug on L3GD20H gyroscope support" > ? > > Then we should probably state that as a Fixes: too. The sensor support was introduce in 496822c78236 (iio:gyro: Add STMicroelectronics gyroscopes driver). Commit a0657716416 just removes the support since it was not properly done. So what do you think? We can add Fixes: 496822c78236 (iio:gyro: Add STMicroelectronics gyroscopes driver). Jonathan should I send a v2? Regards, Lorenzo > > Yours, > Linus Walleij -- UNIX is Sexy: who | grep -i blonde | talk; cd ~; wine; talk; touch; unzip; touch; strip; gasp; finger; gasp; mount; fsck; more; yes; gasp; umount; make clean; sleep ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] iio: gyro: st_gyro: fix L3GD20H support 2017-06-20 11:54 ` Lorenzo Bianconi @ 2017-06-20 16:40 ` Jonathan Cameron 0 siblings, 0 replies; 9+ messages in thread From: Jonathan Cameron @ 2017-06-20 16:40 UTC (permalink / raw) To: Lorenzo Bianconi Cc: Linus Walleij, Robert Dolca, Denis CIOCCA, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Lorenzo Bianconi On Tue, 20 Jun 2017 13:54:30 +0200 Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> wrote: > > On Mon, Jun 19, 2017 at 10:04 PM, Lorenzo Bianconi > > <lorenzo.bianconi83@gmail.com> wrote: > > > >> Add proper support for L3GD20H gyroscope sensor. In particular: > >> - use L3GD20H as device name instead of L3GD20 > >> - fix available full scales > >> - fix available sample frequencies > >> > >> Fixes: 9444a300c2be (IIO: Add support for L3GD20H gyroscope) > >> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com> > > > > Hi Linus, > > > Is this then fixing the issue papered over by > > commit a0657716416f834ef7710a9044614d50a36c3bdc > > "iio:gyro: bug on L3GD20H gyroscope support" > > ? > > > > Then we should probably state that as a Fixes: too. > > The sensor support was introduce in 496822c78236 (iio:gyro: Add > STMicroelectronics gyroscopes driver). > Commit a0657716416 just removes the support since it was not properly done. > So what do you think? > We can add Fixes: 496822c78236 (iio:gyro: Add STMicroelectronics > gyroscopes driver). > Jonathan should I send a v2? Don't worry. I've added the fixes tag and applied it. I've also added a paragraph explaining what is going on with the two fixes tags. Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Thanks, Jonathan > > Regards, > Lorenzo > > > > > > Yours, > > Linus Walleij > > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/2] dt-bindings: iio: gyro: add L3GD20H sensor device binding 2017-06-19 20:04 [PATCH 0/2] fix L3GD20H gyroscope sensor support Lorenzo Bianconi 2017-06-19 20:04 ` [PATCH 1/2] iio: gyro: st_gyro: fix L3GD20H support Lorenzo Bianconi @ 2017-06-19 20:04 ` Lorenzo Bianconi 2017-06-20 11:29 ` Linus Walleij 2017-06-23 21:29 ` Rob Herring 1 sibling, 2 replies; 9+ messages in thread From: Lorenzo Bianconi @ 2017-06-19 20:04 UTC (permalink / raw) To: jic23 Cc: robert.dolca, denis.ciocca, linus.walleij, linux-iio, devicetree, lorenzo.bianconi Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com> --- Documentation/devicetree/bindings/iio/st-sensors.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iio/st-sensors.txt b/Documentation/devicetree/bindings/iio/st-sensors.txt index eaa8fbba34e2..e31457ae6f50 100644 --- a/Documentation/devicetree/bindings/iio/st-sensors.txt +++ b/Documentation/devicetree/bindings/iio/st-sensors.txt @@ -52,6 +52,7 @@ Gyroscopes: - st,lsm330dl-gyro - st,lsm330dlc-gyro - st,l3gd20-gyro +- st,l3gd20h-gyro - st,l3g4is-gyro - st,lsm330-gyro - st,lsm9ds0-gyro -- 2.13.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] dt-bindings: iio: gyro: add L3GD20H sensor device binding 2017-06-19 20:04 ` [PATCH 2/2] dt-bindings: iio: gyro: add L3GD20H sensor device binding Lorenzo Bianconi @ 2017-06-20 11:29 ` Linus Walleij 2017-06-20 16:41 ` Jonathan Cameron 2017-06-23 21:29 ` Rob Herring 1 sibling, 1 reply; 9+ messages in thread From: Linus Walleij @ 2017-06-20 11:29 UTC (permalink / raw) To: Lorenzo Bianconi Cc: Jonathan Cameron, Robert Dolca, Denis CIOCCA, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Lorenzo Bianconi On Mon, Jun 19, 2017 at 10:04 PM, Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> wrote: > Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] dt-bindings: iio: gyro: add L3GD20H sensor device binding 2017-06-20 11:29 ` Linus Walleij @ 2017-06-20 16:41 ` Jonathan Cameron 0 siblings, 0 replies; 9+ messages in thread From: Jonathan Cameron @ 2017-06-20 16:41 UTC (permalink / raw) To: Linus Walleij Cc: Lorenzo Bianconi, Robert Dolca, Denis CIOCCA, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Lorenzo Bianconi On Tue, 20 Jun 2017 13:29:33 +0200 Linus Walleij <linus.walleij@linaro.org> wrote: > On Mon, Jun 19, 2017 at 10:04 PM, Lorenzo Bianconi > <lorenzo.bianconi83@gmail.com> wrote: > > > Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com> > > Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Thanks, Jonathan > > Yours, > Linus Walleij ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] dt-bindings: iio: gyro: add L3GD20H sensor device binding 2017-06-19 20:04 ` [PATCH 2/2] dt-bindings: iio: gyro: add L3GD20H sensor device binding Lorenzo Bianconi 2017-06-20 11:29 ` Linus Walleij @ 2017-06-23 21:29 ` Rob Herring 1 sibling, 0 replies; 9+ messages in thread From: Rob Herring @ 2017-06-23 21:29 UTC (permalink / raw) To: Lorenzo Bianconi Cc: jic23, robert.dolca, denis.ciocca, linus.walleij, linux-iio, devicetree, lorenzo.bianconi On Mon, Jun 19, 2017 at 10:04:31PM +0200, Lorenzo Bianconi wrote: > Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com> > --- > Documentation/devicetree/bindings/iio/st-sensors.txt | 1 + > 1 file changed, 1 insertion(+) Acked-by: Rob Herring <robh@kernel.org> ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-06-23 21:29 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-06-19 20:04 [PATCH 0/2] fix L3GD20H gyroscope sensor support Lorenzo Bianconi 2017-06-19 20:04 ` [PATCH 1/2] iio: gyro: st_gyro: fix L3GD20H support Lorenzo Bianconi 2017-06-20 11:28 ` Linus Walleij 2017-06-20 11:54 ` Lorenzo Bianconi 2017-06-20 16:40 ` Jonathan Cameron 2017-06-19 20:04 ` [PATCH 2/2] dt-bindings: iio: gyro: add L3GD20H sensor device binding Lorenzo Bianconi 2017-06-20 11:29 ` Linus Walleij 2017-06-20 16:41 ` Jonathan Cameron 2017-06-23 21:29 ` Rob Herring
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).