All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: "Hans de Goede" <hdegoede@redhat.com>,
	"Thomas Weißschuh" <linux@weissschuh.net>
Cc: platform-driver-x86@vger.kernel.org,
	"Mark Gross" <mgross@linux.intel.com>,
	linux-kernel@vger.kernel.org,
	"Barnabás Pőcze" <pobrn@protonmail.com>,
	"Matthew Garrett" <mjg59@srcf.ucam.org>
Subject: Re: [PATCH v2] platform/x86: add Gigabyte WMI temperature driver
Date: Fri, 9 Apr 2021 23:40:00 -0700	[thread overview]
Message-ID: <d9e42e20-7044-f96a-9542-5aafec2a7a12@roeck-us.net> (raw)
In-Reply-To: <245fe6eb-b188-ee50-bf75-8a16fe8f5d67@redhat.com>

On 4/8/21 9:07 AM, Hans de Goede wrote:
> Hi Guenter,
> 
> On 4/8/21 5:08 PM, Guenter Roeck wrote:
>> On Mon, Apr 05, 2021 at 10:48:10PM +0200, Thomas Weißschuh wrote:
>>> Changes since v1:
>>> * Incorporate feedback from Barnabás Pőcze
>>>   * Use a WMI driver instead of a platform driver
>>>   * Let the kernel manage the driver lifecycle
>>>   * Fix errno/ACPI error confusion
>>>   * Fix resource cleanup
>>>   * Document reason for integer casting
>>>
>>> Thank you Barnabás for your review, it is much appreciated.
>>>
>>> -- >8 --
>>>
>>> Tested with a X570 I Aorus Pro Wifi.
>>> The mainboard contains an ITE IT8688E chip for management.
>>> This chips is also handled by drivers/hwmon/i87.c but as it is also used
>>> by the firmware itself it needs an ACPI driver.
>>>
>>> Unfortunately not all sensor registers are handled by the firmware and even
>>> less are exposed via WMI.
>>>
>>> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
>>> ---
>>>  drivers/platform/x86/Kconfig        |  11 +++
>>>  drivers/platform/x86/Makefile       |   1 +
>>>  drivers/platform/x86/gigabyte-wmi.c | 138 ++++++++++++++++++++++++++++
>>
>> Originally drivers/platform was supposed to be used for platform specific
>> code. Not that I have control over it, but I really dislike that more and
>> more hwmon drivers end up there.
>>
>> At least hwmon is in good company - I see drivers for various other subsystems
>> there as well. I just wonder if that is such a good idea. That entire directory
>> is bypassing subsystem maintainer reviews.
> 
> In case you are not aware I've recent(ish) taken over the drivers/platform/x86
> maintainership from Andy Shevchenko.
> 
> Yes it is a bit of an odd grab-bag it mostly deals with vendor specific
> ACPI / WMI interfaces which often more or less require using a single
> driver while offering multiple functionalities. These firmware interfaces
> do not really lend themselves to demultiplexing through something like
> MFD. These are mostly found on laptops where they deal with some or all of:
> 
> - Hotkeys for brightness adjust / wlan-on/off toggle, touchpad on/off toggle, etc.
>   (input subsystem stuff)
> - Mic. / Speaker mute LEDS (and other special LEDs) found on some laptops
>   (LED subsystem stuff)
> - Enabling/disabling radios
>   (rfkill stuff)
> - Controlling the DPTF performance profile
>   (ACPI stuff)
> - Various sensors, some hwmon, some IIO
> - Backlight control (drm/kms subsys)
> - Enabling/disabling of LCD-builtin privacy filters (requires KMS/DRM subsys integration, pending)
> - Fan control (hwmon subsys)
> 
> And often all of this in a single driver. This is all "stuff" for which
> there are no standard APIs shared between vendors, so it is a free for
> all and often it is all stuffed behind a single WMI or ACPI object,
> because that is how the vendor's drivers under Windows work.
> 
> It certainly is not my intention to bypass review by other subsystem
> maintainers and when there are significant questions I do try to always
> get other subsys maintainers involved. See e.g. this thread, but also the
> "[PATCH 1/3] thinkpad_acpi: add support for force_discharge" thread
> where I asked for input from sre for the power-supply aspects of that.
> 
> The WMI code was reworked a while back to make WMI be a bus and have
> individual WMI objects be devices on that bus. version 2 of this
> driver has been reworked to use this. Since this new driver is just a hwmon
> driver and as this is for a desktop I expect it will stay that way,
> I'm fine with moving this one over to drivers/hwmon if that has your
> preference.
> 
I thought about it, but I don't think it makes much sense since all other
WMI drivers are in drivers/platform.

> As for other cases then this driver, if you want to make sure you are at
> least Cc-ed on all hwmon related changes I'm fine with adding you as a
> reviewer to the pdx86 MAINTAINERS entry.
> 
I think I have a better idea: I'll add a regex pattern into the MAINTAINERS
entry for hardware monitoring drivers. This way we should get copied whenever
anyone adds a hardware monitoring driver into the tree.

Thanks,
Guenter

      reply	other threads:[~2021-04-10  6:40 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-05 13:20 [PATCH] platform/x86: add Gigabyte WMI temperature driver Thomas Weißschuh
2021-04-05 17:13 ` Barnabás Pőcze
2021-04-05 20:48   ` [PATCH v2] " Thomas Weißschuh
2021-04-07 15:54     ` Hans de Goede
2021-04-07 19:43       ` Thomas Weißschuh
2021-04-08  9:36         ` Hans de Goede
2021-04-08 14:54           ` Thomas Weißschuh
2021-04-08 15:00           ` Guenter Roeck
2021-04-09  6:02             ` Thomas Weißschuh
2021-04-10  6:56               ` Guenter Roeck
2021-04-10 14:21                 ` Hans de Goede
2021-04-10 14:40                   ` [PATCH v3] " Thomas Weißschuh
2021-04-10 14:57                     ` Hans de Goede
2021-04-10 15:21                       ` Guenter Roeck
2021-04-10 15:15                     ` Guenter Roeck
2021-04-10 15:23                       ` Hans de Goede
2021-04-10 18:18                         ` [PATCH v4] " Thomas Weißschuh
2021-04-11  0:58                           ` Guenter Roeck
2021-04-11 14:05                           ` Barnabás Pőcze
2021-04-12 12:35                           ` [PATCH v5] " Thomas Weißschuh
2021-04-13  8:14                             ` Hans de Goede
2021-04-07 18:27     ` [PATCH v2] " Barnabás Pőcze
2021-04-08 14:39       ` Thomas Weißschuh
2021-04-08 15:08     ` Guenter Roeck
2021-04-08 16:07       ` Hans de Goede
2021-04-10  6:40         ` Guenter Roeck [this message]

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=d9e42e20-7044-f96a-9542-5aafec2a7a12@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=mgross@linux.intel.com \
    --cc=mjg59@srcf.ucam.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=pobrn@protonmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.