@@ -1406,50 +1406,6 @@ static int adis16475_config_irq_pin(struct adis16475 *st)
1406
1406
return 0 ;
1407
1407
}
1408
1408
1409
- static const struct of_device_id adis16475_of_match [] = {
1410
- { .compatible = "adi,adis16470" ,
1411
- .data = & adis16475_chip_info [ADIS16470 ] },
1412
- { .compatible = "adi,adis16475-1" ,
1413
- .data = & adis16475_chip_info [ADIS16475_1 ] },
1414
- { .compatible = "adi,adis16475-2" ,
1415
- .data = & adis16475_chip_info [ADIS16475_2 ] },
1416
- { .compatible = "adi,adis16475-3" ,
1417
- .data = & adis16475_chip_info [ADIS16475_3 ] },
1418
- { .compatible = "adi,adis16477-1" ,
1419
- .data = & adis16475_chip_info [ADIS16477_1 ] },
1420
- { .compatible = "adi,adis16477-2" ,
1421
- .data = & adis16475_chip_info [ADIS16477_2 ] },
1422
- { .compatible = "adi,adis16477-3" ,
1423
- .data = & adis16475_chip_info [ADIS16477_3 ] },
1424
- { .compatible = "adi,adis16465-1" ,
1425
- .data = & adis16475_chip_info [ADIS16465_1 ] },
1426
- { .compatible = "adi,adis16465-2" ,
1427
- .data = & adis16475_chip_info [ADIS16465_2 ] },
1428
- { .compatible = "adi,adis16465-3" ,
1429
- .data = & adis16475_chip_info [ADIS16465_3 ] },
1430
- { .compatible = "adi,adis16467-1" ,
1431
- .data = & adis16475_chip_info [ADIS16467_1 ] },
1432
- { .compatible = "adi,adis16467-2" ,
1433
- .data = & adis16475_chip_info [ADIS16467_2 ] },
1434
- { .compatible = "adi,adis16467-3" ,
1435
- .data = & adis16475_chip_info [ADIS16467_3 ] },
1436
- { .compatible = "adi,adis16500" ,
1437
- .data = & adis16475_chip_info [ADIS16500 ] },
1438
- { .compatible = "adi,adis16505-1" ,
1439
- .data = & adis16475_chip_info [ADIS16505_1 ] },
1440
- { .compatible = "adi,adis16505-2" ,
1441
- .data = & adis16475_chip_info [ADIS16505_2 ] },
1442
- { .compatible = "adi,adis16505-3" ,
1443
- .data = & adis16475_chip_info [ADIS16505_3 ] },
1444
- { .compatible = "adi,adis16507-1" ,
1445
- .data = & adis16475_chip_info [ADIS16507_1 ] },
1446
- { .compatible = "adi,adis16507-2" ,
1447
- .data = & adis16475_chip_info [ADIS16507_2 ] },
1448
- { .compatible = "adi,adis16507-3" ,
1449
- .data = & adis16475_chip_info [ADIS16507_3 ] },
1450
- { },
1451
- };
1452
- MODULE_DEVICE_TABLE (of , adis16475_of_match );
1453
1409
1454
1410
static int adis16475_probe (struct spi_device * spi )
1455
1411
{
@@ -1463,7 +1419,7 @@ static int adis16475_probe(struct spi_device *spi)
1463
1419
1464
1420
st = iio_priv (indio_dev );
1465
1421
1466
- st -> info = device_get_match_data ( & spi -> dev );
1422
+ st -> info = spi_get_device_match_data ( spi );
1467
1423
if (!st -> info )
1468
1424
return - EINVAL ;
1469
1425
@@ -1503,12 +1459,83 @@ static int adis16475_probe(struct spi_device *spi)
1503
1459
return 0 ;
1504
1460
}
1505
1461
1462
+ static const struct of_device_id adis16475_of_match [] = {
1463
+ { .compatible = "adi,adis16470" ,
1464
+ .data = & adis16475_chip_info [ADIS16470 ] },
1465
+ { .compatible = "adi,adis16475-1" ,
1466
+ .data = & adis16475_chip_info [ADIS16475_1 ] },
1467
+ { .compatible = "adi,adis16475-2" ,
1468
+ .data = & adis16475_chip_info [ADIS16475_2 ] },
1469
+ { .compatible = "adi,adis16475-3" ,
1470
+ .data = & adis16475_chip_info [ADIS16475_3 ] },
1471
+ { .compatible = "adi,adis16477-1" ,
1472
+ .data = & adis16475_chip_info [ADIS16477_1 ] },
1473
+ { .compatible = "adi,adis16477-2" ,
1474
+ .data = & adis16475_chip_info [ADIS16477_2 ] },
1475
+ { .compatible = "adi,adis16477-3" ,
1476
+ .data = & adis16475_chip_info [ADIS16477_3 ] },
1477
+ { .compatible = "adi,adis16465-1" ,
1478
+ .data = & adis16475_chip_info [ADIS16465_1 ] },
1479
+ { .compatible = "adi,adis16465-2" ,
1480
+ .data = & adis16475_chip_info [ADIS16465_2 ] },
1481
+ { .compatible = "adi,adis16465-3" ,
1482
+ .data = & adis16475_chip_info [ADIS16465_3 ] },
1483
+ { .compatible = "adi,adis16467-1" ,
1484
+ .data = & adis16475_chip_info [ADIS16467_1 ] },
1485
+ { .compatible = "adi,adis16467-2" ,
1486
+ .data = & adis16475_chip_info [ADIS16467_2 ] },
1487
+ { .compatible = "adi,adis16467-3" ,
1488
+ .data = & adis16475_chip_info [ADIS16467_3 ] },
1489
+ { .compatible = "adi,adis16500" ,
1490
+ .data = & adis16475_chip_info [ADIS16500 ] },
1491
+ { .compatible = "adi,adis16505-1" ,
1492
+ .data = & adis16475_chip_info [ADIS16505_1 ] },
1493
+ { .compatible = "adi,adis16505-2" ,
1494
+ .data = & adis16475_chip_info [ADIS16505_2 ] },
1495
+ { .compatible = "adi,adis16505-3" ,
1496
+ .data = & adis16475_chip_info [ADIS16505_3 ] },
1497
+ { .compatible = "adi,adis16507-1" ,
1498
+ .data = & adis16475_chip_info [ADIS16507_1 ] },
1499
+ { .compatible = "adi,adis16507-2" ,
1500
+ .data = & adis16475_chip_info [ADIS16507_2 ] },
1501
+ { .compatible = "adi,adis16507-3" ,
1502
+ .data = & adis16475_chip_info [ADIS16507_3 ] },
1503
+ { },
1504
+ };
1505
+ MODULE_DEVICE_TABLE (of , adis16475_of_match );
1506
+
1507
+ static const struct spi_device_id adis16475_ids [] = {
1508
+ { "adis16470" , (kernel_ulong_t )& adis16475_chip_info [ADIS16470 ] },
1509
+ { "adis16475-1" , (kernel_ulong_t )& adis16475_chip_info [ADIS16475_1 ] },
1510
+ { "adis16475-2" , (kernel_ulong_t )& adis16475_chip_info [ADIS16475_2 ] },
1511
+ { "adis16475-3" , (kernel_ulong_t )& adis16475_chip_info [ADIS16475_3 ] },
1512
+ { "adis16477-1" , (kernel_ulong_t )& adis16475_chip_info [ADIS16477_1 ] },
1513
+ { "adis16477-2" , (kernel_ulong_t )& adis16475_chip_info [ADIS16477_2 ] },
1514
+ { "adis16477-3" , (kernel_ulong_t )& adis16475_chip_info [ADIS16477_3 ] },
1515
+ { "adis16465-1" , (kernel_ulong_t )& adis16475_chip_info [ADIS16465_1 ] },
1516
+ { "adis16465-2" , (kernel_ulong_t )& adis16475_chip_info [ADIS16465_2 ] },
1517
+ { "adis16465-3" , (kernel_ulong_t )& adis16475_chip_info [ADIS16465_3 ] },
1518
+ { "adis16467-1" , (kernel_ulong_t )& adis16475_chip_info [ADIS16467_1 ] },
1519
+ { "adis16467-2" , (kernel_ulong_t )& adis16475_chip_info [ADIS16467_2 ] },
1520
+ { "adis16467-3" , (kernel_ulong_t )& adis16475_chip_info [ADIS16467_3 ] },
1521
+ { "adis16500" , (kernel_ulong_t )& adis16475_chip_info [ADIS16500 ] },
1522
+ { "adis16505-1" , (kernel_ulong_t )& adis16475_chip_info [ADIS16505_1 ] },
1523
+ { "adis16505-2" , (kernel_ulong_t )& adis16475_chip_info [ADIS16505_2 ] },
1524
+ { "adis16505-3" , (kernel_ulong_t )& adis16475_chip_info [ADIS16505_3 ] },
1525
+ { "adis16507-1" , (kernel_ulong_t )& adis16475_chip_info [ADIS16507_1 ] },
1526
+ { "adis16507-2" , (kernel_ulong_t )& adis16475_chip_info [ADIS16507_2 ] },
1527
+ { "adis16507-3" , (kernel_ulong_t )& adis16475_chip_info [ADIS16507_3 ] },
1528
+ { }
1529
+ };
1530
+ MODULE_DEVICE_TABLE (spi , adis16475_ids );
1531
+
1506
1532
static struct spi_driver adis16475_driver = {
1507
1533
.driver = {
1508
1534
.name = "adis16475" ,
1509
1535
.of_match_table = adis16475_of_match ,
1510
1536
},
1511
1537
.probe = adis16475_probe ,
1538
+ .id_table = adis16475_ids ,
1512
1539
};
1513
1540
module_spi_driver (adis16475_driver );
1514
1541
0 commit comments