提交 b01fe98d 编写于 作者: L Linus Torvalds

Merge tag 'i2c-for-6.3-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull more i2c updates from Wolfram Sang:
 "Some improvements/fixes for the newly added GXP driver and a Kconfig
  dependency fix"

* tag 'i2c-for-6.3-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: gxp: fix an error code in probe
  i2c: gxp: return proper error on address NACK
  i2c: gxp: remove "empty" switch statement
  i2c: Disable I2C_APPLE when I2C_PASEMI is a builtin
...@@ -914,6 +914,7 @@ config I2C_PASEMI ...@@ -914,6 +914,7 @@ config I2C_PASEMI
config I2C_APPLE config I2C_APPLE
tristate "Apple SMBus platform driver" tristate "Apple SMBus platform driver"
depends on !I2C_PASEMI
depends on ARCH_APPLE || COMPILE_TEST depends on ARCH_APPLE || COMPILE_TEST
default ARCH_APPLE default ARCH_APPLE
help help
......
...@@ -126,22 +126,13 @@ static int gxp_i2c_master_xfer(struct i2c_adapter *adapter, ...@@ -126,22 +126,13 @@ static int gxp_i2c_master_xfer(struct i2c_adapter *adapter,
time_left = wait_for_completion_timeout(&drvdata->completion, time_left = wait_for_completion_timeout(&drvdata->completion,
adapter->timeout); adapter->timeout);
ret = num - drvdata->msgs_remaining; ret = num - drvdata->msgs_remaining;
if (time_left == 0) { if (time_left == 0)
switch (drvdata->state) {
case GXP_I2C_WDATA_PHASE:
break;
case GXP_I2C_RDATA_PHASE:
break;
case GXP_I2C_ADDR_PHASE:
break;
default:
break;
}
return -ETIMEDOUT; return -ETIMEDOUT;
}
if (drvdata->state == GXP_I2C_ADDR_NACK || if (drvdata->state == GXP_I2C_ADDR_NACK)
drvdata->state == GXP_I2C_DATA_NACK) return -ENXIO;
if (drvdata->state == GXP_I2C_DATA_NACK)
return -EIO; return -EIO;
return ret; return ret;
...@@ -525,7 +516,7 @@ static int gxp_i2c_probe(struct platform_device *pdev) ...@@ -525,7 +516,7 @@ static int gxp_i2c_probe(struct platform_device *pdev)
i2cg_map = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, i2cg_map = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
"hpe,sysreg"); "hpe,sysreg");
if (IS_ERR(i2cg_map)) { if (IS_ERR(i2cg_map)) {
return dev_err_probe(&pdev->dev, IS_ERR(i2cg_map), return dev_err_probe(&pdev->dev, PTR_ERR(i2cg_map),
"failed to map i2cg_handle\n"); "failed to map i2cg_handle\n");
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册