From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=103.168.172.151 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796350852; b=v/nk3qUyvp4vZZ3a58rgNEsBYy28NReZY6j61mLVduHsFyflJjH9ehpLqrrlRtBgDNFx BoluYG9sdeTlsK9DS1snr4nH/oKr+CL4yIg1TgsRdFUCKDEjJcRXDNdWkvcNhCamYQQ+9 DonLgAWWofTaM+eQt6jev/ltUnyeHodi39wL+tzJmey8zMG1SqXrinhcpyClrA9wzd6mv +vU2/xK+/6LxZh2dfg5+7ViEbrE/4B2v2dRQ8UTPjjj493c6fJ1GN42vCB6KhgJGUjmeg WDHc6GUrhctidFgcvnfUGLjwUN2Ntu2+wHmFBWGWNUXqnY66mE0N79Ymnf0vd1f2L3Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796350852; h=DMARC-Filter:Received:Received:DKIM-Signature:DKIM-Signature: X-DKIM2-Info:DKIM2-Signature:X-DKIM2-Info:Message-Instance: X-ME-Sender:X-ME-Received:X-ME-Proxy-Cause:X-ME-Proxy:Feedback-ID: Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding; bh=xNl8KkDqPWYKuu/BRsJ2zgiZMGZGOAl9XJDYLX8hBSQ=; b=Of/L1kut+MxjPmt0QbZDR2xDvKustqDN2bvbXB0KaOnguOB0fTcbLcfDhxyApBuLkg+D xoa1UUri2e0Vcx5x6HM7Gvg+jsaeRrSgL3a1063lT5FsxLZ9EdAl+8I1jvsqdUqcZ50fi ew0SUVTGhV8zkussSA428bk3oIsJVNANM+SI+/ngeC0Cab01Q7t2DsSQvgyOSEV030aFh S08GRgXJQ/9ei5JP5Mf7aGRP2VZVIxNCagHra9caX5AR3O/bibx+tBcYxg5JfQushhQSq saezGqkEhfcSUzh7qAlD2NR3qDWbxXcimMjq7wtlfLSOP02MrevdCJAFdVnp9ohEqhw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=squebb.ca; spf=pass smtp.mailfrom=squebb.ca; dkim=pass header.d=squebb.ca header.i=@squebb.ca header.a=rsa-sha256 header.s=fm1 header.b=RCFXdTLF; dkim=pass header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b="S/DcVCYW"; arc=none smtp.remote-ip=103.168.172.151 Received: from fout-a8-smtp.messagingengine.com (fout-a8-smtp.messagingengine.com [103.168.172.151]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CCC9860A3823 for ; Fri, 4 Dec 2026 02:20:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CCC9860A3823 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=squebb.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=squebb.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=squebb.ca header.i=@squebb.ca header.a=rsa-sha256 header.s=fm1 header.b=RCFXdTLF; dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=S/DcVCYW Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id 0AD29EC01D0 for ; Thu, 3 Dec 2026 21:20:51 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Thu, 03 Dec 2026 21:20:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=squebb.ca; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1796350851; x= 1796437251; bh=xNl8KkDqPWYKuu/BRsJ2zgiZMGZGOAl9XJDYLX8hBSQ=; b=R CFXdTLFy3bwCh0HSN3lQyFc7m9hqwOYMpQnelGlu1Fgp7n9a9p2M9qMKniFoQTrd nKphMc+prN1yQg09ryUKePjx4pBLkYyI4loh2HDOg11nnA7eXF3KwxViyTZwYUnL T+zBE4rwxsnzhYwTuhaO5mnG4EFn6WNoINDwwoYsrBkp0ZDRl7tPG0O7X2knlg84 jBRauvbqivG7AikhELPUPFtB3PtGnzWnCUJ73LVbUcs/3s6nCsQar1UMPGmk+S72 7Gj5uvBUIlaKa8UojUTj7t4TBpVYXHCfVDrcjdCuQbjsMtHKhDwCtcGeCw2ypADx iy3YyS5GsapxQiEDbBH4g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1796350851; x=1796437251; bh=x Nl8KkDqPWYKuu/BRsJ2zgiZMGZGOAl9XJDYLX8hBSQ=; b=S/DcVCYWzDcSEIKB0 ILWj0V5JvgjblIfA1WZwQd1H9FfCalt+ZG+qHCpvM0B+N+25JbBsCZIDaAZOA+6t daluCvuM8IuFQR6TArXNKt3aO1DpADNIwNX+7BnfKa7LC4J32TTii8hxRrx+FyLB 0p44zepcezK5czXLIbPGYqtqfsZI3NyWJlEbldBi/XWYDFUkUJkOD0zZHDlwdhT9 hGArXo2lUL7yTi7Bl/j0der5bzhDFIzzFvmyNrAlEU4ZWzflQU+W6Tmz3ILOfQdE e8f270bOezKwkzv1dU/yJWNU/9hrCFR779Qn2IjKNefcRJbffhsqcl0tu+3xCCMZ sIStg== X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=sign d=squebb.ca a=rsa-sha256; DKIM2-Signature: i=1; m=1; t=1796350851; d=squebb.ca; mf=PG1wZWFyc29uLWxlbm92b0BzcXVlYmIuY2E+; rt=PGxpbnV4LWtlcm5lbEB2Z2VyLmtlcm5lbC5vcmc+; s=fm1:rsa-sha256:QpfG4PFScZMFdOKvmClvaq3mX+EKPvmy/5H4BUlvJS2m8Ex wklVaSmci58adlGx4Uc089suFi2P+YVpNiKVOYAyXE7T1xzrG4hBskOo7pCPIU3I +KKOwo5bkWgGRmx3Mb2KjOiJbypWooGH5eyfJMFmpbp7WyO+77IytPAhw8ggo04y vqaQcPBhp1oZyvw6mBNyf2VObS4Fphvhtctvq67AmYFaHpW60c/bxdt06W0OheAm OVRi5lYZ4daOY8Q/1axPjeHu5kc0ZeiCJByKpkihbZZjFChi7a0s82jxlcWsQw5q cAYOF0RYhvwobFvkDlQGjLcmH9PFJe8v+SvFbeg==; X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=mi-m=1; hc=11; hn=cc,content-transfer-encoding,date,feedback-id,from, in-reply-to,message-id,mime-version,references,subject,to; Message-Instance: m=1; h=sha256:7AvSZlCfZw/4r7uOrPk0DVC0NCv3ij6txcRLNwGCmcU=:43TSZquuFDVm/N///6bY3qtRPQh9h/ou4IDNMF2V9+4=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTFcxepBDbwXJiGX+tH7WvdqfdTwIUZOowWXvSCko0n3eZnQmF8+APQ8IxtNA8LfeS hbCTGE5zBR6Xw7Q3uOYFHVNJT7VRxDqBux5thNm2hFR9ACmPHNFf1pEUuxBTfJbdCWeZHH 3PMsX+cQ6DRLpggETRxrQe4B7L1yYPTOBbjTTzM/EGm9rlMMHyhupsZpIk6RVhseAu/i6i ffuUAX7yi++XycNXtVPLmGsKjyxhao4OxKb+v8FmrEGndalcvI/FG5ziG5ZuTnfIsNi01a F5hQ5/QG/PYOrun3VMMTkEHr9jQGJzUE+N9vTKHdqBC6mjEkGdi73tzsXhFc94OVtdjLU0 EvfQCfRhUyhhBamO8kY0uZrMlFfApIIfxN00sT5Zup2K1SW1Us1PTJJwlyMmcf8dT2ra1d MnDV2/q2r2Wl9UFaK8Ro52gPKpGp0IBX7Wsw45gbEasZH3YUfWfnlj/9hotDNWLvpcb/1h 9/A/tL/J20Y0ITDG9Dd+HvDyWKuxDhJWl6Cu/7msc2xkC9fkWRc/vFkv7yUIdMdUMsyh8w kd7G8ck6BFwUmPyJPY1hah0L70CkEyM3wDh1BNWgyPa0CPsL0PPsGT66O0na8t2mKiEuv7 jKFk8Mz+pCVGqrLSoGyTGKTcGBp+RUh/ISEd9p62Z465Amj3KaNALOWT9uHg X-ME-Proxy: Feedback-ID: ibe194615:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 3 Dec 2026 21:20:50 -0500 (EST) From: Mark Pearson To: mpearson-lenovo@squebb.ca Cc: derekjohn.clark@gmail.com, i@rong.moe, hansg@kernel.org, ilpo.jarvinen@linux.intel.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 12/13] platform/x86: lenovo: tlmi: Add method identifier Date: Thu, 3 Dec 2026 21:20:21 -0500 Message-ID: <20261204022032.3074618-13-mpearson-lenovo@squebb.ca> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261204022032.3074618-1-mpearson-lenovo@squebb.ca> References: <20261204022032.3074618-1-mpearson-lenovo@squebb.ca> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add the ability to see whether attributes are regular, platform or function attributes. Signed-off-by: Mark Pearson --- drivers/platform/x86/lenovo/tlmi-config.c | 26 +++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/platform/x86/lenovo/tlmi-config.c b/drivers/platform/x86/lenovo/tlmi-config.c index 76cf86ee4907..eb7e8b54271c 100644 --- a/drivers/platform/x86/lenovo/tlmi-config.c +++ b/drivers/platform/x86/lenovo/tlmi-config.c @@ -146,6 +146,12 @@ static ssize_t function_type_show(struct kobject *kobj, struct kobj_attribute *a return common_type_show(setting->possible_values, buf); } +static ssize_t function_method_show(struct kobject *kobj, struct kobj_attribute *f, + char *buf) +{ + return sysfs_emit(buf, "function\n"); +} + static ssize_t function_current_value_store(struct kobject *kobj, struct kobj_attribute *f, const char *buf, size_t count) @@ -181,12 +187,15 @@ static struct kobj_attribute function_current_val = __ATTR(current_value, 0600, function_current_value_show, function_current_value_store); static struct kobj_attribute function_type = __ATTR(type, 0444, function_type_show, NULL); +static struct kobj_attribute function_method = __ATTR(method, 0444, + function_method_show, NULL); static struct attribute *tlmi_function[] = { &function_display_name.attr, &function_current_val.attr, &function_possible_values.attr, &function_type.attr, + &function_method.attr, NULL }; @@ -258,6 +267,12 @@ static ssize_t platform_onreboot_show(struct kobject *kobj, struct kobj_attribut return sysfs_emit(buf, "%d\n", setting->on_reboot); } +static ssize_t platform_method_show(struct kobject *kobj, struct kobj_attribute *f, + char *buf) +{ + return sysfs_emit(buf, "platform\n"); +} + static ssize_t platform_current_value_store(struct kobject *kobj, struct kobj_attribute *p, const char *buf, size_t count) @@ -296,6 +311,8 @@ static struct kobj_attribute platform_current_val = __ATTR(current_value, 0600, static struct kobj_attribute platform_type = __ATTR(type, 0444, platform_type_show, NULL); static struct kobj_attribute platform_onreboot = __ATTR(onreboot, 0444, platform_onreboot_show, NULL); +static struct kobj_attribute platform_method = __ATTR(method, 0444, + platform_method_show, NULL); static struct attribute *tlmi_platform[] = { &platform_display_name.attr, @@ -303,6 +320,7 @@ static struct attribute *tlmi_platform[] = { &platform_possible_values.attr, &platform_type.attr, &platform_onreboot.attr, + &platform_method.attr, NULL }; @@ -364,6 +382,12 @@ static ssize_t type_show(struct kobject *kobj, struct kobj_attribute *attr, return common_type_show(setting->possible_values, buf); } +static ssize_t method_show(struct kobject *kobj, struct kobj_attribute *f, + char *buf) +{ + return sysfs_emit(buf, "setting\n"); +} + static ssize_t current_value_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t count) @@ -396,12 +420,14 @@ static struct kobj_attribute attr_possible_values = __ATTR_RO(possible_values); static struct kobj_attribute attr_current_val = __ATTR_RW_MODE(current_value, 0600); static struct kobj_attribute attr_type = __ATTR_RO(type); +static struct kobj_attribute attr_method = __ATTR_RO(method); static struct attribute *tlmi_attrs[] = { &attr_display_name.attr, &attr_current_val.attr, &attr_possible_values.attr, &attr_type.attr, + &attr_method.attr, NULL }; -- 2.43.0