sht21_temperature_show(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– sht21_temperature_show(9) β€” the Kernel API Manual, bestie edition πŸ’–

okay so we're deep in the kernel API manual rn and this page is all about sht21_temperature_show β€” yes that's a mouthful, yes it slays ✨


πŸŽ€ NAME πŸŽ€

sht21_temperature_show β€” literally just here to show the temperature measurement value in sysfs πŸ₯΅πŸŒ‘️


✨ SYNOPSIS ✨

ssize_t sht21_temperature_show (struct device *dev , struct
       device_attribute *attr , char *buf );

that's the whole vibe right there, no notes πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the device, bestie. that's it, that's the arg 🫢
  • attr β€” the device attribute πŸŽ€
  • buf β€” the sysfs buffer (PAGE_SIZE) where the measurement values get written to. so like, that's where the numbers go πŸ“

🌸 DESCRIPTION 🌸

the way this function gets called on read access to the temp1_input sysfs attribute β€” iconic behavior honestly πŸ‘‘

it returns the number of bytes written into the buffer, and a negative errno on error 😭 (so if you see a negative number, that's the universe telling you something went wrong, fr fr)

ngl there's no extra lore here β€” read = call, bytes out or negative errno out. periodt. πŸ’€

πŸ’œ SEE ALSO πŸ’œ

  • the kernel file ./drivers/hwmon/sht21.c πŸ—‚οΈ
  • struct sht21(9)
  • sht21_temp_ticks_to_millicelsius(9)
  • sht21_rh_ticks_to_per_cent_mille(9)
  • sht21_update_measurements(9)
  • sht21_humidity_show(9)
  • eic_show(9)

go read those next, iykyk πŸ“šβœ¨ β€” they're the whole friend group and this function is just one member of it 🌈


and that's a wrap on the sht21_temperature_show(9) lore drop!! this page lives over in ./drivers/hwmon, dated October 2026, and it's brought to you by the Kernel API Manual itself β€” mwah, sending you all the kernel love, stay hydrated, compile clean, and don't forget to check your errno πŸ’–πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ”₯πŸ‘‘β­πŸ™ˆπŸ“πŸ§šπŸ’œ

πŸ“¦ where this page comes from