mbox series

[v11,0/2] Update ASUS WMI supported boards

Message ID 20211115210842.11972-1-pauk.denis@gmail.com (mailing list archive)
Headers show
Series Update ASUS WMI supported boards | expand

Message

Denis Pauk Nov. 15, 2021, 9:08 p.m. UTC
Add support by WMI interface provided by Asus for B550/X570 boards: 
* PRIME X570-PRO,
* ROG CROSSHAIR VIII HERO
* ROG CROSSHAIR VIII DARK HERO
* ROG CROSSHAIR VIII FORMULA
* ROG STRIX X570-E GAMING
* ROG STRIX B550-I GAMING
* ROG STRIX B550-E GAMING

Add support by WMI interface provided by Asus for X370/X470/
B450/X399 boards:
* ROG CROSSHAIR VI HERO,
* PRIME X399-A,
* PRIME X470-PRO,
* ROG CROSSHAIR VI EXTREME,
* ROG CROSSHAIR VI HERO (WI-FI AC),
* ROG CROSSHAIR VII HERO,
* ROG CROSSHAIR VII HERO (WI-FI),
* ROG STRIX Z390-F GAMING
* ROG STRIX B450-E GAMING,
* ROG STRIX B450-F GAMING,
* ROG STRIX B450-I GAMING,
* ROG STRIX X399-E GAMING,
* ROG STRIX X470-F GAMING,
* ROG STRIX X470-I GAMING,
* ROG ZENITH EXTREME,
* ROG ZENITH EXTREME ALPHA.

I have added "ROG STRIX Z390-F GAMING" to list of supported boards in 
asus_wmi_sensors.

Could you please review?

Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
Signed-off-by: Ed Brindley <kernel@maidavale.org>
Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

---
Changes in v11:
- Add "ROG STRIX Z390-F GAMING" to list of supported boards in 
  asus_wmi_sensors.

Changes in v10:
- Use long for sensor values.
- Remove unrequired linux/hwmon-sysfs.h
- Add "ROG STRIX B550-I GAMING" board support in asus_wmi_ec_sensors.
- Change code style in error status return.
- Remove unuses wmi.buffer and fix type of source in asus_wmi_sensors.

Changes in v9:
- Fix memory leaks in asus_wmi_ec_block_read()
- Fix buffer and parameter lengths in decode and encode algorithms
- Simplify encoding in read query
- Reshuffle structures to make pointer arithmetics simpler or
  no-op in some cases
- Shuffle parameters in some functions to make it more logical
- Use temporary variable for EC info data structure
- Many indentation fixes to improve readability (breaks 80 characters rule)
- Fix memory leaks in asus_wmi_sensors:asus_wmi_*().

Changes in v8:
- Add seprate patch for ProArt X570-CREATOR WIFI support.
- Fix codestyle in defines and comments.
- Fix buffer length calculation.
- Use hex2bin/bin2hex for convert values in buffers.
- Remove unrequired acpi_os_free usage.
- Call mutex_lock inside of functions.

Changes in v7:
- Use  for directly get sensors list by board.
- Add depends on ACPI_WMI to Kconfig.
- Add response buffer size check in asus_wmi_ec_decode_reply_buffer.
- Clean up defines names.

Changes in v6:
- asus_wmi_ec_sensors: Generate query for all sensors on sensors setup
- asus_wmi_ec_sensors: Move binary to sensor value logic to separate 
  get_sensor_value (by Eugene Shalygin)
- asus_wmi_ec_sensors: Use acpi_os_free without NULL pointer check.
- Add asus_wmi_sensor to documentation index.
- Add asus_wmi_ec_sensor to documentation index.

Changes in v5:
- Fixes build issue reported by kernel test robot with disabled ACPI_WMI.
- asus_wmi_sensors: Remove sensor->name check as always evaluated to true.

Changes in v4:
 - Implement wmi driver instead platform driver.
 - Update documentation with known issues.

Changes in v3:
 - Use MODULE_DEVICE_TABLE for match devices.
 - asus_wmi_ec_sensors: Use get_unaligned_be32 instead incorrectly used 
   get_unaligned_le32.
 - Add documentaion for drivers.

Changes in v2:
 - asus_wmi_ec_sensors: Rename asus_wmi_sensors to asus_wmi_ec_sensors for 
   B550/X570 boards.
 - asus_wmi_ec_sensors: Use utf8s_to_utf16s/utf16s_to_utf8s instead handmade 
   fuctions.
 - asus_wmi_ec_sensors: Use post increment.
 - asus_wmi_ec_sensors: Use get_unaligned* for convert values.
 - asus_wmi_ec_sensors: Use PTR_ERR_OR_ZERO.
 - asus_wmi_ec_sensors: Specify per-board sensors in a declarative way 
   (by Eugene Shalygin).
 - asus_wmi_sensors: Add support for X370/X470/B450/X399 boards.

---

Denis Pauk (2):
  hwmon: (asus_wmi_ec_sensors) Support B550 Asus WMI.
  hwmon: (asus_wmi_sensors) Support X370 Asus WMI.

 Documentation/hwmon/asus_wmi_ec_sensors.rst |  38 ++
 Documentation/hwmon/asus_wmi_sensors.rst    |  77 +++
 Documentation/hwmon/index.rst               |   2 +
 MAINTAINERS                                 |   8 +
 drivers/hwmon/Kconfig                       |  24 +
 drivers/hwmon/Makefile                      |   2 +
 drivers/hwmon/asus_wmi_ec_sensors.c         | 621 ++++++++++++++++++
 drivers/hwmon/asus_wmi_sensors.c            | 665 ++++++++++++++++++++
 8 files changed, 1437 insertions(+)
 create mode 100644 Documentation/hwmon/asus_wmi_ec_sensors.rst
 create mode 100644 Documentation/hwmon/asus_wmi_sensors.rst
 create mode 100644 drivers/hwmon/asus_wmi_ec_sensors.c
 create mode 100644 drivers/hwmon/asus_wmi_sensors.c


base-commit: 879af177e7210478f39ea366ce6d95e1e7a48d0e

Comments

Guenter Roeck Nov. 15, 2021, 11:15 p.m. UTC | #1
On 11/15/21 2:01 PM, Andy Shevchenko wrote:
> On Mon, Nov 15, 2021 at 11:09 PM Denis Pauk <pauk.denis@gmail.com> wrote:
>>
>> Add support by WMI interface provided by Asus for B550/X570 boards:
>> * PRIME X570-PRO,
>> * ROG CROSSHAIR VIII HERO
>> * ROG CROSSHAIR VIII DARK HERO
>> * ROG CROSSHAIR VIII FORMULA
>> * ROG STRIX X570-E GAMING
>> * ROG STRIX B550-I GAMING
>> * ROG STRIX B550-E GAMING
>>
>> Add support by WMI interface provided by Asus for X370/X470/
>> B450/X399 boards:
>> * ROG CROSSHAIR VI HERO,
>> * PRIME X399-A,
>> * PRIME X470-PRO,
>> * ROG CROSSHAIR VI EXTREME,
>> * ROG CROSSHAIR VI HERO (WI-FI AC),
>> * ROG CROSSHAIR VII HERO,
>> * ROG CROSSHAIR VII HERO (WI-FI),
>> * ROG STRIX Z390-F GAMING
>> * ROG STRIX B450-E GAMING,
>> * ROG STRIX B450-F GAMING,
>> * ROG STRIX B450-I GAMING,
>> * ROG STRIX X399-E GAMING,
>> * ROG STRIX X470-F GAMING,
>> * ROG STRIX X470-I GAMING,
>> * ROG ZENITH EXTREME,
>> * ROG ZENITH EXTREME ALPHA.
>>
>> I have added "ROG STRIX Z390-F GAMING" to list of supported boards in
>> asus_wmi_sensors.
> 
> Guenter, what is your plan about this patch series? It seems it
> missed, by unknown (?) reason, the v5.16-rc1 (I remember seeing it in
> some of your tree branches at some point).
> 

I don't see it in my record. Earlier I was simply waiting for some
Reviewed-by: tags, which I have never seen. Looking into the commit log,
I do see:

Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
Co-developed-by: Eugene Shalygin <eugene.shalygin@gmail.com>
Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>
Co-developed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Did you and Eugene indeed sign this off, ie did you write it, and
Eugene and Denis signed it off ? If so, the tags are in the wrong order.
On the other side, if the code is ultimately from Denis, with your input,
the tags should be either Acked-by: or Reviewed-by: for both Eugene
and yourself.

Note that v11 of this patch series is missing from
https://patchwork.kernel.org/project/linux-hwmon/list/
for some reason.

Guenter
Andy Shevchenko Nov. 16, 2021, 10:38 a.m. UTC | #2
On Mon, Nov 15, 2021 at 03:15:39PM -0800, Guenter Roeck wrote:
> On 11/15/21 2:01 PM, Andy Shevchenko wrote:
> > On Mon, Nov 15, 2021 at 11:09 PM Denis Pauk <pauk.denis@gmail.com> wrote:
> > > 
> > > Add support by WMI interface provided by Asus for B550/X570 boards:
> > > * PRIME X570-PRO,
> > > * ROG CROSSHAIR VIII HERO
> > > * ROG CROSSHAIR VIII DARK HERO
> > > * ROG CROSSHAIR VIII FORMULA
> > > * ROG STRIX X570-E GAMING
> > > * ROG STRIX B550-I GAMING
> > > * ROG STRIX B550-E GAMING
> > > 
> > > Add support by WMI interface provided by Asus for X370/X470/
> > > B450/X399 boards:
> > > * ROG CROSSHAIR VI HERO,
> > > * PRIME X399-A,
> > > * PRIME X470-PRO,
> > > * ROG CROSSHAIR VI EXTREME,
> > > * ROG CROSSHAIR VI HERO (WI-FI AC),
> > > * ROG CROSSHAIR VII HERO,
> > > * ROG CROSSHAIR VII HERO (WI-FI),
> > > * ROG STRIX Z390-F GAMING
> > > * ROG STRIX B450-E GAMING,
> > > * ROG STRIX B450-F GAMING,
> > > * ROG STRIX B450-I GAMING,
> > > * ROG STRIX X399-E GAMING,
> > > * ROG STRIX X470-F GAMING,
> > > * ROG STRIX X470-I GAMING,
> > > * ROG ZENITH EXTREME,
> > > * ROG ZENITH EXTREME ALPHA.
> > > 
> > > I have added "ROG STRIX Z390-F GAMING" to list of supported boards in
> > > asus_wmi_sensors.
> > 
> > Guenter, what is your plan about this patch series? It seems it
> > missed, by unknown (?) reason, the v5.16-rc1 (I remember seeing it in
> > some of your tree branches at some point).
> > 
> 
> I don't see it in my record. Earlier I was simply waiting for some
> Reviewed-by: tags, which I have never seen.

Ah, understood. Thank you for clarifications.

> Looking into the commit log,
> I do see:
> 
> Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
> Co-developed-by: Eugene Shalygin <eugene.shalygin@gmail.com>
> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>
> Co-developed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> Did you and Eugene indeed sign this off, ie did you write it, and
> Eugene and Denis signed it off ? If so, the tags are in the wrong order.

I'm not sure I follow. I have helped Denis with the code and according to
Submitting Patches documentation the order should be chronological with the
main author to be first in the list. Here the committer (submitter) is the
same as the original author IIUC. (I can't speak for Eugene, though)

> On the other side, if the code is ultimately from Denis, with your input,
> the tags should be either Acked-by: or Reviewed-by: for both Eugene
> and yourself.

I'm fine with either Co-developed-by+SoB or Reviewed-by.

> Note that v11 of this patch series is missing from
> https://patchwork.kernel.org/project/linux-hwmon/list/
> for some reason.

Hmm... Denis, please check locally how you prepare your patches.
Guenter Roeck Nov. 16, 2021, 2:32 p.m. UTC | #3
On 11/16/21 2:38 AM, Andy Shevchenko wrote:
> On Mon, Nov 15, 2021 at 03:15:39PM -0800, Guenter Roeck wrote:
>> On 11/15/21 2:01 PM, Andy Shevchenko wrote:
>>> On Mon, Nov 15, 2021 at 11:09 PM Denis Pauk <pauk.denis@gmail.com> wrote:
>>>>
>>>> Add support by WMI interface provided by Asus for B550/X570 boards:
>>>> * PRIME X570-PRO,
>>>> * ROG CROSSHAIR VIII HERO
>>>> * ROG CROSSHAIR VIII DARK HERO
>>>> * ROG CROSSHAIR VIII FORMULA
>>>> * ROG STRIX X570-E GAMING
>>>> * ROG STRIX B550-I GAMING
>>>> * ROG STRIX B550-E GAMING
>>>>
>>>> Add support by WMI interface provided by Asus for X370/X470/
>>>> B450/X399 boards:
>>>> * ROG CROSSHAIR VI HERO,
>>>> * PRIME X399-A,
>>>> * PRIME X470-PRO,
>>>> * ROG CROSSHAIR VI EXTREME,
>>>> * ROG CROSSHAIR VI HERO (WI-FI AC),
>>>> * ROG CROSSHAIR VII HERO,
>>>> * ROG CROSSHAIR VII HERO (WI-FI),
>>>> * ROG STRIX Z390-F GAMING
>>>> * ROG STRIX B450-E GAMING,
>>>> * ROG STRIX B450-F GAMING,
>>>> * ROG STRIX B450-I GAMING,
>>>> * ROG STRIX X399-E GAMING,
>>>> * ROG STRIX X470-F GAMING,
>>>> * ROG STRIX X470-I GAMING,
>>>> * ROG ZENITH EXTREME,
>>>> * ROG ZENITH EXTREME ALPHA.
>>>>
>>>> I have added "ROG STRIX Z390-F GAMING" to list of supported boards in
>>>> asus_wmi_sensors.
>>>
>>> Guenter, what is your plan about this patch series? It seems it
>>> missed, by unknown (?) reason, the v5.16-rc1 (I remember seeing it in
>>> some of your tree branches at some point).
>>>
>>
>> I don't see it in my record. Earlier I was simply waiting for some
>> Reviewed-by: tags, which I have never seen.
> 
> Ah, understood. Thank you for clarifications.
> 
>> Looking into the commit log,
>> I do see:
>>
>> Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
>> Co-developed-by: Eugene Shalygin <eugene.shalygin@gmail.com>
>> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>
>> Co-developed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>>
>> Did you and Eugene indeed sign this off, ie did you write it, and
>> Eugene and Denis signed it off ? If so, the tags are in the wrong order.
> 
> I'm not sure I follow. I have helped Denis with the code and according to
> Submitting Patches documentation the order should be chronological with the
> main author to be first in the list. Here the committer (submitter) is the
> same as the original author IIUC. (I can't speak for Eugene, though)
> 

I got the patch from Denis. At the very least, Denis' signature should be
last. It is first.

Guenter

>> On the other side, if the code is ultimately from Denis, with your input,
>> the tags should be either Acked-by: or Reviewed-by: for both Eugene
>> and yourself.
> 
> I'm fine with either Co-developed-by+SoB or Reviewed-by.
> 
>> Note that v11 of this patch series is missing from
>> https://patchwork.kernel.org/project/linux-hwmon/list/
>> for some reason.
> 
> Hmm... Denis, please check locally how you prepare your patches.
> 
>
Andy Shevchenko Nov. 16, 2021, 3:27 p.m. UTC | #4
On Tue, Nov 16, 2021 at 4:32 PM Guenter Roeck <linux@roeck-us.net> wrote:
> On 11/16/21 2:38 AM, Andy Shevchenko wrote:
> > On Mon, Nov 15, 2021 at 03:15:39PM -0800, Guenter Roeck wrote:
> >> On 11/15/21 2:01 PM, Andy Shevchenko wrote:
> >>> On Mon, Nov 15, 2021 at 11:09 PM Denis Pauk <pauk.denis@gmail.com> wrote:
> >>>>
> >>>> Add support by WMI interface provided by Asus for B550/X570 boards:
> >>>> * PRIME X570-PRO,
> >>>> * ROG CROSSHAIR VIII HERO
> >>>> * ROG CROSSHAIR VIII DARK HERO
> >>>> * ROG CROSSHAIR VIII FORMULA
> >>>> * ROG STRIX X570-E GAMING
> >>>> * ROG STRIX B550-I GAMING
> >>>> * ROG STRIX B550-E GAMING
> >>>>
> >>>> Add support by WMI interface provided by Asus for X370/X470/
> >>>> B450/X399 boards:
> >>>> * ROG CROSSHAIR VI HERO,
> >>>> * PRIME X399-A,
> >>>> * PRIME X470-PRO,
> >>>> * ROG CROSSHAIR VI EXTREME,
> >>>> * ROG CROSSHAIR VI HERO (WI-FI AC),
> >>>> * ROG CROSSHAIR VII HERO,
> >>>> * ROG CROSSHAIR VII HERO (WI-FI),
> >>>> * ROG STRIX Z390-F GAMING
> >>>> * ROG STRIX B450-E GAMING,
> >>>> * ROG STRIX B450-F GAMING,
> >>>> * ROG STRIX B450-I GAMING,
> >>>> * ROG STRIX X399-E GAMING,
> >>>> * ROG STRIX X470-F GAMING,
> >>>> * ROG STRIX X470-I GAMING,
> >>>> * ROG ZENITH EXTREME,
> >>>> * ROG ZENITH EXTREME ALPHA.
> >>>>
> >>>> I have added "ROG STRIX Z390-F GAMING" to list of supported boards in
> >>>> asus_wmi_sensors.
> >>>
> >>> Guenter, what is your plan about this patch series? It seems it
> >>> missed, by unknown (?) reason, the v5.16-rc1 (I remember seeing it in
> >>> some of your tree branches at some point).
> >>>
> >>
> >> I don't see it in my record. Earlier I was simply waiting for some
> >> Reviewed-by: tags, which I have never seen.
> >
> > Ah, understood. Thank you for clarifications.
> >
> >> Looking into the commit log,
> >> I do see:
> >>
> >> Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
> >> Co-developed-by: Eugene Shalygin <eugene.shalygin@gmail.com>
> >> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>
> >> Co-developed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> >> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> >>
> >> Did you and Eugene indeed sign this off, ie did you write it, and
> >> Eugene and Denis signed it off ? If so, the tags are in the wrong order.
> >
> > I'm not sure I follow. I have helped Denis with the code and according to
> > Submitting Patches documentation the order should be chronological with the
> > main author to be first in the list. Here the committer (submitter) is the
> > same as the original author IIUC. (I can't speak for Eugene, though)
> >
>
> I got the patch from Denis. At the very least, Denis' signature should be
> last. It is first.

"...the ordering of Signed-off-by: tags should reflect the
chronological history of the patch insofar as possible, regardless of
whether the author is attributed via From: or Co-developed-by:.
Notably, the last Signed-off-by: must always be that of the developer
submitting the patch."

Okay, "must" obviously takes precedence over the "as possible".

> >> On the other side, if the code is ultimately from Denis, with your input,
> >> the tags should be either Acked-by: or Reviewed-by: for both Eugene
> >> and yourself.
> >
> > I'm fine with either Co-developed-by+SoB or Reviewed-by.
> >
> >> Note that v11 of this patch series is missing from
> >> https://patchwork.kernel.org/project/linux-hwmon/list/
> >> for some reason.
> >
> > Hmm... Denis, please check locally how you prepare your patches.