[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 10 Oct 2021 06:38:42 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Thomas Weißschuh <thomas@...ch.de>,
Denis Pauk <pauk.denis@...il.com>
Cc: eugene.shalygin@...il.com, andy.shevchenko@...il.com,
Ed Brindley <kernel@...davale.org>,
Jean Delvare <jdelvare@...e.com>,
Jonathan Corbet <corbet@....net>, linux-hwmon@...r.kernel.org,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/2] hwmon: (asus_wmi_sensors) Support X370 Asus WMI.
On 10/10/21 3:20 AM, Thomas Weißschuh wrote:
> Hi,
>
> for WMI drivers the list platform-driver-x86@...r.kernel.org should probably be
> on CC too.
> Also all other WMI drivers, even for hwmon stuff are located in
> drivers/platform/x86 so it may be better to put it there, too.
>
Not really. If any of those other drivers are pure hwmon drivers, they
should reside in drivers/hwmon instead. And, yes, that really includes
the gigabyte-wmi driver. We don't have arbitrary drivers in drivers/pci
either just because they are drivers for pci devices.
Guenter
> One comment inline.
>
> On 2021-10-10T12:52+0300, Denis Pauk wrote:
>> +static struct platform_driver asus_wmi_sensors_platform_driver = {
>> + .driver = {
>> + .name = "asus-wmi-sensors",
>> + },
>> + .probe = asus_wmi_probe,
>> +};
>> +
>> +static struct platform_device *sensors_pdev;
>> +
>> +static int __init asus_wmi_init(void)
>> +{
>> + if (!dmi_check_system(asus_wmi_dmi_table))
>> + return -ENODEV;
>> +
>> + sensors_pdev = platform_create_bundle(&asus_wmi_sensors_platform_driver,
>> + asus_wmi_probe,
>> + NULL, 0,
>> + NULL, 0);
>> +
>> + return PTR_ERR_OR_ZERO(sensors_pdev);
>> +}
>> +module_init(asus_wmi_init);
>> +
>> +static void __exit asus_wmi_exit(void)
>> +{
>> + platform_device_unregister(sensors_pdev);
>> + platform_driver_unregister(&asus_wmi_sensors_platform_driver);
>> +}
>> +module_exit(asus_wmi_exit);
>
> This should bind to the WMI bus instead of being a platform device.
> See drivers/platform/x86/gigabyte-wmi.c
>
> (Some goes also for the other driver)
>
> Thomas
>
Powered by blists - more mailing lists