diff options
| author | Hans Hu <hanshu-oc@zhaoxin.com> | 2024-04-08 10:54:48 +0800 |
|---|---|---|
| committer | Andi Shyti <andi.shyti@kernel.org> | 2024-05-06 00:56:46 +0200 |
| commit | a06b80e83011c996147e94a3bcd9c7387c14abd9 (patch) | |
| tree | 4be36093eb48472a7273256ba4bd7f12868213a2 /drivers/i2c/busses/i2c-viai2c-common.h | |
| parent | b06204c7d4f4a4059c16d20bd9eb618edad49aa1 (diff) | |
| download | linux-a06b80e83011c996147e94a3bcd9c7387c14abd9.tar.gz linux-a06b80e83011c996147e94a3bcd9c7387c14abd9.tar.bz2 linux-a06b80e83011c996147e94a3bcd9c7387c14abd9.zip | |
i2c: add zhaoxin i2c controller driver
Add Zhaoxin I2C controller driver. It provides the access to the i2c
busses, which connects to the touchpad, eeprom, I2S, etc.
Zhaoxin I2C controller has two separate busses, so may accommodate up
to two I2C adapters. Those adapters are listed in the ACPI namespace
with the IIC1D17 HID, and probed by a platform driver.
The driver works with IRQ mode, and supports basic I2C features. Flags
I2C_AQ_NO_ZERO_LEN and I2C_AQ_COMB_WRITE_THEN_READ are used to limit
the unsupported access.
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Hans Hu <hanshu-oc@zhaoxin.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Diffstat (limited to 'drivers/i2c/busses/i2c-viai2c-common.h')
| -rw-r--r-- | drivers/i2c/busses/i2c-viai2c-common.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-viai2c-common.h b/drivers/i2c/busses/i2c-viai2c-common.h index cfe5ab2bd779..81e827c54434 100644 --- a/drivers/i2c/busses/i2c-viai2c-common.h +++ b/drivers/i2c/busses/i2c-viai2c-common.h @@ -52,6 +52,12 @@ enum { VIAI2C_PLAT_WMT, + VIAI2C_PLAT_ZHAOXIN +}; + +enum { + VIAI2C_BYTE_MODE, + VIAI2C_FIFO_MODE }; struct viai2c { @@ -66,11 +72,14 @@ struct viai2c { struct i2c_msg *msg; int ret; bool last; + unsigned int mode; unsigned int platform; + void *pltfm_priv; }; int viai2c_wait_bus_not_busy(struct viai2c *i2c); int viai2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num); int viai2c_init(struct platform_device *pdev, struct viai2c **pi2c, int plat); +int viai2c_fifo_irq_xfer(struct viai2c *i2c, bool irq); #endif |
