X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=include%2Fcros_ec.h;h=b9269341c39fa603caa83ae05507139428e5264b;hb=f5c18e190e3cecede1a413a889c84aec9cc6d34f;hp=850c09e11da431294d2f819720603be5ba0e8d49;hpb=8dd70d89a63e5e61fe502ca9c20a896efba92192;p=karo-tx-uboot.git diff --git a/include/cros_ec.h b/include/cros_ec.h index 850c09e11d..b9269341c3 100644 --- a/include/cros_ec.h +++ b/include/cros_ec.h @@ -350,7 +350,7 @@ int cros_ec_read_build_info(struct cros_ec_dev *dev, char **strp); * @param state new state of the LDO/FET : EC_LDO_STATE_ON|OFF * @return 0 if ok, -1 on error */ -int cros_ec_set_ldo(struct cros_ec_dev *dev, uint8_t index, uint8_t state); +int cros_ec_set_ldo(struct udevice *dev, uint8_t index, uint8_t state); /** * Read back a LDO / FET current state. @@ -360,14 +360,7 @@ int cros_ec_set_ldo(struct cros_ec_dev *dev, uint8_t index, uint8_t state); * @param state current state of the LDO/FET : EC_LDO_STATE_ON|OFF * @return 0 if ok, -1 on error */ -int cros_ec_get_ldo(struct cros_ec_dev *dev, uint8_t index, uint8_t *state); - -/** - * Initialize the Chrome OS EC at board initialization time. - * - * @return 0 if ok, -ve on error - */ -int cros_ec_board_init(void); +int cros_ec_get_ldo(struct udevice *dev, uint8_t index, uint8_t *state); /** * Get access to the error reported when cros_ec_board_init() was called @@ -397,18 +390,14 @@ int cros_ec_decode_ec_flash(const void *blob, int node, */ void cros_ec_check_keyboard(struct cros_ec_dev *dev); +struct i2c_msg; /* * Tunnel an I2C transfer to the EC * * @param dev CROS-EC device - * @param chip Chip address (7-bit I2C address) - * @param addr Register address to read/write - * @param alen Length of register address in bytes - * @param buffer Buffer containing data to read/write - * @param len Length of buffer - * @param is_read 1 if this is a read, 0 if this is a write + * @param msg List of messages to transfer + * @param nmsgs Number of messages to transfer */ -int cros_ec_i2c_xfer(struct cros_ec_dev *dev, uchar chip, uint addr, - int alen, uchar *buffer, int len, int is_read); +int cros_ec_i2c_tunnel(struct udevice *dev, struct i2c_msg *msg, int nmsgs); #endif