Linux IIO development
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Hans de Goede <hdegoede@redhat.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Jeremy Cline <jeremy@jcline.org>,
	linux-iio@vger.kernel.org
Subject: [PATCH 0/1] iio: accel: kxcjk1013: Add tablet_mode sysfs file for exercising the KIOX010A ACPI DSM
Date: Wed, 25 Nov 2020 09:54:43 +0100	[thread overview]
Message-ID: <20201125085444.11593-1-hdegoede@redhat.com> (raw)

Hi All,

This builds on top of the recently merged commit e5b1032a656e ("iio: accel:
kxcjk1013: Add support for KIOX010A ACPI DSM for setting tablet-mode"):
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e5b1032a656e9aa4c7a4df77cb9156a2a651a5f9

As explained in that commit: "Some 360 degree hinges (yoga) style 2-in-1
devices use 2 KXCJ91008-s to allow the OS to determine the angle between
the display and the base of the device, so that the OS can determine if
the 2-in-1 is in laptop or in tablet-mode.

On Windows both accelerometers are read by a special HingeAngleService
process; and this process calls a DSM (Device Specific Method) on the
ACPI KIOX010A device node for the sensor in the display, to let the
embedded-controller (EC) know about the mode so that it can disable the
kbd and touchpad to avoid spurious input while folded into tablet-mode."

Currently the kxcjk1013 driver calls the DSM for this once at probe time
to ensure that the builtin kbd and touchpad work.

This commit adds a tablet_mode sysfs file to the i2c_client device
(not to the iio-device so outside of the iio namespace!) which allows
userspace to call the DSM to toggle between laptop/tablet-mode by
writing this file.

I guess this might be a bit controversial, butI would still like to
see this patch go upstream.

The user reporting the initial kbd / touchpad not working issue has
requested for the functionality offered by the DSM (silence kbd and
touchpad) to be made available to userspace; and I already wrote
this patch before then because I would like users to be able to
exercise the DSM to be able to observe what influence it has on
these systems.

Regards,

Hans


             reply	other threads:[~2020-11-25  8:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-25  8:54 Hans de Goede [this message]
2020-11-25  8:54 ` [PATCH] iio: accel: kxcjk1013: Add tablet_mode sysfs file for exercising the KIOX010A ACPI DSM Hans de Goede
2020-11-25 10:34   ` Andy Shevchenko
2020-11-25 10:55     ` Hans de Goede
2020-11-25 18:48       ` Jonathan Cameron
2020-11-26 10:30         ` Hans de Goede
2020-11-26 12:04           ` 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=20201125085444.11593-1-hdegoede@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=jeremy@jcline.org \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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