From: Hans de Goede <hdegoede@redhat.com>
To: Marius Hoch <mail@mariushoch.de>,
Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Denis Ciocca <denis.ciocca@st.com>,
Linus Walleij <linus.walleij@linaro.org>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 0/6] iio: st_sensors: Add lsm303d support
Date: Sun, 16 Apr 2023 22:19:50 +0200 [thread overview]
Message-ID: <3eb3de24-41b4-9566-9b11-a12d21904793@redhat.com> (raw)
In-Reply-To: <20230415231130.115094-1-mail@mariushoch.de>
Hi Marius,
On 4/16/23 01:11, Marius Hoch wrote:
> Hi!
>
> This patch series adds support for the LSM303D accelerometer and
> magnetometer. As the LSM303D is basically, as far as I can tell,
> the LSM9DS0 without gyroscope, we can easily re-use its definitions.
>
> This was tested on a Lenovo Yoga Tablet 2 1051-F.
Thank you for your work on this. I have had this on my own todo list
since 2020 at least and I did not realize that Andy already added ST IMU
support in 2021 so this just needed some extra device-ids :)
I have tested this successfully on the following models:
Lenovo Yoga Tablet 2 851F (Windows version 8")
This version needs an accel-mount-matrix quick in hwdb since it has
a portrait screen rather then a landscape screen (so 90° rotated):
https://github.com/systemd/systemd/pull/27295
Note I've made sure that this quirk only applies to the 851 and not to the 1051.
Lenovo Yoga Tablet 2 830F (Android version 8")
Since the ACPI tables are broken in the Android BIOS these need
a patch to x86-android-tablets to instantiate the i2c_client
for the sensor, I'm still finalizing this patch and I'll submit
it upstream when its finished.
Tested-by: Hans de Goede <hansg@kernel.org>
Regards,
Hans
p.s.
1: I noticed that auto-screen rotation using iio-sensor-proxy is quite slow
so I wrote a patch to fix this :) :
https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/366
2: There are some other unsupported sensors on these models too,
perhaps you are interested in adding support for these too?
Here are my personal notes on this:
-Light sensor should work with drivers/iio/light/al3320a.c
https://github.com/JideTechnology/remixos-kernel/commit/c52d55b4bd907e87b7b115b3943219f3e089a77a
-MXM1120 HALL sensor, have datasheet, measures angle of kickstand thingie, use
for SW_TABLET_MODE. Do a pdx86 driver just for the Tab 2 which checks that the
kick stand is out *and* the BT keyboard is paired, in that case report
SW_TABLET_MODE=0, in all other cases report SW_TABLET_MODE=1 ??
For the commit msg:
Datasheet available here: http://haechitech.com/tech-support/
Requires creating an account, once you have an account you can immediately download
the provided datasheets (or let me know if you want me to email you a copy)
Especially the light sensor should be an easy win and light sensors
are already supported in e.g. iio-sensor-proxy
> Changes in v3:
> Simplified the ACPI tables in the LSM9DS0 IMU driver, per Jonathan Cameron.
>
> Marius Hoch (6):
> iio: accel: st_accel: Add LSM303D
> iio: magnetometer: st_accel: Add LSM303D
> iio: st_sensors: Add lsm303d support to the LSM9DS0 IMU driver
> iio: st_sensors: Add ACPI support for lsm303d to the LSM9DS0 IMU
> driver
> iio: Comment that the LSM303D also has the Magnetometer DRDY
> dt-bindings: iio: st-sensors: Add LSM303D accelerometer+magnetometer
>
> .../devicetree/bindings/iio/st,st-sensors.yaml | 1 +
> drivers/iio/accel/st_accel_core.c | 1 +
> drivers/iio/imu/st_lsm9ds0/Kconfig | 3 ++-
> drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c | 12 ++++++++++++
> drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c | 12 ++++++++++++
> drivers/iio/magnetometer/st_magn_core.c | 1 +
> include/linux/iio/common/st_sensors.h | 1 +
> include/linux/platform_data/st_sensors_pdata.h | 2 +-
> 8 files changed, 31 insertions(+), 2 deletions(-)
>
>
> base-commit: e62252bc55b6d4eddc6c2bdbf95a448180d6a08d
next prev parent reply other threads:[~2023-04-16 20:20 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-15 23:11 [PATCH v3 0/6] iio: st_sensors: Add lsm303d support Marius Hoch
2023-04-15 23:11 ` [PATCH v3 1/6] iio: accel: st_accel: Add LSM303D Marius Hoch
2023-04-21 8:41 ` Linus Walleij
2023-04-15 23:11 ` [PATCH v3 2/6] iio: magnetometer: " Marius Hoch
2023-04-21 8:41 ` Linus Walleij
2023-04-15 23:11 ` [PATCH v3 3/6] iio: st_sensors: Add lsm303d support to the LSM9DS0 IMU driver Marius Hoch
2023-04-21 8:42 ` Linus Walleij
2023-04-15 23:11 ` [PATCH v3 4/6] iio: st_sensors: Add ACPI support for lsm303d " Marius Hoch
2023-04-21 8:43 ` Linus Walleij
2023-05-02 14:51 ` Marius Hoch
2023-05-07 13:50 ` Jonathan Cameron
2023-04-15 23:11 ` [PATCH v3 5/6] iio: Comment that the LSM303D also has the Magnetometer DRDY Marius Hoch
2023-04-21 8:43 ` Linus Walleij
2023-04-15 23:11 ` [PATCH v3 6/6] dt-bindings: iio: st-sensors: Add LSM303D accelerometer+magnetometer Marius Hoch
2023-04-16 7:29 ` Krzysztof Kozlowski
2023-04-16 12:23 ` Jonathan Cameron
2023-04-16 20:19 ` Hans de Goede [this message]
2023-04-20 17:21 ` [PATCH v3 0/6] iio: st_sensors: Add lsm303d support Marius Hoch
2023-04-21 7:55 ` Hans de Goede
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=3eb3de24-41b4-9566-9b11-a12d21904793@redhat.com \
--to=hdegoede@redhat.com \
--cc=denis.ciocca@st.com \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mail@mariushoch.de \
--cc=robh+dt@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).