Skip to content

Commit be18c5e

Browse files
Asmaa Mnebhiwsakernel
authored andcommitted
i2c: mlxbf: remove device tree support
BlueField customers have to use the BlueField firmware with UEFI ACPI tables so there is no need to have device tree support in the i2c-mlxbf.c driver. Remove the device tree binding documentation as well. Signed-off-by: Asmaa Mnebhi <asmaa@nvidia.com> Reviewed-by: Khalil Blaiech <kblaiech@nvidia.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
1 parent 19e13e1 commit be18c5e

File tree

3 files changed

+1
-126
lines changed

3 files changed

+1
-126
lines changed

Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.yaml

Lines changed: 0 additions & 77 deletions
This file was deleted.

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12987,7 +12987,6 @@ M: Khalil Blaiech <kblaiech@nvidia.com>
1298712987
M: Asmaa Mnebhi <asmaa@nvidia.com>
1298812988
L: linux-i2c@vger.kernel.org
1298912989
S: Supported
12990-
F: Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.yaml
1299112990
F: drivers/i2c/busses/i2c-mlxbf.c
1299212991

1299312992
MELLANOX ETHERNET DRIVER (mlx4_en)

drivers/i2c/busses/i2c-mlxbf.c

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2247,24 +2247,6 @@ static struct i2c_adapter_quirks mlxbf_i2c_quirks = {
22472247
.max_write_len = MLXBF_I2C_MASTER_DATA_W_LENGTH,
22482248
};
22492249

2250-
static const struct of_device_id mlxbf_i2c_dt_ids[] = {
2251-
{
2252-
.compatible = "mellanox,i2c-mlxbf1",
2253-
.data = &mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_1]
2254-
},
2255-
{
2256-
.compatible = "mellanox,i2c-mlxbf2",
2257-
.data = &mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_2]
2258-
},
2259-
{
2260-
.compatible = "mellanox,i2c-mlxbf3",
2261-
.data = &mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_3]
2262-
},
2263-
{},
2264-
};
2265-
2266-
MODULE_DEVICE_TABLE(of, mlxbf_i2c_dt_ids);
2267-
22682250
#ifdef CONFIG_ACPI
22692251
static const struct acpi_device_id mlxbf_i2c_acpi_ids[] = {
22702252
{ "MLNXBF03", (kernel_ulong_t)&mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_1] },
@@ -2315,31 +2297,6 @@ static int mlxbf_i2c_acpi_probe(struct device *dev, struct mlxbf_i2c_priv *priv)
23152297
}
23162298
#endif /* CONFIG_ACPI */
23172299

2318-
static int mlxbf_i2c_of_probe(struct device *dev, struct mlxbf_i2c_priv *priv)
2319-
{
2320-
const struct of_device_id *oid;
2321-
int bus_id = -1;
2322-
2323-
if (IS_ENABLED(CONFIG_OF) && dev->of_node) {
2324-
oid = of_match_node(mlxbf_i2c_dt_ids, dev->of_node);
2325-
if (!oid)
2326-
return -ENODEV;
2327-
2328-
priv->chip = oid->data;
2329-
2330-
bus_id = of_alias_get_id(dev->of_node, "i2c");
2331-
if (bus_id >= 0)
2332-
priv->bus = bus_id;
2333-
}
2334-
2335-
if (bus_id < 0) {
2336-
dev_err(dev, "Cannot get bus id");
2337-
return bus_id;
2338-
}
2339-
2340-
return 0;
2341-
}
2342-
23432300
static int mlxbf_i2c_probe(struct platform_device *pdev)
23442301
{
23452302
struct device *dev = &pdev->dev;
@@ -2353,14 +2310,11 @@ static int mlxbf_i2c_probe(struct platform_device *pdev)
23532310
return -ENOMEM;
23542311

23552312
ret = mlxbf_i2c_acpi_probe(dev, priv);
2356-
if (ret < 0 && ret != -ENOENT && ret != -ENXIO)
2357-
ret = mlxbf_i2c_of_probe(dev, priv);
2358-
23592313
if (ret < 0)
23602314
return ret;
23612315

23622316
/* This property allows the driver to stay backward compatible with older
2363-
* ACPI table and device trees versions.
2317+
* ACPI tables.
23642318
* Starting BlueField-3 SoC, the "smbus" resource was broken down into 3
23652319
* separate resources "timer", "master" and "slave".
23662320
*/
@@ -2544,7 +2498,6 @@ static struct platform_driver mlxbf_i2c_driver = {
25442498
.remove = mlxbf_i2c_remove,
25452499
.driver = {
25462500
.name = "i2c-mlxbf",
2547-
.of_match_table = mlxbf_i2c_dt_ids,
25482501
#ifdef CONFIG_ACPI
25492502
.acpi_match_table = ACPI_PTR(mlxbf_i2c_acpi_ids),
25502503
#endif /* CONFIG_ACPI */

0 commit comments

Comments
 (0)