From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Kurt Borja <kuurtb@gmail.com>
Cc: platform-driver-x86@vger.kernel.org,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>,
linux-acpi@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
Mario Limonciello <mario.limonciello@amd.com>,
Armin Wolf <W_Armin@gmx.de>,
Joshua Grisham <josh@joshuagrisham.com>,
"Derek J. Clark" <derekjohn.clark@gmail.com>,
Hans de Goede <hdegoede@redhat.com>,
Maximilian Luz <luzmaximilian@gmail.com>,
"Lee, Chun-Yi" <jlee@suse.com>,
Shyam Sundar S K <Shyam-sundar.S-k@amd.com>,
Corentin Chary <corentin.chary@gmail.com>,
"Luke D. Jones" <luke@ljones.dev>,
Lyndon Sanche <lsanche@lyndeno.ca>,
Ike Panhc <ike.pan@canonical.com>,
Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
Mark Pearson <mpearson-lenovo@squebb.ca>,
Alexis Belmonte <alexbelm48@gmail.com>,
Ai Chao <aichao@kylinos.cn>, Gergo Koteles <soyer@irl.hu>,
Dell.Client.Kernel@dell.com,
ibm-acpi-devel@lists.sourceforge.net
Subject: Re: [PATCH v4 00/19] Hide platform_profile_handler from consumers
Date: Thu, 16 Jan 2025 18:09:49 +0200 (EET) [thread overview]
Message-ID: <a5f7d82f-23a7-8e6a-9e68-9f302cf177d7@linux.intel.com> (raw)
In-Reply-To: <20250116002721.75592-1-kuurtb@gmail.com>
On Wed, 15 Jan 2025, Kurt Borja wrote:
> The merge window is about to open, so I rebased this patchset on top of
> pdx86/review-ilpo-next to pick up acer-wmi latest commits, in case we
> manage to squeeze this into v6.14.
Hi all,
I was hoping to finish this in this cycle since it has been so close and
has only required minor tweaks recently.
I went to review the changes once again and ended up applying this now
into the review-ilpo-next branch. Thank you all who worked on to improve
this series! :-)
There were minor nits, however, I hadto address while applying. I added
the justification into 5/19 commit message and changed a few trivial
things in the code. Please check that the diff compared with your series
w/o any modifications makes sense:
diff --git a/Documentation/ABI/testing/sysfs-class-platform-profile b/Documentation/ABI/testing/sysfs-class-platform-profile
index b5a3600080bc..dc72adfb830a 100644
--- a/Documentation/ABI/testing/sysfs-class-platform-profile
+++ b/Documentation/ABI/testing/sysfs-class-platform-profile
@@ -1,12 +1,15 @@
What: /sys/class/platform-profile/platform-profile-X/name
-Date: January 2025
+Date: March 2025
+KernelVersion: 6.14
Description: Name of the class device given by the driver.
RO
What: /sys/class/platform-profile/platform-profile-X/choices
-Date: January 2025
-Description: This file contains a space-separated list of profiles supported for this device.
+Date: March 2025
+KernelVersion: 6.14
+Description: This file contains a space-separated list of profiles supported
+ for this device.
Drivers must use the following standard profile-names:
@@ -26,7 +29,8 @@ Description: This file contains a space-separated list of profiles supported for
RO
What: /sys/class/platform-profile/platform-profile-X/profile
-Date: January 2025
+Date: March 2025
+KernelVersion: 6.14
Description: Reading this file gives the current selected profile for this
device. Writing this file with one of the strings from
platform_profile_choices changes the profile to the new value.
diff --git a/drivers/acpi/platform_profile.c b/drivers/acpi/platform_profile.c
index c9e46b6e27da..fc92e43d0fe9 100644
--- a/drivers/acpi/platform_profile.c
+++ b/drivers/acpi/platform_profile.c
@@ -540,7 +540,7 @@ struct device *platform_profile_register(struct device *dev, const char *name,
pprof->dev.parent = dev;
dev_set_drvdata(&pprof->dev, drvdata);
dev_set_name(&pprof->dev, "platform-profile-%d", pprof->minor);
- /* device_register() takes ownership of ppdev */
+ /* device_register() takes ownership of pprof/ppdev */
ppdev = &no_free_ptr(pprof)->dev;
err = device_register(ppdev);
if (err) {
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 9a485f777591..1032c0e84e3d 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -3894,7 +3894,7 @@ static int platform_profile_setup(struct asus_wmi *asus)
asus->ppdev = devm_platform_profile_register(dev, "asus-wmi", asus,
&asus_wmi_platform_profile_ops);
if (IS_ERR(asus->ppdev)) {
- dev_err(dev, "Failed to register a platform_profile class device");
+ dev_err(dev, "Failed to register a platform_profile class device\n");
return PTR_ERR(asus->ppdev);
}
diff --git a/drivers/platform/x86/dell/dell-pc.c b/drivers/platform/x86/dell/dell-pc.c
index 1874d4adfb8a..483240bb36e7 100644
--- a/drivers/platform/x86/dell/dell-pc.c
+++ b/drivers/platform/x86/dell/dell-pc.c
@@ -270,17 +270,16 @@ static int thermal_init(void)
if (IS_ERR(platform_device))
return PTR_ERR(platform_device);
- /* Clean up if failed */
ppdev = devm_platform_profile_register(&platform_device->dev, "dell-pc",
NULL, &dell_pc_platform_profile_ops);
if (IS_ERR(ppdev)) {
ret = PTR_ERR(ppdev);
- goto cleanup_thermal_handler;
+ goto cleanup_platform_device;
}
return 0;
-cleanup_thermal_handler:
+cleanup_platform_device:
platform_device_unregister(platform_device);
return ret;
>
> ~ Kurt
> ---
> v3 -> v4:
>
> [09/19]
> - Replace error message with a user-friendly one
>
> v3: https://lore.kernel.org/platform-driver-x86/20250115071022.4815-1-kuurtb@gmail.com/
>
> Kurt Borja (19):
> ACPI: platform_profile: Replace *class_dev member with class_dev
> ACPI: platform_profile: Let drivers set drvdata to the class device
> ACPI: platform_profile: Remove platform_profile_handler from callbacks
> ACPI: platform_profile: Add `ops` member to handlers
> ACPI: platform_profile: Add `probe` to platform_profile_ops
> platform/surface: surface_platform_profile: Use
> devm_platform_profile_register()
> platform/x86: acer-wmi: Use devm_platform_profile_register()
> platform/x86: amd: pmf: sps: Use devm_platform_profile_register()
> platform/x86: asus-wmi: Use devm_platform_profile_register()
> platform/x86: dell-pc: Use devm_platform_profile_register()
> platform/x86: ideapad-laptop: Use devm_platform_profile_register()
> platform/x86: hp-wmi: Use devm_platform_profile_register()
> platform/x86: inspur_platform_profile: Use
> devm_platform_profile_register()
> platform/x86: thinkpad_acpi: Use devm_platform_profile_register()
> ACPI: platform_profile: Remove platform_profile_handler from exported
> symbols
> ACPI: platform_profile: Move platform_profile_handler
> ACPI: platform_profile: Clean platform_profile_handler
> ACPI: platform_profile: Add documentation
> ACPI: platform_profile: Add a prefix to log messages
>
> .../ABI/testing/sysfs-class-platform-profile | 44 +++++
> drivers/acpi/platform_profile.c | 172 +++++++++++++-----
> .../surface/surface_platform_profile.c | 48 ++---
> drivers/platform/x86/acer-wmi.c | 114 ++++++------
> drivers/platform/x86/amd/pmf/core.c | 1 -
> drivers/platform/x86/amd/pmf/pmf.h | 3 +-
> drivers/platform/x86/amd/pmf/sps.c | 51 +++---
> drivers/platform/x86/asus-wmi.c | 55 +++---
> drivers/platform/x86/dell/alienware-wmi.c | 34 ++--
> drivers/platform/x86/dell/dell-pc.c | 60 +++---
> drivers/platform/x86/hp/hp-wmi.c | 83 +++++----
> drivers/platform/x86/ideapad-laptop.c | 45 +++--
> .../platform/x86/inspur_platform_profile.c | 48 +++--
> drivers/platform/x86/thinkpad_acpi.c | 37 ++--
> include/linux/platform_profile.h | 37 ++--
> 15 files changed, 495 insertions(+), 337 deletions(-)
> create mode 100644 Documentation/ABI/testing/sysfs-class-platform-profile
>
>
> base-commit: d98bf6a6ed61a8047e199495b0887cce392f8e5b
>
--
i.
next prev parent reply other threads:[~2025-01-16 16:10 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-16 0:27 [PATCH v4 00/19] Hide platform_profile_handler from consumers Kurt Borja
2025-01-16 0:27 ` [PATCH v4 01/19] ACPI: platform_profile: Replace *class_dev member with class_dev Kurt Borja
2025-01-16 0:27 ` [PATCH v4 02/19] ACPI: platform_profile: Let drivers set drvdata to the class device Kurt Borja
2025-01-19 14:55 ` Maximilian Luz
2025-01-16 0:27 ` [PATCH v4 03/19] ACPI: platform_profile: Remove platform_profile_handler from callbacks Kurt Borja
2025-01-19 14:57 ` Maximilian Luz
2025-01-16 0:27 ` [PATCH v4 04/19] ACPI: platform_profile: Add `ops` member to handlers Kurt Borja
2025-01-19 14:58 ` Maximilian Luz
2025-01-16 0:27 ` [PATCH v4 05/19] ACPI: platform_profile: Add `probe` to platform_profile_ops Kurt Borja
2025-01-19 15:00 ` Maximilian Luz
2025-01-16 0:27 ` [PATCH v4 06/19] platform/surface: surface_platform_profile: Use devm_platform_profile_register() Kurt Borja
2025-01-19 15:01 ` Maximilian Luz
2025-01-16 0:27 ` [PATCH v4 07/19] platform/x86: acer-wmi: " Kurt Borja
2025-01-16 0:27 ` [PATCH v4 08/19] platform/x86: amd: pmf: sps: " Kurt Borja
2025-01-16 0:27 ` [PATCH v4 09/19] platform/x86: asus-wmi: " Kurt Borja
2025-01-16 0:27 ` [PATCH v4 10/19] platform/x86: dell-pc: " Kurt Borja
2025-01-16 0:27 ` [PATCH v4 11/19] platform/x86: ideapad-laptop: " Kurt Borja
2025-01-16 0:27 ` [PATCH v4 12/19] platform/x86: hp-wmi: " Kurt Borja
2025-01-16 0:27 ` [PATCH v4 13/19] platform/x86: inspur_platform_profile: " Kurt Borja
2025-01-16 0:27 ` [PATCH v4 14/19] platform/x86: thinkpad_acpi: " Kurt Borja
2025-01-16 0:27 ` [PATCH v4 15/19] ACPI: platform_profile: Remove platform_profile_handler from exported symbols Kurt Borja
2025-01-19 15:04 ` Maximilian Luz
2025-01-16 0:27 ` [PATCH v4 16/19] ACPI: platform_profile: Move platform_profile_handler Kurt Borja
2025-01-16 0:27 ` [PATCH v4 17/19] ACPI: platform_profile: Clean platform_profile_handler Kurt Borja
2025-01-16 0:27 ` [PATCH v4 18/19] ACPI: platform_profile: Add documentation Kurt Borja
2025-01-16 0:27 ` [PATCH v4 19/19] ACPI: platform_profile: Add a prefix to log messages Kurt Borja
2025-01-16 16:09 ` Ilpo Järvinen [this message]
2025-01-17 4:16 ` [PATCH v4 00/19] Hide platform_profile_handler from consumers Kurt Borja
2025-01-16 22:20 ` Mark Pearson
2025-01-17 4:27 ` Kurt Borja
2025-01-17 16:42 ` Ilpo Järvinen
2025-01-17 17:13 ` Kurt Borja
2025-01-17 17:19 ` Ilpo Järvinen
2025-01-17 20:45 ` Mark Pearson
2025-01-18 1:33 ` Mark Pearson
2025-01-18 7:16 ` Kurt Borja
2025-01-20 12:28 ` Ilpo Järvinen
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=a5f7d82f-23a7-8e6a-9e68-9f302cf177d7@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=Dell.Client.Kernel@dell.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=W_Armin@gmx.de \
--cc=aichao@kylinos.cn \
--cc=alexbelm48@gmail.com \
--cc=corentin.chary@gmail.com \
--cc=derekjohn.clark@gmail.com \
--cc=hdegoede@redhat.com \
--cc=hmh@hmh.eng.br \
--cc=ibm-acpi-devel@lists.sourceforge.net \
--cc=ike.pan@canonical.com \
--cc=jlee@suse.com \
--cc=josh@joshuagrisham.com \
--cc=kuurtb@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lsanche@lyndeno.ca \
--cc=luke@ljones.dev \
--cc=luzmaximilian@gmail.com \
--cc=mario.limonciello@amd.com \
--cc=mpearson-lenovo@squebb.ca \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=soyer@irl.hu \
/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