pmbus_read_...c_block_data(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… pmbus_read_...c_block_data(9) πŸ’…

okay so welcome to the Kernel API Manual, bestie β€” yes that's the actual manual name, we're in the big leagues now πŸŽ€ this page is all about pmbus_read_smbus_i2c_block_data and honestly? she's a little baddie with a backup plan.


✨ NAME ✨

pmbus_read_smbus_i2c_block_data β€” literally just here to Read SMBus/I2C block data πŸ¦‹


🌸 SYNOPSIS 🌸

int pmbus_read_smbus_i2c_block_data (struct i2c_client *client , u8 reg
, char *data_buf );

like, that's the whole signature, no notes πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • client β€” the handle to the slave device. your main character connection fr 🫢
  • reg β€” a byte that the slave gets to interpret. cryptic queen, we respect it πŸ‘‘
  • data_buf β€” the byte array where the data gets read into. she's the destination, she's holding the vibes πŸ’–

⭐ RETURN ⭐

either a negative errno (sad girl hours 😭) or the number of bytes read (slay 🌈).


πŸ”₯ DESCRIPTION πŸ”₯

So. This is a PMBus internal function whose whole job is reading a SMBus block from a PMBus chip, no cap.

Here's the tea: PMBus chips report all kinds of properties using SMBus block read operations. BUT β€” and this is the plot twist β€” not every I2C controller supports that operation. tragic, honestly πŸ’€

So the function does this: execute SMBus block read if it's supported. If it's not supported, but SMBus I2C block read is supported, then use that instead. flexible icon behavior ✨

⚠️ but listen β€” note that at most 31 data bytes can be read from the device if i2c_smbus_read_i2c_block_data is used to read the data. This is a SMBUs protocol limit which can not be avoided. not us, not you, not anybody β€” it's just the rules πŸ™ˆ

And if neither I2C_FUNC_SMBUS_READ_BLOCK_DATA nor I2C_FUNC_SMBUS_READ_I2C_BLOCK is supported, it returns -EOPNOTSUPP. both doors locked, she goes home πŸ˜”

🚨 important caveat bestie: callers must hold pmbus_lock or execute calls from the probe function. that is not optional, that's the vibe check and you must pass it 🧚

πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./drivers/hwmon/pmbus/pmbus_core.c β€” go read the source, iykyk πŸ’œ

okay that's the page!! stay hydrated, hold your locks, and remember β€” ./drivers/hwmon/pmbus, October 2026, brought to you by the pmbus_read_...c_block_data(9) girlies πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from