Skip to content

Commit e490cef

Browse files
ukleinekbroonie
authored andcommitted
spi: spidev: Align ordering of spidev_spi_ids[] and spidev_dt_ids[]
There is a 1:1 correspondance between the list of spi device-ids and the devicetree compatibles. The latter is ordered alphabetically by vendor and device. To simplify keeping the two lists in sync, mention the vendor in a comment for the spi device-ids and order alphabetically, too. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/20241217114226.1223724-2-u.kleine-koenig@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 8011709 commit e490cef

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

drivers/spi/spidev.c

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -698,20 +698,24 @@ static const struct class spidev_class = {
698698
.name = "spidev",
699699
};
700700

701+
/*
702+
* The spi device ids are expected to match the device names of the
703+
* spidev_dt_ids array below. Both arrays are kept in the same ordering.
704+
*/
701705
static const struct spi_device_id spidev_spi_ids[] = {
702-
{ .name = "bh2228fv" },
703-
{ .name = "dh2228fv" },
704-
{ .name = "jg10309-01" },
705-
{ .name = "ltc2488" },
706-
{ .name = "sx1301" },
707-
{ .name = "bk4" },
708-
{ .name = "bk4-spi" },
709-
{ .name = "dhcom-board" },
710-
{ .name = "m53cpld" },
711-
{ .name = "spi-petra" },
712-
{ .name = "spi-authenta" },
713-
{ .name = "em3581" },
714-
{ .name = "si3210" },
706+
{ .name = /* cisco */ "spi-petra" },
707+
{ .name = /* dh */ "dhcom-board" },
708+
{ .name = /* elgin */ "jg10309-01" },
709+
{ .name = /* lineartechnology */ "ltc2488" },
710+
{ .name = /* lwn */ "bk4" },
711+
{ .name = /* lwn */ "bk4-spi" },
712+
{ .name = /* menlo */ "m53cpld" },
713+
{ .name = /* micron */ "spi-authenta" },
714+
{ .name = /* rohm */ "bh2228fv" },
715+
{ .name = /* rohm */ "dh2228fv" },
716+
{ .name = /* semtech */ "sx1301" },
717+
{ .name = /* silabs */ "em3581" },
718+
{ .name = /* silabs */ "si3210" },
715719
{},
716720
};
717721
MODULE_DEVICE_TABLE(spi, spidev_spi_ids);

0 commit comments

Comments
 (0)