pmbus_read_...c_block_data(9)
π 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
- 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