lwmi_attr_01_is_supported(9)
π 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms