Skip to content

platform/x86: ideapad-laptop: synchronize VPC commands

Gergo Koteles lkml platform-driver-x86 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 4 repliesIn review
  2. v34 patches 0 repliesSuperseded
  3. v24 patches 5 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v14 patches3 repliesSuperseded

Changes in v4 from the cover letter

- Handle the return value of devm_mutex_init
- Link to v3: https://lore.kernel.org/all/[email protected]/

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4platform/x86: ideapad-laptop: introduce a generic notification chaindrivers/platform/x86/ideapad-laptop.c drivers/platform/x86/ideapad-laptop.h+42 -00 replies
2/4platform/x86: ideapad-laptop: move ymc_trigger_ec from lenovo-ymcdrivers/platform/x86/Kconfig drivers/platform/x86/ideapad-laptop.c drivers/platform/x86/ideapad-laptop.h +1 more+56 -580 replies
3/4platform/x86: ideapad-laptop: move ACPI helpers from header to source filedrivers/platform/x86/ideapad-laptop.c drivers/platform/x86/ideapad-laptop.h+136 -1391 reply
4/4platform/x86: ideapad-laptop: add a mutex to synchronize VPC commandsdrivers/platform/x86/ideapad-laptop.c+47 -173 replies

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchIlpo Järvinen
1/4
2/4R-b
3/4R-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/4] platform/x86: ideapad-laptop: synchronize VPC commands

Hi,

Sometimes the Yoga mode control switch did not work properly on my laptop, and sometimes even caused a platform profile switch. It turned out that it was caused by a race situation, the lenovo-ymc wmi notify handler was running at the same time as the ideapad-laptop acpi notify handler, and the partial results of the VPC calls in the two were mixed up.

This series introduces a notification chain to receive YMC or other events, moves the EC triggering into ideapad-laptop, and then introduces a mutex to eliminate the problem.

Best regards,
Gergo Koteles

---
Changes in v4:
- Handle the return value of devm_mutex_init
- Link to v3: https://lore.kernel.org/all/[email protected]/

Changes in v3:
- Use devm_mutex_init for vpc_mutex
- Link to v2: https://lore.kernel.org/all/[email protected]/

Changes in v2:
- Skip the already merged "platform/x86: ideapad-laptop: use cleanup.h" commit
- Based on the WMI driver development guide and the dell drivers, introduce a generic notification chain
- Use the notification chain to send the YMC event from lenovo-ymc to the ideapad-laptop module
- Move the ec_trigger module parameter to the ideapad-laptop as well
- Mutex changes go into one patch
- Link to v1: https://lore.kernel.org/all/[email protected]/
---

Gergo Koteles (4):
platform/x86: ideapad-laptop: introduce a generic notification chain platform/x86: ideapad-laptop: move ymc_trigger_ec from lenovo-ymc platform/x86: ideapad-laptop: move ACPI helpers from header to source
file
platform/x86: ideapad-laptop: add a mutex to synchronize VPC commands

 drivers/platform/x86/Kconfig          |   1 +
 drivers/platform/x86/ideapad-laptop.c | 284 ++++++++++++++++++++++++--
 drivers/platform/x86/ideapad-laptop.h | 142 +------------
 drivers/platform/x86/lenovo-ymc.c     |  60 +-----
 4 files changed, 277 insertions(+), 210 deletions(-)
Signature · 1 line
2.45.2