提交 2e6fd648 编写于 作者: A Alexander Aring 提交者: Marcel Holtmann

mrf24j40: add device-tree support

This patch adds devicetree support to mrf24j40 with proper devicetree
compatible strings.
Reviewed-by: NStefan Schmidt <stefan@osg.samsung.com>
Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 78aedb6b
* 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>;
};
...@@ -6958,6 +6958,7 @@ M: Alan Ott <alan@signal11.us> ...@@ -6958,6 +6958,7 @@ M: Alan Ott <alan@signal11.us>
L: linux-wpan@vger.kernel.org L: linux-wpan@vger.kernel.org
S: Maintained S: Maintained
F: drivers/net/ieee802154/mrf24j40.c F: drivers/net/ieee802154/mrf24j40.c
F: Documentation/devicetree/bindings/net/ieee802154/mrf24j40.txt
MSI LAPTOP SUPPORT MSI LAPTOP SUPPORT
M: "Lee, Chun-Yi" <jlee@suse.com> M: "Lee, Chun-Yi" <jlee@suse.com>
......
...@@ -799,6 +799,14 @@ static int mrf24j40_remove(struct spi_device *spi) ...@@ -799,6 +799,14 @@ static int mrf24j40_remove(struct spi_device *spi)
return 0; 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[] = { static const struct spi_device_id mrf24j40_ids[] = {
{ "mrf24j40", MRF24J40 }, { "mrf24j40", MRF24J40 },
{ "mrf24j40ma", MRF24J40MA }, { "mrf24j40ma", MRF24J40MA },
...@@ -809,6 +817,7 @@ MODULE_DEVICE_TABLE(spi, mrf24j40_ids); ...@@ -809,6 +817,7 @@ MODULE_DEVICE_TABLE(spi, mrf24j40_ids);
static struct spi_driver mrf24j40_driver = { static struct spi_driver mrf24j40_driver = {
.driver = { .driver = {
.of_match_table = of_match_ptr(mrf24j40_of_match),
.name = "mrf24j40", .name = "mrf24j40",
.owner = THIS_MODULE, .owner = THIS_MODULE,
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册