]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
mrf24j40: add device-tree support
authorAlexander Aring <alex.aring@gmail.com>
Mon, 21 Sep 2015 09:24:26 +0000 (11:24 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 22 Sep 2015 09:51:21 +0000 (11:51 +0200)
This patch adds devicetree support to mrf24j40 with proper devicetree
compatible strings.

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Documentation/devicetree/bindings/net/ieee802154/mrf24j40.txt [new file with mode: 0644]
MAINTAINERS
drivers/net/ieee802154/mrf24j40.c

diff --git a/Documentation/devicetree/bindings/net/ieee802154/mrf24j40.txt b/Documentation/devicetree/bindings/net/ieee802154/mrf24j40.txt
new file mode 100644 (file)
index 0000000..a4ed2ef
--- /dev/null
@@ -0,0 +1,20 @@
+* MRF24J40 IEEE 802.15.4 *
+
+Required properties:
+  - compatible:                should be "microchip,mrf24j40", "microchip,mrf24j40ma",
+                       or "microchip,mrf24j40mc" depends on your transceiver
+                       board
+  - spi-max-frequency: maximal bus speed, should be set something under or equal
+                       10000000
+  - reg:               the chipselect index
+  - interrupts:                the interrupt generated by the device.
+
+Example:
+
+       mrf24j40ma@0 {
+               compatible = "microchip,mrf24j40ma";
+               spi-max-frequency = <8500000>;
+               reg = <0>;
+               interrupts = <19 8>;
+               interrupt-parent = <&gpio3>;
+       };
index 310da4295c7026e27698e9f8b980adcc1893b774..6790ecc65e6bb0d38f1f4d58856861656a7500da 100644 (file)
@@ -6958,6 +6958,7 @@ M:        Alan Ott <alan@signal11.us>
 L:     linux-wpan@vger.kernel.org
 S:     Maintained
 F:     drivers/net/ieee802154/mrf24j40.c
+F:     Documentation/devicetree/bindings/net/ieee802154/mrf24j40.txt
 
 MSI LAPTOP SUPPORT
 M:     "Lee, Chun-Yi" <jlee@suse.com>
index 41d9f577014869878c2472ad368c2309529fb310..89150bd43ab2840de6dd59bc76d1b23fd51272d2 100644 (file)
@@ -799,6 +799,14 @@ static int mrf24j40_remove(struct spi_device *spi)
        return 0;
 }
 
+static const struct of_device_id mrf24j40_of_match[] = {
+       { .compatible = "microchip,mrf24j40", .data = (void *)MRF24J40 },
+       { .compatible = "microchip,mrf24j40ma", .data = (void *)MRF24J40MA },
+       { .compatible = "microchip,mrf24j40mc", .data = (void *)MRF24J40MC },
+       { },
+};
+MODULE_DEVICE_TABLE(of, mrf24j40_of_match);
+
 static const struct spi_device_id mrf24j40_ids[] = {
        { "mrf24j40", MRF24J40 },
        { "mrf24j40ma", MRF24J40MA },
@@ -809,6 +817,7 @@ MODULE_DEVICE_TABLE(spi, mrf24j40_ids);
 
 static struct spi_driver mrf24j40_driver = {
        .driver = {
+               .of_match_table = of_match_ptr(mrf24j40_of_match),
                .name = "mrf24j40",
                .owner = THIS_MODULE,
        },