From: Werner Sembach <wse@tuxedocomputers.com>
To: W_Armin@gmx.de, hansg@kernel.org, ilpo.jarvinen@linux.intel.com
Cc: platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org,
Werner Sembach <wse@tuxedocomputers.com>
Subject: [RFC PATCH 1/3] platform/x86: uniwill-laptop: Make super key init lineup with other inits
Date: Tue, 21 Apr 2026 22:01:25 +0200 [thread overview]
Message-ID: <20260421201103.142403-2-wse@tuxedocomputers.com> (raw)
In-Reply-To: <20260421201103.142403-1-wse@tuxedocomputers.com>
The super key init, while being trivial, was the only one not in its own
method and before the EC init.
Make an own method and move it after EC init and probe call to make it
consistent with other initialization steps.
Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
---
drivers/platform/x86/uniwill/uniwill-acpi.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/uniwill/uniwill-acpi.c b/drivers/platform/x86/uniwill/uniwill-acpi.c
index 766bc1ee192d2..7d1fdbacc6871 100644
--- a/drivers/platform/x86/uniwill/uniwill-acpi.c
+++ b/drivers/platform/x86/uniwill/uniwill-acpi.c
@@ -768,6 +768,14 @@ static ssize_t super_key_enable_show(struct device *dev, struct device_attribute
static DEVICE_ATTR_RW(super_key_enable);
+static int super_key_enable_init(struct uniwill_data *data)
+{
+ if (!uniwill_device_supports(data, UNIWILL_FEATURE_SUPER_KEY))
+ return 0;
+
+ return devm_mutex_init(&data->dev, &data->super_key_lock);
+}
+
static int uniwill_write_touchpad_toggle_enable(struct uniwill_data *data, bool status)
{
unsigned int value;
@@ -1869,10 +1877,6 @@ static int uniwill_probe(struct platform_device *pdev)
data->regmap = regmap;
- ret = devm_mutex_init(&pdev->dev, &data->super_key_lock);
- if (ret < 0)
- return ret;
-
ret = uniwill_ec_init(data);
if (ret < 0)
return ret;
@@ -1890,6 +1894,10 @@ static int uniwill_probe(struct platform_device *pdev)
return ret;
}
+ ret = super_key_enable_init(data);
+ if (ret < 0)
+ return ret;
+
ret = uniwill_battery_init(data);
if (ret < 0)
return ret;
--
2.43.0
next prev parent reply other threads:[~2026-04-21 20:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-21 20:01 [RFC PATCH 0/3] platform/x86: uniwill-laptop: Another improvement and another feature Werner Sembach
2026-04-21 20:01 ` Werner Sembach [this message]
2026-04-22 9:33 ` [RFC PATCH 1/3] platform/x86: uniwill-laptop: Make super key init lineup with other inits Ilpo Järvinen
2026-04-22 11:11 ` Armin Wolf
2026-04-21 20:01 ` [RFC PATCH 2/3] platform/x86: uniwill-laptop: Implement lightbar for XMG Fusion (L19) Werner Sembach
2026-04-22 9:34 ` Ilpo Järvinen
2026-04-22 11:17 ` Armin Wolf
2026-04-22 11:29 ` Armin Wolf
2026-04-22 13:13 ` Werner Sembach
2026-04-21 20:01 ` [RFC PATCH 3/3] platform/x86: uniwill-laptop: Offer support to activate local dimming Werner Sembach
2026-04-21 22:03 ` Armin Wolf
2026-04-22 11:28 ` [RFC PATCH 0/3] platform/x86: uniwill-laptop: Another improvement and another feature Armin Wolf
2026-04-22 15:30 ` Werner Sembach
2026-04-22 16:12 ` Armin Wolf
2026-04-24 12:28 ` Werner Sembach
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=20260421201103.142403-2-wse@tuxedocomputers.com \
--to=wse@tuxedocomputers.com \
--cc=W_Armin@gmx.de \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox