mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
i2c:smbus: Correct the working of quick commands
The logic of handling quick SMBus commands was wrong. If you get a finish event with no data, that's a quick command. Document the quick command while we are at it. Signed-off-by: Corey Minyard <cminyard@mvista.com>
This commit is contained in:
@@ -40,6 +40,11 @@ typedef struct SMBusDevice SMBusDevice;
|
||||
typedef struct SMBusDeviceClass
|
||||
{
|
||||
I2CSlaveClass parent_class;
|
||||
|
||||
/*
|
||||
* An operation with no data, special in SMBus.
|
||||
* This may be NULL, quick commands are ignore in that case.
|
||||
*/
|
||||
void (*quick_cmd)(SMBusDevice *dev, uint8_t read);
|
||||
void (*send_byte)(SMBusDevice *dev, uint8_t val);
|
||||
uint8_t (*receive_byte)(SMBusDevice *dev);
|
||||
|
||||
Reference in New Issue
Block a user