Commit cda5d920 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'i2c-for-6.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
 "RPM fix for qcom-cci, platform module alias for xiic, build warning
  fix for mlxbf, typo fixes in comments"

* tag 'i2c-for-6.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: mlxbf: depend on ACPI; clean away ifdeffage
  i2c: fix spelling typos in comments
  i2c: qcom-cci: Fix ordering of pm_runtime_xx and i2c_add_adapter
  i2c: xiic: Add platform module alias
parents fd79882f 65d78b8d
...@@ -764,6 +764,7 @@ config I2C_LPC2K ...@@ -764,6 +764,7 @@ config I2C_LPC2K
config I2C_MLXBF config I2C_MLXBF
tristate "Mellanox BlueField I2C controller" tristate "Mellanox BlueField I2C controller"
depends on MELLANOX_PLATFORM && ARM64 depends on MELLANOX_PLATFORM && ARM64
depends on ACPI
select I2C_SLAVE select I2C_SLAVE
help help
Enabling this option will add I2C SMBus support for Mellanox BlueField Enabling this option will add I2C SMBus support for Mellanox BlueField
......
...@@ -2247,7 +2247,6 @@ static struct i2c_adapter_quirks mlxbf_i2c_quirks = { ...@@ -2247,7 +2247,6 @@ static struct i2c_adapter_quirks mlxbf_i2c_quirks = {
.max_write_len = MLXBF_I2C_MASTER_DATA_W_LENGTH, .max_write_len = MLXBF_I2C_MASTER_DATA_W_LENGTH,
}; };
#ifdef CONFIG_ACPI
static const struct acpi_device_id mlxbf_i2c_acpi_ids[] = { static const struct acpi_device_id mlxbf_i2c_acpi_ids[] = {
{ "MLNXBF03", (kernel_ulong_t)&mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_1] }, { "MLNXBF03", (kernel_ulong_t)&mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_1] },
{ "MLNXBF23", (kernel_ulong_t)&mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_2] }, { "MLNXBF23", (kernel_ulong_t)&mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_2] },
...@@ -2282,12 +2281,6 @@ static int mlxbf_i2c_acpi_probe(struct device *dev, struct mlxbf_i2c_priv *priv) ...@@ -2282,12 +2281,6 @@ static int mlxbf_i2c_acpi_probe(struct device *dev, struct mlxbf_i2c_priv *priv)
return 0; return 0;
} }
#else
static int mlxbf_i2c_acpi_probe(struct device *dev, struct mlxbf_i2c_priv *priv)
{
return -ENOENT;
}
#endif /* CONFIG_ACPI */
static int mlxbf_i2c_probe(struct platform_device *pdev) static int mlxbf_i2c_probe(struct platform_device *pdev)
{ {
...@@ -2490,9 +2483,7 @@ static struct platform_driver mlxbf_i2c_driver = { ...@@ -2490,9 +2483,7 @@ static struct platform_driver mlxbf_i2c_driver = {
.remove = mlxbf_i2c_remove, .remove = mlxbf_i2c_remove,
.driver = { .driver = {
.name = "i2c-mlxbf", .name = "i2c-mlxbf",
#ifdef CONFIG_ACPI
.acpi_match_table = ACPI_PTR(mlxbf_i2c_acpi_ids), .acpi_match_table = ACPI_PTR(mlxbf_i2c_acpi_ids),
#endif /* CONFIG_ACPI */
}, },
}; };
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#define MLXCPLD_LPCI2C_STATUS_REG 0x9 #define MLXCPLD_LPCI2C_STATUS_REG 0x9
#define MLXCPLD_LPCI2C_DATA_REG 0xa #define MLXCPLD_LPCI2C_DATA_REG 0xa
/* LPC I2C masks and parametres */ /* LPC I2C masks and parameters */
#define MLXCPLD_LPCI2C_RST_SEL_MASK 0x1 #define MLXCPLD_LPCI2C_RST_SEL_MASK 0x1
#define MLXCPLD_LPCI2C_TRANS_END 0x1 #define MLXCPLD_LPCI2C_TRANS_END 0x1
#define MLXCPLD_LPCI2C_STATUS_NACK 0x10 #define MLXCPLD_LPCI2C_STATUS_NACK 0x10
......
...@@ -639,6 +639,11 @@ static int cci_probe(struct platform_device *pdev) ...@@ -639,6 +639,11 @@ static int cci_probe(struct platform_device *pdev)
if (ret < 0) if (ret < 0)
goto error; goto error;
pm_runtime_set_autosuspend_delay(dev, MSEC_PER_SEC);
pm_runtime_use_autosuspend(dev);
pm_runtime_set_active(dev);
pm_runtime_enable(dev);
for (i = 0; i < cci->data->num_masters; i++) { for (i = 0; i < cci->data->num_masters; i++) {
if (!cci->master[i].cci) if (!cci->master[i].cci)
continue; continue;
...@@ -650,14 +655,12 @@ static int cci_probe(struct platform_device *pdev) ...@@ -650,14 +655,12 @@ static int cci_probe(struct platform_device *pdev)
} }
} }
pm_runtime_set_autosuspend_delay(dev, MSEC_PER_SEC);
pm_runtime_use_autosuspend(dev);
pm_runtime_set_active(dev);
pm_runtime_enable(dev);
return 0; return 0;
error_i2c: error_i2c:
pm_runtime_disable(dev);
pm_runtime_dont_use_autosuspend(dev);
for (--i ; i >= 0; i--) { for (--i ; i >= 0; i--) {
if (cci->master[i].cci) { if (cci->master[i].cci) {
i2c_del_adapter(&cci->master[i].adap); i2c_del_adapter(&cci->master[i].adap);
......
...@@ -97,7 +97,7 @@ MODULE_PARM_DESC(high_clock, ...@@ -97,7 +97,7 @@ MODULE_PARM_DESC(high_clock,
module_param(force, bool, 0); module_param(force, bool, 0);
MODULE_PARM_DESC(force, "Forcibly enable the SIS630. DANGEROUS!"); MODULE_PARM_DESC(force, "Forcibly enable the SIS630. DANGEROUS!");
/* SMBus base adress */ /* SMBus base address */
static unsigned short smbus_base; static unsigned short smbus_base;
/* supported chips */ /* supported chips */
......
...@@ -920,6 +920,7 @@ static struct platform_driver xiic_i2c_driver = { ...@@ -920,6 +920,7 @@ static struct platform_driver xiic_i2c_driver = {
module_platform_driver(xiic_i2c_driver); module_platform_driver(xiic_i2c_driver);
MODULE_ALIAS("platform:" DRIVER_NAME);
MODULE_AUTHOR("info@mocean-labs.com"); MODULE_AUTHOR("info@mocean-labs.com");
MODULE_DESCRIPTION("Xilinx I2C bus driver"); MODULE_DESCRIPTION("Xilinx I2C bus driver");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment