From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: AceLan Kao <acelan.kao@canonical.com>,
Bastien Nocera <hadess@hadess.net>
Cc: Jiri Kosina <jikos@kernel.org>,
Jonathan Cameron <jic23@kernel.org>,
linux-input@vger.kernel.org, linux-iio@vger.kernel.org
Subject: Re: Display got wrong rotation after hid_sensor_accel_3d is loaded
Date: Mon, 30 Dec 2019 09:18:06 -0800 [thread overview]
Message-ID: <7830ad25a5cb7640e1da55c4278ce73c1ff3e0ad.camel@linux.intel.com> (raw)
In-Reply-To: <CAFv23Qmj_ZqKs9_tw1Grzzj5unFBLfK0Scy396vcHCEB+fdLOA@mail.gmail.com>
Hi Kao,
Is this device sold with Windows?
Can you send full report descriptor (You can get from
/sys/kernel/debug/hid)?
Thanks,
Srinivas
On Fri, 2019-12-27 at 10:30 +0800, AceLan Kao wrote:
> Hi Bastien,
>
> Thanks for your suggestion.
> I just tried to add the following line into
> /lib/udev/hwdb.d/60-sensor.hwdb and got the correct screen rotation.
> But the cursor is still un-rotated, the cursor is drawn upside down,
> and its coordinates are inverted.
>
> #########################################
> # STMicro
> #########################################
> sensor:modalias:platform:platform:HID-SENSOR-200073
> ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, -1, 0; 0, 0, 1
>
> It looks like we should introduce a quirk into hid_sensor_accel_3d
> driver.
> There are 3 different scale variables in hid_sensor_accel_3d, but I
> don't see any of them would work the way I want.
> Do you mean to introduce new scale variables?
>
> drivers/iio/accel/hid-sensor-accel-3d.c:34: int
> scale_pre_decml;
> drivers/iio/accel/hid-sensor-accel-3d.c:35: int
> scale_post_decml;
> drivers/iio/accel/hid-sensor-accel-3d.c:36: int
> scale_precision;
>
> Bastien Nocera <hadess@hadess.net> 於 2019年12月26日 週四 下午11:03寫道:
> >
> > On Thu, 2019-12-26 at 17:22 +0800, AceLan Kao wrote:
> > > Hi all,
> > >
> > > I'm working on a new platform which comes with an accelerator
> > > meter.
> > > It's a STMicroelectronics LSM6DS3US accelerator meter, it doesn't
> > > use
> > > st_sensors driver, but hid_sensor_accel_3d.
> > > After hid_sensor_accel_3d is loaded, the display becomes upside
> > > down,
> > > so I tried to add some code to make it become normal.(ACCEL_X
> > > should
> > > have the same modification)
> > >
> > > I don't know how to fix this in a correct way, please give me
> > > some
> > > hints.
> >
> > This needs to be done as a quirk, either by applying a quirk for
> > the
> > HID descriptors (which should have a definition of the scale, which
> > would be negative for this device), or in user-space in systemd's
> > hwdb
> > database, which your user-space consumers need to take care of:
> >
https://github.com/systemd/systemd/blob/master/hwdb.d/60-sensor.hwdb
> >
> > Cheers
> >
next prev parent reply other threads:[~2019-12-30 17:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-26 9:22 Display got wrong rotation after hid_sensor_accel_3d is loaded AceLan Kao
2019-12-26 15:03 ` Bastien Nocera
2019-12-27 2:30 ` AceLan Kao
2019-12-30 17:18 ` Srinivas Pandruvada [this message]
2020-01-02 2:46 ` AceLan Kao
2020-01-02 17:43 ` Srinivas Pandruvada
2020-01-06 1:53 ` AceLan Kao
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=7830ad25a5cb7640e1da55c4278ce73c1ff3e0ad.camel@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=acelan.kao@canonical.com \
--cc=hadess@hadess.net \
--cc=jic23@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-input@vger.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).