X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=blobdiff_plain;f=include%2Fcros_ec.h;h=84f9104d36dd33eb18f60191ec5828ee8e774e24;hp=1199d923354c30e8a3926a80e52b6d50d6778784;hb=a60702833150b8f9263a5f1fb9a6b64774cd44f3;hpb=2d8ede58ca5873f485c7691b1ca1c1bc6aae7212 diff --git a/include/cros_ec.h b/include/cros_ec.h index 1199d92335..84f9104d36 100644 --- a/include/cros_ec.h +++ b/include/cros_ec.h @@ -311,6 +311,19 @@ int cros_ec_spi_command(struct cros_ec_dev *dev, uint8_t cmd, int cmd_version, const uint8_t *dout, int dout_len, uint8_t **dinp, int din_len); +/** + * Send a packet to a CROS-EC device and return the response packet. + * + * Expects the request packet to be stored in dev->dout. Stores the response + * packet in dev->din. + * + * @param dev CROS-EC device + * @param out_bytes Size of request packet to output + * @param in_bytes Maximum size of response packet to receive + * @return number of bytes in response packet, or <0 on error + */ +int cros_ec_spi_packet(struct cros_ec_dev *dev, int out_bytes, int in_bytes); + /** * Dump a block of data for a command. *