All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/13] New Lenovo common WMI driver - tlmi
@ 2026-12-04  2:20 Mark Pearson
  2026-12-04  2:20 ` [PATCH 01/13] platform/x86: lenovo: think-lmi: Convert name arrays to pointers Mark Pearson
                   ` (13 more replies)
  0 siblings, 14 replies; 44+ messages in thread
From: Mark Pearson @ 2026-12-04  2:20 UTC (permalink / raw)
  To: mpearson-lenovo
  Cc: derekjohn.clark, i, hansg, ilpo.jarvinen, platform-driver-x86,
	linux-kernel

This series introduces support for a new Lenovo 'common WMI'
implementation.

The Thinkpad, Thinkstation and ThinkCenter FW teams have implemented new
WMI methods for interfacing with the BIOS settings. This implementation
will be available for 2027 platforms and is intended to be common across
the business units.

The new driver is called tlmi and can run alongside the existing
think-lmi driver. Initially the BIOS's will support both interfaces.

The first 5 patches in the series update the existing think-lmi driver
with changes that means it can share structures with the new tlmi
driver. They also introduce fixes for issues I found when implementing
tlmi.
The remaining patches introduce the new tlmi functionality. I've tried
to break them up into reviewable chunks.

The tlmi driver for now offers the same functionality as think-lmi -
with support for modifying BIOS settings and authentication options.
It also introduces 'platform' settings and 'function' settings.

During implementation I needed some functionality to be common between
modules. Using the wmi-helpers module seemed a good place for this, but
please let me know if it's not suitable.

Testing has been done on the X1 Carbon G14, ThinkCenter X Tower and
Thinkstation P5 G2.

Much of this implementation builds on the recommendations from Armin,
Derek and Ilpo from the original RFC. Many thanks for the guidance.

Mark Pearson (13):
  platform/x86: lenovo: think-lmi: Convert name arrays to pointers
  platform/x86: lenovo: think-lmi: Clean up attributes if not added to
    list
  platform/x86: lenovo: think-lmi: cache current value at init
  platform/x86: lenovo: think-lmi: store attributes as linked list
  platform/x86: lenovo: tlmi: New tlmi driver for common WMI
    implementation
  platform/x86: lenovo: tlmi: Add BIOS attributes sysfs entries
  platform/x86: lenovo: tlmi: Retrieve auth information
  platform/x86: lenovo: Move TLMI helper functions into wmi-helpers
  platform/x86: lenovo: tlmi: Add authentication sysfs entries
  platform/x86: lenovo: tlmi: Add platform attribute support
  platform/x86: lenovo: tlmi: Add function attributes support
  platform/x86: lenovo: tlmi: Add method identifier
  docs: ABI: sysfs-class-firmware-attributes: Update Lenovo sections

 .../testing/sysfs-class-firmware-attributes   |  39 +-
 drivers/platform/x86/lenovo/Kconfig           |   1 +
 drivers/platform/x86/lenovo/Makefile          |   3 +
 drivers/platform/x86/lenovo/think-lmi.c       | 193 ++--
 drivers/platform/x86/lenovo/think-lmi.h       |  72 +-
 drivers/platform/x86/lenovo/tlmi-attr.c       | 214 ++++
 drivers/platform/x86/lenovo/tlmi-auth.c       | 958 ++++++++++++++++++
 drivers/platform/x86/lenovo/tlmi-authdata.c   | 135 +++
 drivers/platform/x86/lenovo/tlmi-config.c     | 764 ++++++++++++++
 drivers/platform/x86/lenovo/tlmi-function.c   | 196 ++++
 drivers/platform/x86/lenovo/tlmi-platform.c   | 212 ++++
 drivers/platform/x86/lenovo/wmi-helpers.c     |  65 +-
 drivers/platform/x86/lenovo/wmi-helpers.h     |   5 +
 13 files changed, 2788 insertions(+), 69 deletions(-)
 create mode 100644 drivers/platform/x86/lenovo/tlmi-attr.c
 create mode 100644 drivers/platform/x86/lenovo/tlmi-auth.c
 create mode 100644 drivers/platform/x86/lenovo/tlmi-authdata.c
 create mode 100644 drivers/platform/x86/lenovo/tlmi-config.c
 create mode 100644 drivers/platform/x86/lenovo/tlmi-function.c
 create mode 100644 drivers/platform/x86/lenovo/tlmi-platform.c

-- 
2.43.0


^ permalink raw reply	[flat|nested] 44+ messages in thread
* Re: [PATCH 05/13] platform/x86: lenovo: tlmi: New tlmi driver for common WMI implementation
@ 2026-12-05  9:55 kernel test robot
  0 siblings, 0 replies; 44+ messages in thread
From: kernel test robot @ 2026-12-05  9:55 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "too many reports for this commit"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20261204022032.3074618-6-mpearson-lenovo@squebb.ca>
References: <20261204022032.3074618-6-mpearson-lenovo@squebb.ca>
TO: Mark Pearson <mpearson-lenovo@squebb.ca>
TO: mpearson-lenovo@squebb.ca
CC: derekjohn.clark@gmail.com
CC: i@rong.moe
CC: hansg@kernel.org
CC: ilpo.jarvinen@linux.intel.com
CC: platform-driver-x86@vger.kernel.org
CC: linux-kernel@vger.kernel.org

Hi Mark,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v7.4-rc5 next-20261203]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Mark-Pearson/platform-x86-lenovo-think-lmi-Convert-name-arrays-to-pointers/20261203-212010
base:   linus/master
patch link:    https://lore.kernel.org/r/20261204022032.3074618-6-mpearson-lenovo%40squebb.ca
patch subject: [PATCH 05/13] platform/x86: lenovo: tlmi: New tlmi driver for common WMI implementation
:::::: branch date: 13 hours ago
:::::: commit date: 13 hours ago
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20261205/20261205013343.OMNtwiK9-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261205/20261205013343.OMNtwiK9-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/20261205013343.OMNtwiK9-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/platform/x86/lenovo/tlmi-config.c: In function 'tlmi_config_probe':
>> drivers/platform/x86/lenovo/tlmi-config.c:73:73: error: implicit declaration of function 'MKDEV' [-Wimplicit-function-declaration]
      73 |         td->class_dev = device_create(&firmware_attributes_class, NULL, MKDEV(0, 0),
         |                                                                         ^~~~~


vim +/MKDEV +73 drivers/platform/x86/lenovo/tlmi-config.c

25b27328a38db62 Mark Pearson 2026-12-03  52  
25b27328a38db62 Mark Pearson 2026-12-03  53  static int tlmi_config_probe(struct wmi_device *wdev, const void *context)
25b27328a38db62 Mark Pearson 2026-12-03  54  {
25b27328a38db62 Mark Pearson 2026-12-03  55  	struct component_match *match = NULL;
25b27328a38db62 Mark Pearson 2026-12-03  56  	guid_t tlmi_attr_guid;
25b27328a38db62 Mark Pearson 2026-12-03  57  	struct think_lmi *td;
25b27328a38db62 Mark Pearson 2026-12-03  58  	int ret;
25b27328a38db62 Mark Pearson 2026-12-03  59  
25b27328a38db62 Mark Pearson 2026-12-03  60  	guid_parse(TLMI_ATTRIBUTE_GUID, &tlmi_attr_guid);
25b27328a38db62 Mark Pearson 2026-12-03  61  
25b27328a38db62 Mark Pearson 2026-12-03  62  	/* At minimum need to support BIOS settings */
25b27328a38db62 Mark Pearson 2026-12-03  63  	if (!wmidev_exists(&tlmi_attr_guid))
25b27328a38db62 Mark Pearson 2026-12-03  64  		return -EOPNOTSUPP;
25b27328a38db62 Mark Pearson 2026-12-03  65  
25b27328a38db62 Mark Pearson 2026-12-03  66  	td = devm_kzalloc(&wdev->dev, sizeof(struct think_lmi), GFP_KERNEL);
25b27328a38db62 Mark Pearson 2026-12-03  67  	if (!td)
25b27328a38db62 Mark Pearson 2026-12-03  68  		return -ENOMEM;
25b27328a38db62 Mark Pearson 2026-12-03  69  
25b27328a38db62 Mark Pearson 2026-12-03  70  	td->config_wdev = wdev;
25b27328a38db62 Mark Pearson 2026-12-03  71  	dev_set_drvdata(&wdev->dev, td);
25b27328a38db62 Mark Pearson 2026-12-03  72  
25b27328a38db62 Mark Pearson 2026-12-03 @73  	td->class_dev = device_create(&firmware_attributes_class, NULL, MKDEV(0, 0),
25b27328a38db62 Mark Pearson 2026-12-03  74  				      NULL, "%s", "tlmi");
25b27328a38db62 Mark Pearson 2026-12-03  75  	if (IS_ERR(td->class_dev))
25b27328a38db62 Mark Pearson 2026-12-03  76  		return PTR_ERR(td->class_dev);
25b27328a38db62 Mark Pearson 2026-12-03  77  	dev_set_drvdata(td->class_dev, td);
25b27328a38db62 Mark Pearson 2026-12-03  78  
25b27328a38db62 Mark Pearson 2026-12-03  79  	/* Register the other components */
25b27328a38db62 Mark Pearson 2026-12-03  80  	tlmi_attr_match_add(&wdev->dev, &match);
25b27328a38db62 Mark Pearson 2026-12-03  81  
25b27328a38db62 Mark Pearson 2026-12-03  82  	ret = component_master_add_with_match(&wdev->dev, &aggregate_ops, match);
25b27328a38db62 Mark Pearson 2026-12-03  83  	if (ret)
25b27328a38db62 Mark Pearson 2026-12-03  84  		device_unregister(td->class_dev);
25b27328a38db62 Mark Pearson 2026-12-03  85  
25b27328a38db62 Mark Pearson 2026-12-03  86  	return ret;
25b27328a38db62 Mark Pearson 2026-12-03  87  }
25b27328a38db62 Mark Pearson 2026-12-03  88  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2026-12-05  9:56 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04  2:20 [PATCH 00/13] New Lenovo common WMI driver - tlmi Mark Pearson
2026-12-04  2:20 ` [PATCH 01/13] platform/x86: lenovo: think-lmi: Convert name arrays to pointers Mark Pearson
2026-12-04  2:20 ` [PATCH 02/13] platform/x86: lenovo: think-lmi: Clean up attributes if not added to list Mark Pearson
2026-12-04 13:20   ` Rong Zhang
2026-12-04 15:09     ` Mark Pearson
2026-12-04  2:20 ` [PATCH 03/13] platform/x86: lenovo: think-lmi: cache current value at init Mark Pearson
2026-12-04 13:28   ` Rong Zhang
2026-12-04 15:14     ` Mark Pearson
2026-12-04  2:20 ` [PATCH 04/13] platform/x86: lenovo: think-lmi: store attributes as linked list Mark Pearson
2026-12-04 13:30   ` Rong Zhang
2026-12-04 15:21     ` Mark Pearson
2026-12-04 16:10       ` Rong Zhang
2026-12-04  2:20 ` [PATCH 05/13] platform/x86: lenovo: tlmi: New tlmi driver for common WMI implementation Mark Pearson
2026-12-04 13:41   ` Rong Zhang
2026-12-04 15:27     ` Mark Pearson
2026-12-05  9:54   ` kernel test robot
2026-12-05  9:55   ` kernel test robot
2026-12-04  2:20 ` [PATCH 06/13] platform/x86: lenovo: tlmi: Add BIOS attributes sysfs entries Mark Pearson
2026-12-04 13:44   ` Rong Zhang
2026-12-04 15:41     ` Mark Pearson
2026-12-04 17:02       ` Rong Zhang
2026-12-04  2:20 ` [PATCH 07/13] platform/x86: lenovo: tlmi: Retrieve auth information Mark Pearson
2026-12-04 13:48   ` Rong Zhang
2026-12-04 15:44     ` Mark Pearson
2026-12-04 17:14       ` Rong Zhang
2026-12-04 17:26         ` Mark Pearson
2026-12-04  2:20 ` [PATCH 08/13] platform/x86: lenovo: Move TLMI helper functions into wmi-helpers Mark Pearson
2026-12-04 13:49   ` Rong Zhang
2026-12-04 15:50     ` Mark Pearson
2026-12-04 17:19       ` Rong Zhang
2026-12-04 17:27         ` Mark Pearson
2026-12-04  2:20 ` [PATCH 09/13] platform/x86: lenovo: tlmi: Add authentication sysfs entries Mark Pearson
2026-12-04 13:52   ` Rong Zhang
2026-12-05  9:55   ` kernel test robot
2026-12-04  2:20 ` [PATCH 10/13] platform/x86: lenovo: tlmi: Add platform attribute support Mark Pearson
2026-12-04  2:20 ` [PATCH 11/13] platform/x86: lenovo: tlmi: Add function attributes support Mark Pearson
2026-12-04  2:20 ` [PATCH 12/13] platform/x86: lenovo: tlmi: Add method identifier Mark Pearson
2026-12-04  2:20 ` [PATCH 13/13] docs: ABI: sysfs-class-firmware-attributes: Update Lenovo sections Mark Pearson
2026-12-04 13:19 ` [PATCH 00/13] New Lenovo common WMI driver - tlmi Rong Zhang
2026-12-04 14:42   ` Mark Pearson
2026-12-04 17:49     ` Rong Zhang
2026-12-04 18:22       ` Mark Pearson
2026-12-04 20:04         ` Rong Zhang
  -- strict thread matches above, loose matches on Subject: below --
2026-12-05  9:55 [PATCH 05/13] platform/x86: lenovo: tlmi: New tlmi driver for common WMI implementation kernel test robot

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.