Re: [PATCH v3 0/6] iio: st_sensors: Add lsm303d support

From: Hans de Goede
Date: Fri Apr 21 2023 - 03:57:38 EST


Hi Marius,

On 4/16/23 22:19, Hans de Goede wrote:

<snip>

> 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)

A quick follow up on this, since you said you were going to take a look.

I think with the way bluetooth works under Linux, with a bunch of the work
being done in userspace that figuring out if the BT keyboard is paired is
not going to work in kernelspace. So I think the best we can do here is
simply export the angle of the kickstand as an iio angle sensor.

Regards,

Hans