Skip to content

platform/x86: introduce asus-bioscfg

Luke D. Jones lkml platform-driver-x86 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5platform/x86 asus-bioscfg: move existing tunings to asus-bioscfg moduledrivers/platform/x86/Kconfig drivers/platform/x86/Makefile drivers/platform/x86/asus-bioscfg.c +3 more+952 -15 replies
2/5platform/x86: asus-bioscfg: add dgpu tgp controldrivers/platform/x86/asus-bioscfg.c drivers/platform/x86/asus-bioscfg.h include/linux/platform_data/x86/asus-wmi.h+42 -01 reply
3/5platform/x86: asus-bioscfg: add apu-mem control supportdrivers/platform/x86/asus-bioscfg.c include/linux/platform_data/x86/asus-wmi.h+117 -00 replies
4/5platform/x86: asus-bios: add core count controldrivers/platform/x86/asus-bioscfg.c drivers/platform/x86/asus-bioscfg.h include/linux/platform_data/x86/asus-wmi.h+239 -03 replies
5/5asus-wmi: deprecate bios featuresDocumentation/ABI/testing/sysfs-platform-asus-wmi drivers/platform/x86/Kconfig drivers/platform/x86/asus-wmi.c+123 -280 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] platform/x86: introduce asus-bioscfg

This is the first major patch I've ever done with the intention of introducing a new module, so it's highly likely I've made some mistakes or misunderstood something.

TL;DR:
1. introduce new module to contain bios attributes, using fw_attributes_class
2. deprecate all possible attributes from asus-wmi that were added ad-hoc
3. remove those in the next LTS cycle

The idea for this originates from a conversation with Mario Limonciello
https://lore.kernel.org/platform-driver-x86/[email protected]/

It is without a doubt much cleaner to use, easier to discover, and the API is well defined as opposed to the random clutter of attributes I had been placing in the platform sysfs.

The review of this patch series will also affect my next patch set which is for the ROG Ally (2k LOC) as I've used a similar strategy for the macros to reduce LOC as much as possible.

In regards to *this* patch series though, I think the critical areas might be the use of the mutex, the macros, possibly the way I've setup the module to load/depend on asus-wmi (I had to read other code to try and define the way).

I am unsure of how best to handle the deprecation of attributes.

There's also some attributes that are obviously boolean but are using 0/1. I'm unsure if I should change that.

And would it be best to move the asus stuff to a subdir now? Akin to the Dell platform stuff.

All guidance deeply appreciated to get this over the line.

Regards,
Luke

Luke D. Jones (5):
platform/x86 asus-bioscfg: move existing tunings to asus-bioscfg
module
platform/x86: asus-bioscfg: add dgpu tgp control platform/x86: asus-bioscfg: add apu-mem control support platform/x86: asus-bios: add core count control
asus-wmi: deprecate bios features

 .../ABI/testing/sysfs-platform-asus-wmi       |  17 +
 drivers/platform/x86/Kconfig                  |  22 +
 drivers/platform/x86/Makefile                 |   1 +
 drivers/platform/x86/asus-bioscfg.c           | 997 ++++++++++++++++++
 drivers/platform/x86/asus-bioscfg.h           | 302 ++++++
 drivers/platform/x86/asus-wmi.c               | 144 ++-
 include/linux/platform_data/x86/asus-wmi.h    |  19 +
 7 files changed, 1473 insertions(+), 29 deletions(-)
 create mode 100644 drivers/platform/x86/asus-bioscfg.c
 create mode 100644 drivers/platform/x86/asus-bioscfg.h
Signature · 1 line
2.45.2