mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
i2c: Rename i2c_bus to I2CBus
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
6749695eaa
commit
a5c828525e
35 changed files with 91 additions and 91 deletions
|
@ -208,13 +208,13 @@ static int smbus_device_init(I2CSlave *i2c)
|
|||
}
|
||||
|
||||
/* Master device commands. */
|
||||
void smbus_quick_command(i2c_bus *bus, uint8_t addr, int read)
|
||||
void smbus_quick_command(I2CBus *bus, uint8_t addr, int read)
|
||||
{
|
||||
i2c_start_transfer(bus, addr, read);
|
||||
i2c_end_transfer(bus);
|
||||
}
|
||||
|
||||
uint8_t smbus_receive_byte(i2c_bus *bus, uint8_t addr)
|
||||
uint8_t smbus_receive_byte(I2CBus *bus, uint8_t addr)
|
||||
{
|
||||
uint8_t data;
|
||||
|
||||
|
@ -225,14 +225,14 @@ uint8_t smbus_receive_byte(i2c_bus *bus, uint8_t addr)
|
|||
return data;
|
||||
}
|
||||
|
||||
void smbus_send_byte(i2c_bus *bus, uint8_t addr, uint8_t data)
|
||||
void smbus_send_byte(I2CBus *bus, uint8_t addr, uint8_t data)
|
||||
{
|
||||
i2c_start_transfer(bus, addr, 0);
|
||||
i2c_send(bus, data);
|
||||
i2c_end_transfer(bus);
|
||||
}
|
||||
|
||||
uint8_t smbus_read_byte(i2c_bus *bus, uint8_t addr, uint8_t command)
|
||||
uint8_t smbus_read_byte(I2CBus *bus, uint8_t addr, uint8_t command)
|
||||
{
|
||||
uint8_t data;
|
||||
i2c_start_transfer(bus, addr, 0);
|
||||
|
@ -244,7 +244,7 @@ uint8_t smbus_read_byte(i2c_bus *bus, uint8_t addr, uint8_t command)
|
|||
return data;
|
||||
}
|
||||
|
||||
void smbus_write_byte(i2c_bus *bus, uint8_t addr, uint8_t command, uint8_t data)
|
||||
void smbus_write_byte(I2CBus *bus, uint8_t addr, uint8_t command, uint8_t data)
|
||||
{
|
||||
i2c_start_transfer(bus, addr, 0);
|
||||
i2c_send(bus, command);
|
||||
|
@ -252,7 +252,7 @@ void smbus_write_byte(i2c_bus *bus, uint8_t addr, uint8_t command, uint8_t data)
|
|||
i2c_end_transfer(bus);
|
||||
}
|
||||
|
||||
uint16_t smbus_read_word(i2c_bus *bus, uint8_t addr, uint8_t command)
|
||||
uint16_t smbus_read_word(I2CBus *bus, uint8_t addr, uint8_t command)
|
||||
{
|
||||
uint16_t data;
|
||||
i2c_start_transfer(bus, addr, 0);
|
||||
|
@ -265,7 +265,7 @@ uint16_t smbus_read_word(i2c_bus *bus, uint8_t addr, uint8_t command)
|
|||
return data;
|
||||
}
|
||||
|
||||
void smbus_write_word(i2c_bus *bus, uint8_t addr, uint8_t command, uint16_t data)
|
||||
void smbus_write_word(I2CBus *bus, uint8_t addr, uint8_t command, uint16_t data)
|
||||
{
|
||||
i2c_start_transfer(bus, addr, 0);
|
||||
i2c_send(bus, command);
|
||||
|
@ -274,7 +274,7 @@ void smbus_write_word(i2c_bus *bus, uint8_t addr, uint8_t command, uint16_t data
|
|||
i2c_end_transfer(bus);
|
||||
}
|
||||
|
||||
int smbus_read_block(i2c_bus *bus, uint8_t addr, uint8_t command, uint8_t *data)
|
||||
int smbus_read_block(I2CBus *bus, uint8_t addr, uint8_t command, uint8_t *data)
|
||||
{
|
||||
int len;
|
||||
int i;
|
||||
|
@ -292,7 +292,7 @@ int smbus_read_block(i2c_bus *bus, uint8_t addr, uint8_t command, uint8_t *data)
|
|||
return len;
|
||||
}
|
||||
|
||||
void smbus_write_block(i2c_bus *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 i;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue