mbox series

[v3,0/2] hwmon: (nct6775) Support access via Asus WMI

Message ID 20210912110557.41346-1-pauk.denis@gmail.com (mailing list archive)
Headers show
Series hwmon: (nct6775) Support access via Asus WMI | expand

Message

Denis Pauk Sept. 12, 2021, 11:05 a.m. UTC
Support accessing the NCT677x via Asus WMI functions.

On mainboards that support this way of accessing the chip,
the driver will usually not work without this option since
in these mainboards, ACPI will mark the I/O port as used.

@Andy Shevchenko, I have left type of sioreg, in other places
sioreg has same integer type, should I change all occurrences
of usage?
@Guenter Roeck, I have left nct6775_*_set_back() call without
changes as its always called from platform specific callbacks.

Could you please review?

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204807
Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
Co-developed-by: Bernhard Seibold <mail@bernhard-seibold.de>
Signed-off-by: Bernhard Seibold <mail@bernhard-seibold.de>
Tested-by: Pär Ekholm <pehlm@pekholm.org>
Tested-by: <to.eivind@gmail.com>
Tested-by: Artem S. Tashkinov <aros@gmx.com>
Tested-by: Vittorio Roberto Alfieri <me@rebtoor.com>
Tested-by: Sahan Fernando <sahan.h.fernando@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: Guenter Roeck <linux@roeck-us.net>

---
Changes in v3:
  - Remove unrequired type conversions.
  - Make function declarations one line.
  - Use nct6775 function pointers in struct nct6775_data instead direct calls.

Changes in v2:
  - Split changes to separate patches.
  - Limit WMI usage by DMI_BOARD_NAME in checked ASUS motherboards.
  - Rearrange code for directly use struct nct6775_sio_data in superio_*()
    functions.


Denis Pauk (2):
  hwmon: (nct6775) Use sio_data in superio_*().
  hwmon: (nct6775) Support access via Asus WMI

 drivers/hwmon/nct6775.c | 687 ++++++++++++++++++++++++++--------------
 1 file changed, 450 insertions(+), 237 deletions(-)

Comments

Andy Shevchenko Sept. 12, 2021, 3:14 p.m. UTC | #1
On Sun, Sep 12, 2021 at 02:05:55PM +0300, Denis Pauk wrote:
> Support accessing the NCT677x via Asus WMI functions.
> 
> On mainboards that support this way of accessing the chip,
> the driver will usually not work without this option since
> in these mainboards, ACPI will mark the I/O port as used.
> 
> @Andy Shevchenko, I have left type of sioreg, in other places
> sioreg has same integer type, should I change all occurrences
> of usage?
> @Guenter Roeck, I have left nct6775_*_set_back() call without
> changes as its always called from platform specific callbacks.
> 
> Could you please review?
> 
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204807
> Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
> Co-developed-by: Bernhard Seibold <mail@bernhard-seibold.de>
> Signed-off-by: Bernhard Seibold <mail@bernhard-seibold.de>
> Tested-by: Pär Ekholm <pehlm@pekholm.org>
> Tested-by: <to.eivind@gmail.com>
> Tested-by: Artem S. Tashkinov <aros@gmx.com>
> Tested-by: Vittorio Roberto Alfieri <me@rebtoor.com>
> Tested-by: Sahan Fernando <sahan.h.fernando@gmail.com>

This should go to the actual patch that makes it work (preparatory patches may
or may not have all above be listed).

As kbuild bot rightfully noted, the series has to be bisectable.

Compile time bisectability means: each patch should compile incrementally.
And run-time bisectability means: the device should work with each patch
applied incrementally.

I.o.w. you have to compile and boot kernel as many times as patches in your
series + 1 (the clean build of the base).