aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Stilwell <stilwellt@openlabs.co>2014-03-10 20:29:25 -0400
committerDavid S. Miller <davem@davemloft.net>2014-03-12 00:05:36 -0400
commit48d5dbaf9412c79a3fd75b6dbff7aa80ceb75cc4 (patch)
tree8f27a1032e184adff0b43efb8e1d72d676afff8e
parent62cf4be9899dafe0fd84cbdf5352a01d8f1ea326 (diff)
ieee802154: at86rf230: add support for rf233 chip
The rf233 and rf231 are sufficiently similar that we can treat rf233 like rf231. rf233 is missing some features that rf231 has, but we don't currently make use of them so there's nothing to handle differently yet. Should we add support in the future for rf231 *_NOCLK or SLEEP states, or PAD_IO drive strength, exceptions will need to be made for rf233. Signed-off-by: Thomas Stilwell <stilwellt@openlabs.co> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ieee802154/Kconfig4
-rw-r--r--drivers/net/ieee802154/at86rf230.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/ieee802154/Kconfig b/drivers/net/ieee802154/Kconfig
index 9aa06ec1e8a8..3e89beab64fd 100644
--- a/drivers/net/ieee802154/Kconfig
+++ b/drivers/net/ieee802154/Kconfig
@@ -32,10 +32,10 @@ config IEEE802154_FAKELB
32 32
33config IEEE802154_AT86RF230 33config IEEE802154_AT86RF230
34 depends on IEEE802154_DRIVERS && MAC802154 34 depends on IEEE802154_DRIVERS && MAC802154
35 tristate "AT86RF230/231/212 transceiver driver" 35 tristate "AT86RF230/231/233/212 transceiver driver"
36 depends on SPI 36 depends on SPI
37 ---help--- 37 ---help---
38 Say Y here to enable the at86rf230/231/212 SPI 802.15.4 wireless 38 Say Y here to enable the at86rf230/231/233/212 SPI 802.15.4 wireless
39 controller. 39 controller.
40 40
41 This driver can also be built as a module. To do so, say M here. 41 This driver can also be built as a module. To do so, say M here.
diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
index 03e24c560b2e..b8e732121a85 100644
--- a/drivers/net/ieee802154/at86rf230.c
+++ b/drivers/net/ieee802154/at86rf230.c
@@ -244,6 +244,7 @@ static bool is_rf212(struct at86rf230_local *local)
244#define STATE_TX_ON 0x09 244#define STATE_TX_ON 0x09
245/* 0x0a - 0x0e */ /* 0x0a - UNSUPPORTED_ATTRIBUTE */ 245/* 0x0a - 0x0e */ /* 0x0a - UNSUPPORTED_ATTRIBUTE */
246#define STATE_SLEEP 0x0F 246#define STATE_SLEEP 0x0F
247#define STATE_PREP_DEEP_SLEEP 0x10
247#define STATE_BUSY_RX_AACK 0x11 248#define STATE_BUSY_RX_AACK 0x11
248#define STATE_BUSY_TX_ARET 0x12 249#define STATE_BUSY_TX_ARET 0x12
249#define STATE_RX_AACK_ON 0x16 250#define STATE_RX_AACK_ON 0x16
@@ -1108,6 +1109,10 @@ static int at86rf230_probe(struct spi_device *spi)
1108 if (version == 1) 1109 if (version == 1)
1109 ops = &at86rf212_ops; 1110 ops = &at86rf212_ops;
1110 break; 1111 break;
1112 case 11:
1113 chip = "at86rf233";
1114 ops = &at86rf230_ops;
1115 break;
1111 default: 1116 default:
1112 chip = "UNKNOWN"; 1117 chip = "UNKNOWN";
1113 break; 1118 break;