19 Sep
2023
19 Sep
'23
2:42 p.m.
+static int rtq9128_i2c_write(void *context, const void *data, size_t count) +{
- struct device *dev = context;
- struct i2c_client *i2c = to_i2c_client(dev);
- u8 reg = *(u8 *)data;
- int rg_size;
- BUG_ON(count != 5);
is this really necessary? Just log and error and return? same comments for other functions
- rg_size = rtq9128_get_reg_size(reg);
- return i2c_smbus_write_i2c_block_data(i2c, reg, rg_size, data + count - rg_size);
+}