All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Pauk <pauk.denis@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: eugene.shalygin@gmail.com, andy.shevchenko@gmail.com,
	pauk.denis@gmail.com, platform-driver-x86@vger.kernel.org,
	Guenter Roeck <linux@roeck-us.net>,
	Jean Delvare <jdelvare@suse.com>,
	linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/3] hwmon: (nct6775) Support lock by ACPI mutex
Date: Sun, 28 Nov 2021 20:45:45 +0200	[thread overview]
Message-ID: <20211128184549.9161-1-pauk.denis@gmail.com> (raw)

Lock by a ACPI mutex that is required for support ASUS MAXIMUS VII HERO 
motherboard. In other case, all methods are returned zero instead of real 
values. Code uses acpi mutex before any IO operations in case when such 
acpi mutex is known.

Patch series adds additional check for chip ID, and if method returned 
zero, all calls by acpi_wmi are disabled. 

@Andy Shevchenko: 
>> Do you need string_helpers.h after this change?
It was not required in the original patch, as it was included as part of 
some other header and I have left includes without changes.

I have a little bit changed conditionals in "add MAXIMUS VII HERO", code 
can change access variable several times: 
* By the default, access is set to direct, 
* after code has checked that wmi methods can return something useful,
* and as the last step code has checked that mutext is existed and set 
  access back to direct.

But as for me, it should be less confusing.

What do you think?

---

Changes in v2:
- Fix commit message.
- Remove default acpi_board_ANY and use NULL instead.
- Use chip ID everywhere.
- Use an anonymous union for mutexes.
- Use temporary status varibale in acpi calls.
---

Denis Pauk (3):
  hwmon: (nct6775) Use lock function pointers in nct6775_data
  hwmon: (nct6775) Implement custom lock by ACPI mutex
  hwmon: (nct6775) add MAXIMUS VII HERO

 drivers/hwmon/nct6775.c | 364 +++++++++++++++++++++++++++++-----------
 1 file changed, 263 insertions(+), 101 deletions(-)


base-commit: fa55b7dcdc43c1aa1ba12bca9d2dd4318c2a0dbf
-- 
2.33.0


             reply	other threads:[~2021-11-28 18:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-28 18:45 Denis Pauk [this message]
2021-11-28 18:45 ` [PATCH v2 1/3] hwmon: (nct6775) Use lock function pointers in nct6775_data Denis Pauk
2021-11-28 18:45 ` [PATCH v2 2/3] hwmon: (nct6775) Implement custom lock by ACPI mutex Denis Pauk
2021-11-28 18:45 ` [PATCH v2 3/3] hwmon: (nct6775) add MAXIMUS VII HERO Denis Pauk
2021-12-16 22:22 ` [PATCH v2 0/3] hwmon: (nct6775) Support lock by ACPI mutex Denis Pauk
2021-12-17 16:22   ` Guenter Roeck
2021-12-17 17:14     ` Eugene Shalygin
2021-12-18 19:17       ` Denis Pauk
2021-12-02 15:04 Olli Asikainen
2021-12-02 17:04 ` Guenter Roeck

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=20211128184549.9161-1-pauk.denis@gmail.com \
    --to=pauk.denis@gmail.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=eugene.shalygin@gmail.com \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=platform-driver-x86@vger.kernel.org \
    /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.