mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Luke D. Jones" <luke@ljones.dev>
To: platform-driver-x86@vger.kernel.org
Cc: corentin.chary@gmail.com, hdegoede@redhat.com,
	ilpo.jarvinen@linux.intel.com, mario.limonciello@amd.com,
	linux-kernel@vger.kernel.org, "Luke D. Jones" <luke@ljones.dev>
Subject: [PATCH 0/5] platform/x86: introduce asus-bioscfg
Date: Tue, 16 Jul 2024 17:16:07 +1200	[thread overview]
Message-ID: <20240716051612.64842-1-luke@ljones.dev> (raw)

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/371d4109-a3bb-4c3b-802f-4ec27a945c99@amd.com/

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

-- 
2.45.2


             reply	other threads:[~2024-07-16  5:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-16  5:16 Luke D. Jones [this message]
2024-07-16  5:16 ` [PATCH 1/5] platform/x86 asus-bioscfg: move existing tunings to asus-bioscfg module Luke D. Jones
2024-07-16  9:45   ` Ilpo Järvinen
2024-07-16 10:41     ` Luke Jones
2024-07-16 11:06       ` Ilpo Järvinen
2024-07-16  9:50   ` Hans de Goede
2024-07-16 10:48     ` Luke Jones
2024-07-16  5:16 ` [PATCH 2/5] platform/x86: asus-bioscfg: add dgpu tgp control Luke D. Jones
2024-08-21 21:18   ` Mario Limonciello
2024-07-16  5:16 ` [PATCH 3/5] platform/x86: asus-bioscfg: add apu-mem control support Luke D. Jones
2024-07-16  5:16 ` [PATCH 4/5] platform/x86: asus-bios: add core count control Luke D. Jones
2024-07-16  9:25   ` Hans de Goede
2024-07-16  9:41     ` Luke Jones
2024-07-16  9:43       ` Luke Jones
2024-07-16  5:16 ` [PATCH 5/5] asus-wmi: deprecate bios features Luke D. Jones
2024-07-16  9:20 ` [PATCH 0/5] platform/x86: introduce asus-bioscfg Hans de Goede
2024-07-16 15:11   ` Ilpo Järvinen
2024-07-17  2:34     ` Luke Jones
2024-08-05 15:18       ` Hans de Goede
2024-08-05 21:41         ` Luke Jones
2024-08-06  9:34           ` Hans de Goede
2024-08-21 21:16             ` Mario Limonciello

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=20240716051612.64842-1-luke@ljones.dev \
    --to=luke@ljones.dev \
    --cc=corentin.chary@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=platform-driver-x86@vger.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

all inboxes | Powered by JetHome®