attr_current_value_show(9)
β¨ attr_current_value_show(9) β¨
okay bestie, welcome to the Kernel API Manual section 9 page for attr_current_value_show β yes it's a mouthful, no I won't be shortening it, we respect the full name in this house π
πΈ NAME πΈ
attr_current_value_show β literally just "get the current value of the given attribute", that's it, that's the whole gig π
π¦ SYNOPSIS π¦
ssize_t attr_current_value_show (struct kobject *kobj , struct
kobj_attribute *kattr , char *buf , struct tunable_attr_01 *tunable_attr
);
π ARGUMENTS π
kobjβ pointer to the driver object π«Άkattrβ pointer to the attribute that's calling this function, like hi bestie you rang?bufβ the buffer we're gonna write to βοΈtunable_attrβ the attribute that's, yep, being read π
β DESCRIPTION β
So what it does: it retrieves the value of the given attribute for the current smartfan profile. And where does that current smartfan profile come from? The lenovo-wmi-gamezone driver, obviously πββοΈ
This function is intentionally generic β like, main character energy but reusable energy β so it can be called from any integer attribute's "_show" function. no cap, any of them π
And if the WMI is success, the sysfs attribute gets notified π£β¨
π₯ RETURN π₯
Either the number of characters written to buf, or an error code. that's the vibe check π
π SEE ALSO π
The kernel file ./drivers/platform/x86/lenovo/wmi-other.c β go look at it, iykyk π
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)lwmi_attr_01_is_supported(9)lwmi_om_fw_attr_add(9)lwmi_om_fw_attr_remove(9)lwmi_om_master_bind(9)lwmi_om_master_unbind(9)
bestie that's a lot of siblings but they're all iconic in their own way, don't play favorites π
anyway that's the whole page π it lives over in ./drivers/platform/x86/lenovo, dated October 2026 β yes, from the future, we stay ahead π bye ily, go read your sysfs attributes responsibly π§ββοΈβ¨
π¦ 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