hadess / iio-sensor-proxy

IIO accelerometer sensor to input device proxy
196 stars 63 forks source link

mount-matrix: also read mount-matrix from in_accel_mount_matrix #260

Closed Icenowy closed 4 years ago

Icenowy commented 5 years ago

The IIO framework may also export mount matrix with sysfs filename in_accel_mount_matrix (when the type of this extinfo is set to be IIO_SHARED_BY_TYPE.

Also try to read mount-matrix from this file.

Signed-off-by: Icenowy Zheng icenowy@aosc.io

hadess commented 5 years ago

Could you please remove the Signed-off-by? We don't use it here. Please also add a link to the kernel documentation on kernel.org that corresponds to the explanation of this field.

The doc says:

                An implementor might consider that for a hand-held device, a
                'natural' orientation would be 'front facing camera at the top'.
                The main hardware reference frame could then be described as : 
                * Y is in the plane of the screen and is positive towards the
                  top of the screen ;
                * X is in the plane of the screen, perpendicular to Y axis, and
                  positive towards the right hand side of the screen ;
                * Z is perpendicular to the screen plane and positive out of the
                  screen.

I have absolutely no idea whether this corresponds to the orientation we expect from iio-sensor-proxy (and Windows!). How is this going to work if a system has a mount matrix exported via ACPI as well?

CC: @dsd

hadess commented 5 years ago

Any answers to the questions I mentioned?

hadess commented 4 years ago

Moved to https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/merge_requests/260