drivers/platform/x86/lenovo/think-lmi.h
Source file repositories/reference/linux-study-clean/drivers/platform/x86/lenovo/think-lmi.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/platform/x86/lenovo/think-lmi.h- Extension
.h- Size
- 3219 bytes
- Lines
- 141
- Domain
- Driver Families
- Bucket
- drivers/platform
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/wmi.h
Detected Declarations
struct tlmi_err_codesstruct tlmi_cert_guidsstruct tlmi_pwdcfg_corestruct tlmi_pwdcfg_extstruct tlmi_pwdcfgstruct tlmi_pwd_settingstruct tlmi_attr_settingstruct think_lmienum encoding_optionenum level_optionenum save_mode
Annotated Snippet
struct tlmi_err_codes {
const char *err_str;
int err_code;
};
enum encoding_option {
TLMI_ENCODING_ASCII,
TLMI_ENCODING_SCANCODE,
};
enum level_option {
TLMI_LEVEL_USER,
TLMI_LEVEL_MASTER,
};
/*
* There are a limit on the number of WMI operations you can do if you use
* the default implementation of saving on every set. This is due to a
* limitation in EFI variable space used.
* Have a 'bulk save' mode where you can manually trigger the save, and can
* therefore set unlimited variables - for users that need it.
*/
enum save_mode {
TLMI_SAVE_SINGLE,
TLMI_SAVE_BULK,
TLMI_SAVE_SAVE,
};
/* GUIDs can differ between platforms */
struct tlmi_cert_guids {
const char *thumbprint;
const char *set_bios_setting;
const char *save_bios_setting;
const char *cert_to_password;
const char *clear_bios_cert;
const char *update_bios_cert;
const char *set_bios_cert;
};
/* password configuration details */
#define TLMI_PWDCFG_MODE_LEGACY 0
#define TLMI_PWDCFG_MODE_PASSWORD 1
#define TLMI_PWDCFG_MODE_MULTICERT 3
struct tlmi_pwdcfg_core {
uint32_t password_mode;
uint32_t password_state;
uint32_t min_length;
uint32_t max_length;
uint32_t supported_encodings;
uint32_t supported_keyboard;
};
struct tlmi_pwdcfg_ext {
uint32_t hdd_user_password;
uint32_t hdd_master_password;
uint32_t nvme_user_password;
uint32_t nvme_master_password;
};
struct tlmi_pwdcfg {
struct tlmi_pwdcfg_core core;
struct tlmi_pwdcfg_ext ext;
};
/* password setting details */
struct tlmi_pwd_setting {
struct kobject kobj;
bool pwd_enabled;
char password[TLMI_PWD_BUFSIZE];
const char *pwd_type;
const char *role;
int minlen;
int maxlen;
enum encoding_option encoding;
char kbdlang[TLMI_LANG_MAXLEN];
int index; /*Used for HDD and NVME auth */
enum level_option level;
bool cert_installed;
char *signature;
char *save_signature;
};
/* Attribute setting details */
struct tlmi_attr_setting {
struct kobject kobj;
struct wmi_device *wdev;
int index;
char name[TLMI_SETTINGS_MAXLEN];
char display_name[TLMI_SETTINGS_MAXLEN];
Annotation
- Immediate include surface: `linux/types.h`, `linux/wmi.h`.
- Detected declarations: `struct tlmi_err_codes`, `struct tlmi_cert_guids`, `struct tlmi_pwdcfg_core`, `struct tlmi_pwdcfg_ext`, `struct tlmi_pwdcfg`, `struct tlmi_pwd_setting`, `struct tlmi_attr_setting`, `struct think_lmi`, `enum encoding_option`, `enum level_option`.
- Atlas domain: Driver Families / drivers/platform.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.