]> git.sur5r.net Git - u-boot/commit
sandbox: Rewrite i2c_pmic_emul.c to support PMIC with 3 bytes transmission
authorLukasz Majewski <lukma@denx.de>
Tue, 15 May 2018 14:26:39 +0000 (16:26 +0200)
committerStefano Babic <sbabic@denx.de>
Fri, 18 May 2018 06:27:26 +0000 (08:27 +0200)
commita65e644033c7534bd3391ca5305523e1fadb99a9
tree713d65a0ba4251ee1f79ce27d0ec303b64877982
parentd4505c8e0dec72effc1b6017eafe1f6aa025cc5d
sandbox: Rewrite i2c_pmic_emul.c to support PMIC with 3 bytes transmission

This change enables support for MC34708 PMIC in sandbox. Now we can
emulate the I2C transfers larger than 1 byte.

Notable changes for this driver:

- From now on the register number is not equal to index in the buffer,
  which emulates the PMIC registers

- The PMIC register's pool is now dynamically allocated up till
  64 regs * 3 bytes each = 192 B

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/power/pmic/i2c_pmic_emul.c