- correct a variable type in the new pci1xxxx driver
- add a new SoC to the qcom-cci driver - fix an issue with the designware driver which now got enough testing - the aspeed driver handles now busy target backends better -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmNDDmYACgkQFA3kzBSg KbY6AxAApJhO3rW3vWsCjOL/qRhZzKM44xFw5b0IiyIuiDoFFed0M1XnPQxWKDsb Hd9llvkO5y7PC87AC1xIjNLxjXZ0BasRCXYFzJ+KEQS7Gn+LZ5sSANzjIJILPqU/ kdbtuRC4qyCHw6rjXWzrENlvwUyI/lJLareWbWH8KR9I7iQiwdm/xA4ETMkyCtHT 2B4VIZoODIQ3jmvIrwBBTVpLtHDhd93EB+nqoRnB9N/Vg1oaTwLRdpzBnELIlUm0 IQktax3soRei9rrmt/ZAUNHun0ulOHx11Y1SgFviauwaZ9fjfjNgqN047sf0QuAI 0D1KblxIo6xJhFHv7Mt6eluNgFqI8uVYwQf16MRD5kIFXiotg5dzaygO8k7yhacc 78p9HTwvOIJPqFHvgdwe6g6sRYiRsy2THks4SIzjDYJVKgeL/4XWleFwOiyEr/P7 dNvZyhy2xR+ZFEkYsq/Y2R72A+rqW79eRJJthGO0q4vb/hKg2CY7aKidSwIJtBSa i7zIkWaICrhwyA5HdDzoahFGi6VSasVwR1nqDu1Heu4/lNaHQ4SBI8y8zVQ75ufR jm8PqSHoFEKRuGgMlj7MjLK7wgDmCHIG1hzjWZee78piNbO/NfRLNzPOuooQejUu pZiaYna7ht5gp9eyYwL+4Zph+DCf0CVfViEAv41TNbbB7B0cPZk= =zzCf -----END PGP SIGNATURE----- Merge tag 'i2c-for-6.1-rc1-batch2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull more i2c updates from Wolfram Sang: - correct a variable type in the new pci1xxxx driver - add a new SoC to the qcom-cci driver - fix an issue with the designware driver which now got enough testing - the aspeed driver now handles busy target backends better * tag 'i2c-for-6.1-rc1-batch2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: aspeed: Assert NAK when slave is busy i2c: designware: Fix handling of real but unexpected device interrupts i2c: qcom-cci: Add MSM8226 compatible dt-bindings: i2c: qcom,i2c-cci: Document clocks for MSM8974 dt-bindings: i2c: qcom,i2c-cci: Document MSM8226 compatible i2c: microchip: pci1xxxx: Fix comparison of -EPERM against an unsigned variable
This commit is contained in:
commit
c440f99695
|
@ -13,6 +13,7 @@ maintainers:
|
|||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,msm8226-cci
|
||||
- qcom,msm8916-cci
|
||||
- qcom,msm8974-cci
|
||||
- qcom,msm8996-cci
|
||||
|
@ -27,11 +28,11 @@ properties:
|
|||
const: 0
|
||||
|
||||
clocks:
|
||||
minItems: 4
|
||||
minItems: 3
|
||||
maxItems: 6
|
||||
|
||||
clock-names:
|
||||
minItems: 4
|
||||
minItems: 3
|
||||
maxItems: 6
|
||||
|
||||
interrupts:
|
||||
|
@ -78,11 +79,29 @@ allOf:
|
|||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,msm8226-cci
|
||||
- qcom,msm8916-cci
|
||||
then:
|
||||
properties:
|
||||
i2c-bus@1: false
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,msm8226-cci
|
||||
- qcom,msm8974-cci
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 3
|
||||
clock-names:
|
||||
items:
|
||||
- const: camss_top_ahb
|
||||
- const: cci_ahb
|
||||
- const: cci
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
|
|
|
@ -244,6 +244,7 @@ static u32 aspeed_i2c_slave_irq(struct aspeed_i2c_bus *bus, u32 irq_status)
|
|||
u32 command, irq_handled = 0;
|
||||
struct i2c_client *slave = bus->slave;
|
||||
u8 value;
|
||||
int ret;
|
||||
|
||||
if (!slave)
|
||||
return 0;
|
||||
|
@ -311,7 +312,13 @@ static u32 aspeed_i2c_slave_irq(struct aspeed_i2c_bus *bus, u32 irq_status)
|
|||
break;
|
||||
case ASPEED_I2C_SLAVE_WRITE_REQUESTED:
|
||||
bus->slave_state = ASPEED_I2C_SLAVE_WRITE_RECEIVED;
|
||||
i2c_slave_event(slave, I2C_SLAVE_WRITE_REQUESTED, &value);
|
||||
ret = i2c_slave_event(slave, I2C_SLAVE_WRITE_REQUESTED, &value);
|
||||
/*
|
||||
* Slave ACK's on this address phase already but as the backend driver
|
||||
* returns an errno, the bus driver should nack the next incoming byte.
|
||||
*/
|
||||
if (ret < 0)
|
||||
writel(ASPEED_I2CD_M_S_RX_CMD_LAST, bus->base + ASPEED_I2C_CMD_REG);
|
||||
break;
|
||||
case ASPEED_I2C_SLAVE_WRITE_RECEIVED:
|
||||
i2c_slave_event(slave, I2C_SLAVE_WRITE_RECEIVED, &value);
|
||||
|
|
|
@ -126,8 +126,9 @@
|
|||
* status codes
|
||||
*/
|
||||
#define STATUS_IDLE 0x0
|
||||
#define STATUS_WRITE_IN_PROGRESS 0x1
|
||||
#define STATUS_READ_IN_PROGRESS 0x2
|
||||
#define STATUS_ACTIVE 0x1
|
||||
#define STATUS_WRITE_IN_PROGRESS 0x2
|
||||
#define STATUS_READ_IN_PROGRESS 0x4
|
||||
|
||||
/*
|
||||
* operation modes
|
||||
|
@ -334,12 +335,14 @@ void i2c_dw_disable_int(struct dw_i2c_dev *dev);
|
|||
|
||||
static inline void __i2c_dw_enable(struct dw_i2c_dev *dev)
|
||||
{
|
||||
dev->status |= STATUS_ACTIVE;
|
||||
regmap_write(dev->map, DW_IC_ENABLE, 1);
|
||||
}
|
||||
|
||||
static inline void __i2c_dw_disable_nowait(struct dw_i2c_dev *dev)
|
||||
{
|
||||
regmap_write(dev->map, DW_IC_ENABLE, 0);
|
||||
dev->status &= ~STATUS_ACTIVE;
|
||||
}
|
||||
|
||||
void __i2c_dw_disable(struct dw_i2c_dev *dev);
|
||||
|
|
|
@ -716,6 +716,19 @@ static int i2c_dw_irq_handler_master(struct dw_i2c_dev *dev)
|
|||
u32 stat;
|
||||
|
||||
stat = i2c_dw_read_clear_intrbits(dev);
|
||||
|
||||
if (!(dev->status & STATUS_ACTIVE)) {
|
||||
/*
|
||||
* Unexpected interrupt in driver point of view. State
|
||||
* variables are either unset or stale so acknowledge and
|
||||
* disable interrupts for suppressing further interrupts if
|
||||
* interrupt really came from this HW (E.g. firmware has left
|
||||
* the HW active).
|
||||
*/
|
||||
regmap_write(dev->map, DW_IC_INTR_MASK, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (stat & DW_IC_INTR_TX_ABRT) {
|
||||
dev->cmd_err |= DW_IC_ERR_TX_ABRT;
|
||||
dev->status = STATUS_IDLE;
|
||||
|
|
|
@ -708,7 +708,7 @@ static void pci1xxxx_i2c_init(struct pci1xxxx_i2c *i2c)
|
|||
void __iomem *p2 = i2c->i2c_base + SMBUS_STATUS_REG_OFF;
|
||||
void __iomem *p1 = i2c->i2c_base + SMB_GPR_REG;
|
||||
u8 regval;
|
||||
u8 ret;
|
||||
int ret;
|
||||
|
||||
ret = set_sys_lock(i2c);
|
||||
if (ret == -EPERM) {
|
||||
|
|
|
@ -807,6 +807,7 @@ static const struct cci_data cci_v2_data = {
|
|||
};
|
||||
|
||||
static const struct of_device_id cci_dt_match[] = {
|
||||
{ .compatible = "qcom,msm8226-cci", .data = &cci_v1_data},
|
||||
{ .compatible = "qcom,msm8916-cci", .data = &cci_v1_data},
|
||||
{ .compatible = "qcom,msm8974-cci", .data = &cci_v1_5_data},
|
||||
{ .compatible = "qcom,msm8996-cci", .data = &cci_v2_data},
|
||||
|
|
Loading…
Reference in New Issue