Fix block writes on Nuvoton NCT6793D SMBus driver
This commit is contained in:
parent
c2e384ab39
commit
3c95f9fe21
2 changed files with 5 additions and 4 deletions
|
|
@ -107,7 +107,7 @@ s32 i2c_smbus_nuvoton_nct6793d::nct6793d_access(u16 addr, char read_write, u8 co
|
|||
//Load more bytes into FIFO
|
||||
if (len >= 4)
|
||||
{
|
||||
for (i = cnt; i <= 4; i++)
|
||||
for (i = cnt; i <= (cnt + 4); i++)
|
||||
{
|
||||
Out32(SMBHSTDAT, data->block[i]);
|
||||
}
|
||||
|
|
@ -117,7 +117,7 @@ s32 i2c_smbus_nuvoton_nct6793d::nct6793d_access(u16 addr, char read_write, u8 co
|
|||
}
|
||||
else
|
||||
{
|
||||
for (i = cnt; i <= len; i++)
|
||||
for (i = cnt; i <= (cnt + len); i++)
|
||||
{
|
||||
Out32(SMBHSTDAT, data->block[i]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,11 +34,12 @@
|
|||
#define NCT6793D_SOFT_RESET 64
|
||||
|
||||
/* Error register */
|
||||
#define NCT6793D_NO_ACK 32
|
||||
#define NCT6793D_NO_ACK 32
|
||||
|
||||
/* Status register */
|
||||
#define NCT6793D_FIFO_EMPTY 1
|
||||
#define NCT6793D_FIFO_FULL 2
|
||||
#define NCT6793D_MANUAL_ACTIVE 4
|
||||
#define NCT6793D_FIFO_EMPTY 1
|
||||
|
||||
class i2c_smbus_nuvoton_nct6793d : public i2c_smbus_interface
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue