mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
smbus: return -1 if nothing found at the given address
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
285364e968
commit
046a184414
2 changed files with 50 additions and 24 deletions
|
@ -66,16 +66,16 @@ struct SMBusDevice {
|
|||
};
|
||||
|
||||
/* Master device commands. */
|
||||
void smbus_quick_command(I2CBus *bus, uint8_t addr, int read);
|
||||
int smbus_quick_command(I2CBus *bus, uint8_t addr, int read);
|
||||
int smbus_receive_byte(I2CBus *bus, uint8_t addr);
|
||||
void smbus_send_byte(I2CBus *bus, uint8_t addr, uint8_t data);
|
||||
int smbus_send_byte(I2CBus *bus, uint8_t addr, uint8_t data);
|
||||
int smbus_read_byte(I2CBus *bus, uint8_t addr, uint8_t command);
|
||||
void smbus_write_byte(I2CBus *bus, uint8_t addr, uint8_t command, uint8_t data);
|
||||
int smbus_write_byte(I2CBus *bus, uint8_t addr, uint8_t command, uint8_t data);
|
||||
int smbus_read_word(I2CBus *bus, uint8_t addr, uint8_t command);
|
||||
void smbus_write_word(I2CBus *bus, uint8_t addr, uint8_t command, uint16_t data);
|
||||
int smbus_write_word(I2CBus *bus, uint8_t addr, uint8_t command, uint16_t data);
|
||||
int smbus_read_block(I2CBus *bus, uint8_t addr, uint8_t command, uint8_t *data);
|
||||
void smbus_write_block(I2CBus *bus, uint8_t addr, uint8_t command, uint8_t *data,
|
||||
int len);
|
||||
int smbus_write_block(I2CBus *bus, uint8_t addr, uint8_t command, uint8_t *data,
|
||||
int len);
|
||||
|
||||
void smbus_eeprom_init(I2CBus *smbus, int nb_eeprom,
|
||||
const uint8_t *eeprom_spd, int size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue