[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 10 Oct 2021 12:20:52 +0200
From: Thomas Weißschuh <thomas@...ch.de>
To: 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>,
Guenter Roeck <linux@...ck-us.net>,
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.
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.
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