Skip to content

Commit cda5d92

Browse files
committed
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
2 parents fd79882 + 65d78b8 commit cda5d92

File tree

6 files changed

+12
-16
lines changed

6 files changed

+12
-16
lines changed

drivers/i2c/busses/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,7 @@ config I2C_LPC2K
764764
config I2C_MLXBF
765765
tristate "Mellanox BlueField I2C controller"
766766
depends on MELLANOX_PLATFORM && ARM64
767+
depends on ACPI
767768
select I2C_SLAVE
768769
help
769770
Enabling this option will add I2C SMBus support for Mellanox BlueField

drivers/i2c/busses/i2c-mlxbf.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2247,7 +2247,6 @@ static struct i2c_adapter_quirks mlxbf_i2c_quirks = {
22472247
.max_write_len = MLXBF_I2C_MASTER_DATA_W_LENGTH,
22482248
};
22492249

2250-
#ifdef CONFIG_ACPI
22512250
static const struct acpi_device_id mlxbf_i2c_acpi_ids[] = {
22522251
{ "MLNXBF03", (kernel_ulong_t)&mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_1] },
22532252
{ "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)
22822281

22832282
return 0;
22842283
}
2285-
#else
2286-
static int mlxbf_i2c_acpi_probe(struct device *dev, struct mlxbf_i2c_priv *priv)
2287-
{
2288-
return -ENOENT;
2289-
}
2290-
#endif /* CONFIG_ACPI */
22912284

22922285
static int mlxbf_i2c_probe(struct platform_device *pdev)
22932286
{
@@ -2490,9 +2483,7 @@ static struct platform_driver mlxbf_i2c_driver = {
24902483
.remove = mlxbf_i2c_remove,
24912484
.driver = {
24922485
.name = "i2c-mlxbf",
2493-
#ifdef CONFIG_ACPI
24942486
.acpi_match_table = ACPI_PTR(mlxbf_i2c_acpi_ids),
2495-
#endif /* CONFIG_ACPI */
24962487
},
24972488
};
24982489

drivers/i2c/busses/i2c-mlxcpld.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#define MLXCPLD_LPCI2C_STATUS_REG 0x9
4141
#define MLXCPLD_LPCI2C_DATA_REG 0xa
4242

43-
/* LPC I2C masks and parametres */
43+
/* LPC I2C masks and parameters */
4444
#define MLXCPLD_LPCI2C_RST_SEL_MASK 0x1
4545
#define MLXCPLD_LPCI2C_TRANS_END 0x1
4646
#define MLXCPLD_LPCI2C_STATUS_NACK 0x10

drivers/i2c/busses/i2c-qcom-cci.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,11 @@ static int cci_probe(struct platform_device *pdev)
639639
if (ret < 0)
640640
goto error;
641641

642+
pm_runtime_set_autosuspend_delay(dev, MSEC_PER_SEC);
643+
pm_runtime_use_autosuspend(dev);
644+
pm_runtime_set_active(dev);
645+
pm_runtime_enable(dev);
646+
642647
for (i = 0; i < cci->data->num_masters; i++) {
643648
if (!cci->master[i].cci)
644649
continue;
@@ -650,14 +655,12 @@ static int cci_probe(struct platform_device *pdev)
650655
}
651656
}
652657

653-
pm_runtime_set_autosuspend_delay(dev, MSEC_PER_SEC);
654-
pm_runtime_use_autosuspend(dev);
655-
pm_runtime_set_active(dev);
656-
pm_runtime_enable(dev);
657-
658658
return 0;
659659

660660
error_i2c:
661+
pm_runtime_disable(dev);
662+
pm_runtime_dont_use_autosuspend(dev);
663+
661664
for (--i ; i >= 0; i--) {
662665
if (cci->master[i].cci) {
663666
i2c_del_adapter(&cci->master[i].adap);

drivers/i2c/busses/i2c-sis630.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ MODULE_PARM_DESC(high_clock,
9797
module_param(force, bool, 0);
9898
MODULE_PARM_DESC(force, "Forcibly enable the SIS630. DANGEROUS!");
9999

100-
/* SMBus base adress */
100+
/* SMBus base address */
101101
static unsigned short smbus_base;
102102

103103
/* supported chips */

drivers/i2c/busses/i2c-xiic.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -920,6 +920,7 @@ static struct platform_driver xiic_i2c_driver = {
920920

921921
module_platform_driver(xiic_i2c_driver);
922922

923+
MODULE_ALIAS("platform:" DRIVER_NAME);
923924
MODULE_AUTHOR("[email protected]");
924925
MODULE_DESCRIPTION("Xilinx I2C bus driver");
925926
MODULE_LICENSE("GPL v2");

0 commit comments

Comments
 (0)