about i2cset tool
Brandon Wyman
bjwyman at gmail.com
Wed May 20 05:24:47 AEST 2020
On 2020-05-19 02:40, zhouyuanqing8 at outlook.com wrote:
> Hi All
>
> I use the i2cget to read the device data, but the i2cset did not
> write the data to the device, and the operation of i2cset did not
> report any errors.
>
> for example:
>
> root at starlake-bmc:/usr/sbin# i2cget 9 0x10 0x00 i 3
> WARNING! This program can confuse your I2C bus, cause data loss and worse!
> I will read from device file /dev/i2c-9, chip address 0x10, data address
> 0x00, 3 bytes using read I2C block data.
> Continue? [Y/n]
> 3: 0x02 0x32 0xcc
>
> root at starlake-bmc:/usr/sbin# i2cset 9 0x10 0x82 0x0101 2
> WARNING! This program can confuse your I2C bus, cause data loss and worse!
> I will read from device file /dev/i2c-9, chip address 0x10, data address
> 0x00, using read word data.
Well, that is a bit odd. It looks like that just did a read, not a write.
Do you need to use the force access option? What is that 2? Should it be
a word (w)?
https://linux.die.net/man/8/i2cset
i2cset -f 9 0x10 0x82 0x0101 w
>
> when I check the 0x82 reg,the value is not changed.
>
> Thanks
> harley
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20200519/4a0ae71c/attachment.htm>
More information about the openbmc
mailing list