Hi All,
I am new to embedded linux.
I have config the TPS65023 driver(REGULATOR_TPS65023=Y) and set up the device tree according to
https://www.kernel.org/doc/Documentation/devicetree/bindings/regulator/tps65023.txt
i2cdetect show my device register successfully.
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Now I would like to write a client program to control the LDO and DCDC via I2C.
Is there some standard way to achieve this?
I expect something like
include "some_system_file" some_system_function_openI2C(int I2C5); some_system_function_writeBlockI2C(int I2C5, char* data, int length); some_system_function_closeI2C(int I2C5);
I have read https://www.kernel.org/doc/html/latest/i2c/dev-interface.html
The smbus functions seems to fit very nicely. However, the I2C_FUNCS ioctl checking part and user space device driver part make me hesitate whether smbus is really what I want.
any advice would be appreciated.
Leung