@@ -2247,24 +2247,6 @@ static struct i2c_adapter_quirks mlxbf_i2c_quirks = {
2247
2247
.max_write_len = MLXBF_I2C_MASTER_DATA_W_LENGTH ,
2248
2248
};
2249
2249
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
-
2268
2250
#ifdef CONFIG_ACPI
2269
2251
static const struct acpi_device_id mlxbf_i2c_acpi_ids [] = {
2270
2252
{ "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)
2315
2297
}
2316
2298
#endif /* CONFIG_ACPI */
2317
2299
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
-
2343
2300
static int mlxbf_i2c_probe (struct platform_device * pdev )
2344
2301
{
2345
2302
struct device * dev = & pdev -> dev ;
@@ -2353,14 +2310,11 @@ static int mlxbf_i2c_probe(struct platform_device *pdev)
2353
2310
return - ENOMEM ;
2354
2311
2355
2312
ret = mlxbf_i2c_acpi_probe (dev , priv );
2356
- if (ret < 0 && ret != - ENOENT && ret != - ENXIO )
2357
- ret = mlxbf_i2c_of_probe (dev , priv );
2358
-
2359
2313
if (ret < 0 )
2360
2314
return ret ;
2361
2315
2362
2316
/* This property allows the driver to stay backward compatible with older
2363
- * ACPI table and device trees versions .
2317
+ * ACPI tables .
2364
2318
* Starting BlueField-3 SoC, the "smbus" resource was broken down into 3
2365
2319
* separate resources "timer", "master" and "slave".
2366
2320
*/
@@ -2544,7 +2498,6 @@ static struct platform_driver mlxbf_i2c_driver = {
2544
2498
.remove = mlxbf_i2c_remove ,
2545
2499
.driver = {
2546
2500
.name = "i2c-mlxbf" ,
2547
- .of_match_table = mlxbf_i2c_dt_ids ,
2548
2501
#ifdef CONFIG_ACPI
2549
2502
.acpi_match_table = ACPI_PTR (mlxbf_i2c_acpi_ids ),
2550
2503
#endif /* CONFIG_ACPI */
0 commit comments