I have a GPIO I2C device as followed by DTS:
&i2c0 {
pca_1: pca9554@23 {
reg = <0x23>;
compatible = "nxp,pca9554";
};
};
The device is working as expected, and I am now able to set these values from Linux user space which is perfect.
What I now want is to change some code in the kernel so I can change one of the GPIO expenders from kernel space. What I do now not understand is the following function which I would have to use:
I found this function which I could use: pca953x_write_regs_8(struct pca953x_chip *chip, int reg, u8 *val)
Which calls: i2c_smbus_write_byte_data(const struct i2c_client *client, u8 command, u8 value)
I do now not understand how I could get this i2c_client in kernel space. Does anybody now how I can be able to access this?