From: Maximilian Luz <luzmaximilian@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Maximilian Luz <luzmaximilian@gmail.com>,
Mark Gross <markgross@kernel.org>,
Sebastian Reichel <sre@kernel.org>,
Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
Jonathan Corbet <corbet@lwn.net>,
platform-driver-x86@vger.kernel.org, linux-pm@vger.kernel.org,
linux-input@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 00/10] platform/surface: aggregator: Add support for client hot-removal
Date: Fri, 20 May 2022 20:34:12 +0200 [thread overview]
Message-ID: <20220520183422.7185-1-luzmaximilian@gmail.com> (raw)
This series adds support for the type cover of the Surface Pro 8. On the
Pro 8, the type cover is (unlike on previous generations) handled via
the Surface System Aggregator Module (SSAM). As the type cover is
detachable, care needs to be taken and the respective SSAM (HID) client
devices need to be properly removed when detached and re-initialized
when attached.
Therefore, this series does three things:
1. Improve hot-removal support for SSAM client devices. When
hot-removing clients, subsequent communication may time out.
In the worst case, this can lead to problems when devices are
detached and re-attached quickly, before we can remove their
respective kernel representations. This can then lead to devices
being in an uninitialized state, preventing, for example, touchpad
gestures from working properly as the required HID feature report
has not been sent.
Therefore, handle hot-removal of devices more gracefully by avoiding
communication once it has been detected and ensure that devices are
actually removed.
2. Generify SSAM subsystem hubs and add a KIP hub. On the Surface Pro
8, the KIP subsystem (only that abbreviation is known) is
responsible for managing type-cover devices. This hub acts as the
controller for device removal similar to the BAS (detachable base)
subsystem hub on the Surface Book 3 (therefore we can share most of
the code between them).
3. Add the (HID) type-cover clients of the Surface Pro 8 to the
aggregator registry.
Regards,
Max
Maximilian Luz (10):
platform/surface: aggregator: Allow devices to be marked as
hot-removed
platform/surface: aggregator: Allow notifiers to avoid communication
on unregistering
platform/surface: aggregator_registry: Use client device wrappers for
notifier registration
power/supply: surface_charger: Use client device wrappers for notifier
registration
power/supply: surface_battery: Use client device wrappers for notifier
registration
HID: surface-hid: Add support for hot-removal
platform/surface: aggregator: Add comment for KIP subsystem category
platform/surface: aggregator_registry: Generify subsystem hub
functionality
platform/surface: aggregator_registry: Add KIP device hub
platform/surface: aggregator_registry: Add support for keyboard cover
on Surface Pro 8
.../driver-api/surface_aggregator/client.rst | 6 +-
drivers/hid/surface-hid/surface_hid_core.c | 38 +-
.../platform/surface/aggregator/controller.c | 53 ++-
.../surface/surface_aggregator_registry.c | 401 +++++++++++++-----
drivers/power/supply/surface_battery.c | 4 +-
drivers/power/supply/surface_charger.c | 4 +-
include/linux/surface_aggregator/controller.h | 24 +-
include/linux/surface_aggregator/device.h | 114 ++++-
include/linux/surface_aggregator/serial_hub.h | 2 +-
9 files changed, 501 insertions(+), 145 deletions(-)
--
2.36.1
next reply other threads:[~2022-05-20 18:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-20 18:34 Maximilian Luz [this message]
2022-05-20 18:34 ` [PATCH 02/10] platform/surface: aggregator: Allow notifiers to avoid communication on unregistering Maximilian Luz
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=20220520183422.7185-1-luzmaximilian@gmail.com \
--to=luzmaximilian@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=corbet@lwn.net \
--cc=hdegoede@redhat.com \
--cc=jikos@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=markgross@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=sre@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).