Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eea17309 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull i2c fixes from Wolfram Sang:
 "I2C has a bunch of driver fixes and a core improvement to make the
  on-going API transition more robust"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: mediatek: disable zero-length transfers for mt8183
  i2c: iproc: Stop advertising support of SMBUS quick cmd
  MAINTAINERS: i2c mv64xxx: Update documentation path
  i2c: piix4: Fix port selection for AMD Family 16h Model 30h
  i2c: designware: Synchronize IRQs when unregistering slave client
  i2c: i801: Avoid memory leak in check_acpi_smo88xx_device()
  i2c: make i2c_unregister_device() ERR_PTR safe
parents 95381deb abf4923e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7513,7 +7513,7 @@ I2C MV64XXX MARVELL AND ALLWINNER DRIVER
M:	Gregory CLEMENT <gregory.clement@bootlin.com>
L:	linux-i2c@vger.kernel.org
S:	Maintained
F:	Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
F:	Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml
F:	drivers/i2c/busses/i2c-mv64xxx.c

I2C OVER PARALLEL PORT
+4 −1
Original line number Diff line number Diff line
@@ -790,7 +790,10 @@ static int bcm_iproc_i2c_xfer(struct i2c_adapter *adapter,

static uint32_t bcm_iproc_i2c_functionality(struct i2c_adapter *adap)
{
	u32 val = I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
	u32 val;

	/* We do not support the SMBUS Quick command */
	val = I2C_FUNC_I2C | (I2C_FUNC_SMBUS_EMUL & ~I2C_FUNC_SMBUS_QUICK);

	if (adap->algo->reg_slave)
		val |= I2C_FUNC_SLAVE;
+1 −0
Original line number Diff line number Diff line
@@ -94,6 +94,7 @@ static int i2c_dw_unreg_slave(struct i2c_client *slave)

	dev->disable_int(dev);
	dev->disable(dev);
	synchronize_irq(dev->irq);
	dev->slave = NULL;
	pm_runtime_put(dev->dev);

+12 −3
Original line number Diff line number Diff line
@@ -1194,19 +1194,28 @@ static acpi_status check_acpi_smo88xx_device(acpi_handle obj_handle,
	int i;

	status = acpi_get_object_info(obj_handle, &info);
	if (!ACPI_SUCCESS(status) || !(info->valid & ACPI_VALID_HID))
	if (ACPI_FAILURE(status))
		return AE_OK;

	if (!(info->valid & ACPI_VALID_HID))
		goto smo88xx_not_found;

	hid = info->hardware_id.string;
	if (!hid)
		return AE_OK;
		goto smo88xx_not_found;

	i = match_string(acpi_smo8800_ids, ARRAY_SIZE(acpi_smo8800_ids), hid);
	if (i < 0)
		return AE_OK;
		goto smo88xx_not_found;

	kfree(info);

	*((bool *)return_value) = true;
	return AE_CTRL_TERMINATE;

smo88xx_not_found:
	kfree(info);
	return AE_OK;
}

static bool is_dell_system_with_lis3lv02d(void)
+10 −1
Original line number Diff line number Diff line
@@ -234,6 +234,10 @@ static const struct i2c_adapter_quirks mt7622_i2c_quirks = {
	.max_num_msgs = 255,
};

static const struct i2c_adapter_quirks mt8183_i2c_quirks = {
	.flags = I2C_AQ_NO_ZERO_LEN,
};

static const struct mtk_i2c_compatible mt2712_compat = {
	.regs = mt_i2c_regs_v1,
	.pmic_i2c = 0,
@@ -298,6 +302,7 @@ static const struct mtk_i2c_compatible mt8173_compat = {
};

static const struct mtk_i2c_compatible mt8183_compat = {
	.quirks = &mt8183_i2c_quirks,
	.regs = mt_i2c_regs_v2,
	.pmic_i2c = 0,
	.dcm = 0,
@@ -870,6 +875,10 @@ static irqreturn_t mtk_i2c_irq(int irqno, void *dev_id)

static u32 mtk_i2c_functionality(struct i2c_adapter *adap)
{
	if (adap->quirks->flags & I2C_AQ_NO_ZERO_LEN)
		return I2C_FUNC_I2C |
			(I2C_FUNC_SMBUS_EMUL & ~I2C_FUNC_SMBUS_QUICK);
	else
		return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
}

Loading