linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gwendal Grignou <gwendal@chromium.org>
To: vilhelm.gray@gmail.com, Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio <linux-iio@vger.kernel.org>,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	Benson Leung <bleung@chromium.org>
Subject: RFC: Present Screen rotation as counter
Date: Wed, 8 Apr 2020 00:22:10 -0700	[thread overview]
Message-ID: <CAPUE2uuL8AU8ps=aLGgkqDR3FVxeWCOoMhj+OruZ6YT5Jn+m0Q@mail.gmail.com> (raw)

Today, on chromebook, to detect screen orientation (portrait,
landscape, inverted portrait, inverted landscape), chrome is polling
lid accelerometer data and calculating the orientation.
To save power, I want the embedded controller (EC) to forward an event
when the lid acceleration detects an orientation change.
To convey that information, I would like to define a rotary encoder
with 4 regions, the counter increases when the screen is rotated
clockwise, (decreases when rotated counter-clockwise) and would
increment by 4 on a full rotation.
The EC knows the accelerometer placement relative to the screen, so we
can define landscape as count % 4 equals to 0.
Would such a counter fit into the counter subsystem?

Regards,
Gwendal.

             reply	other threads:[~2020-04-08  7:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-08  7:22 Gwendal Grignou [this message]
2020-04-08 18:02 ` RFC: Present Screen rotation as counter William Breathitt Gray
2020-04-13 15:28   ` Jonathan Cameron

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='CAPUE2uuL8AU8ps=aLGgkqDR3FVxeWCOoMhj+OruZ6YT5Jn+m0Q@mail.gmail.com' \
    --to=gwendal@chromium.org \
    --cc=bleung@chromium.org \
    --cc=enric.balletbo@collabora.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=vilhelm.gray@gmail.com \
    /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).