lwmi_attr_01_is_supported(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… lwmi_attr_01_is_supported β€” the kernel API manual, bestie edition πŸŽ€

okay so real talk, this one lives in the 9 section of the Kernel API Manual, and it's literally just the vibe check for attributes ✨


🌸 NAME 🌸

lwmi_attr_01_is_supported β€” figures out if the attribute you handed it is actually supported or not, no cap πŸ”


✨ SYNOPSIS ✨

bool lwmi_attr_01_is_supported (struct tunable_attr_01 *tunable_attr );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • tunable_attr β€” the attribute we're verifying. like, the one under investigation πŸ•΅οΈβ€β™€οΈ

πŸ’– DESCRIPTION πŸ’–

so for an attribute to count as supported, it needs two things: a functional get/set method, and associated capability data stored in the capdata01 table. both. it's giving package deal 🫢

first up, we check if the attribute has a corresponding data table under custom mode (0xff), and then under no mode (0x00). if either of those passes, we check whether the supported field of the capdata struct is > 0. and if it is supported, we store the successful mode in the cd_mode_id field of tunable_attr. slay, one down πŸ’…

then, if the attribute capdata shows it's supported, we try to determine the mode for the current value property get/set methods β€” using a similar pattern to the capdata table check. if the value returned by either mode is 0 or an error, we assume that mode isn't supported (sorry bestie 😭). otherwise, we store the successful mode in the cv_mode_id field of tunable_attr. second slay πŸ”₯

and if any of the above checks fail? then the attribute is not fully supported. periodt. πŸ’€


πŸ‘‘ RETURN πŸ‘‘

returns true if capdata and set/get modes are found, otherwise false. that's it, that's the whole answer ⭐


🌈 SEE ALSO 🌈

kernel file ./drivers/platform/x86/lenovo/wmi-other.c

lwmi_om_fan_get_set(9), lwmi_om_hwmon_is_visible(9), lwmi_om_hwmon_read(9), lwmi_om_hwmon_write(9), lwmi_om_hwmon_add(9), lwmi_om_hwmon_remove(9), lwmi_om_fan_info_init(9), lwmi_om_fan_info_collect_cd00(9), lwmi_om_fan_info_collect_cd_fan(9), lwmi_psy_ext_get_prop(9), lwmi_psy_ext_set_prop(9), lwmi_psy_prop_is_supported(9), lwmi_psy_prop_is_writeable(9), lwmi_add_battery(9), lwmi_remove_battery(9), lwmi_acpi_match(9), lwmi_om_psy_ext_init(9), lwmi_om_psy_remove(9), tunable_attr_01_id(9), int_type_show(9), attr_capdata01_show(9), attr_current_value_store(9), attr_current_value_show(9), lwmi_om_fw_attr_add(9), lwmi_om_fw_attr_remove(9), lwmi_om_master_bind(9), lwmi_om_master_unbind(9)


that's the whole page, mwah πŸ’‹ toodles β€” brought to you by the source at ./drivers/platform/x86/lenovo, dated October 2026 πŸ—“οΈβœ¨

πŸ“¦ where this page comes from