* [PATCH 0/4] Misc MRF24J40 Fixes
@ 2013-03-18 22:06 Alan Ott
2013-03-18 22:06 ` [PATCH 1/4] mrf24j40: pinctrl support Alan Ott
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Alan Ott @ 2013-03-18 22:06 UTC (permalink / raw)
To: linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
netdev-u79uwXL29TY76Z2rM5mHXA
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Alan Ott
These are fairly straight-forward.
Alan Ott (4):
mrf24j40: pinctrl support
mrf24j40: Warn if transmit interrupts timeout
mrf24j40: Increase max SPI speed to 10MHz
mrf24j40: Fix byte-order of IEEE address
drivers/net/ieee802154/mrf24j40.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
--
1.7.11.2
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/4] mrf24j40: pinctrl support
2013-03-18 22:06 [PATCH 0/4] Misc MRF24J40 Fixes Alan Ott
@ 2013-03-18 22:06 ` Alan Ott
[not found] ` <1363644403-11003-1-git-send-email-alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
2013-03-19 14:08 ` [PATCH 0/4] Misc MRF24J40 Fixes David Miller
2 siblings, 0 replies; 6+ messages in thread
From: Alan Ott @ 2013-03-18 22:06 UTC (permalink / raw)
To: linux-zigbee-devel, netdev
Cc: Alexander Smirnov, Dmitry Eremin-Solenikov, linux-kernel,
Alan Ott
Activate pinctrl settings when used with a DT system.
Signed-off-by: Alan Ott <alan@signal11.us>
---
drivers/net/ieee802154/mrf24j40.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c
index 3f2c7aa..3106895 100644
--- a/drivers/net/ieee802154/mrf24j40.c
+++ b/drivers/net/ieee802154/mrf24j40.c
@@ -22,6 +22,7 @@
#include <linux/spi/spi.h>
#include <linux/interrupt.h>
#include <linux/module.h>
+#include <linux/pinctrl/consumer.h>
#include <net/wpan-phy.h>
#include <net/mac802154.h>
@@ -623,6 +624,7 @@ static int mrf24j40_probe(struct spi_device *spi)
int ret = -ENOMEM;
u8 val;
struct mrf24j40 *devrec;
+ struct pinctrl *pinctrl;
printk(KERN_INFO "mrf24j40: probe(). IRQ: %d\n", spi->irq);
@@ -633,6 +635,11 @@ static int mrf24j40_probe(struct spi_device *spi)
if (!devrec->buf)
goto err_buf;
+ pinctrl = devm_pinctrl_get_select_default(&spi->dev);
+ if (IS_ERR(pinctrl))
+ dev_warn(&spi->dev,
+ "pinctrl pins are not configured from the driver");
+
spi->mode = SPI_MODE_0; /* TODO: Is this appropriate for right here? */
if (spi->max_speed_hz > MAX_SPI_SPEED_HZ)
spi->max_speed_hz = MAX_SPI_SPEED_HZ;
--
1.7.11.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
[parent not found: <1363644403-11003-1-git-send-email-alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>]
* [PATCH 2/4] mrf24j40: Warn if transmit interrupts timeout
[not found] ` <1363644403-11003-1-git-send-email-alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
@ 2013-03-18 22:06 ` Alan Ott
2013-03-18 22:06 ` [PATCH 3/4] mrf24j40: Increase max SPI speed to 10MHz Alan Ott
2013-03-18 22:06 ` [PATCH 4/4] mrf24j40: Fix byte-order of IEEE address Alan Ott
2 siblings, 0 replies; 6+ messages in thread
From: Alan Ott @ 2013-03-18 22:06 UTC (permalink / raw)
To: linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
netdev-u79uwXL29TY76Z2rM5mHXA
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Alan Ott
Issue a warning if a transmit complete interrupt doesn't happen in time.
Signed-off-by: Alan Ott <alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
---
drivers/net/ieee802154/mrf24j40.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c
index 3106895..582c0a3 100644
--- a/drivers/net/ieee802154/mrf24j40.c
+++ b/drivers/net/ieee802154/mrf24j40.c
@@ -362,6 +362,7 @@ static int mrf24j40_tx(struct ieee802154_dev *dev, struct sk_buff *skb)
if (ret == -ERESTARTSYS)
goto err;
if (ret == 0) {
+ dev_warn(printdev(devrec), "Timeout waiting for TX interrupt\n");
ret = -ETIMEDOUT;
goto err;
}
--
1.7.11.2
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] mrf24j40: Increase max SPI speed to 10MHz
[not found] ` <1363644403-11003-1-git-send-email-alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
2013-03-18 22:06 ` [PATCH 2/4] mrf24j40: Warn if transmit interrupts timeout Alan Ott
@ 2013-03-18 22:06 ` Alan Ott
2013-03-18 22:06 ` [PATCH 4/4] mrf24j40: Fix byte-order of IEEE address Alan Ott
2 siblings, 0 replies; 6+ messages in thread
From: Alan Ott @ 2013-03-18 22:06 UTC (permalink / raw)
To: linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
netdev-u79uwXL29TY76Z2rM5mHXA
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Alan Ott
Upon consulting the datasheet further, it does indicates a maximum speed
for SCK at 10MHz.
Signed-off-by: Alan Ott <alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
---
drivers/net/ieee802154/mrf24j40.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c
index 582c0a3..b4f9b67 100644
--- a/drivers/net/ieee802154/mrf24j40.c
+++ b/drivers/net/ieee802154/mrf24j40.c
@@ -92,9 +92,8 @@ struct mrf24j40 {
#define MRF24J40_READLONG(reg) (1 << 15 | (reg) << 5)
#define MRF24J40_WRITELONG(reg) (1 << 15 | (reg) << 5 | 1 << 4)
-/* Maximum speed to run the device at. TODO: Get the real max value from
- * someone at Microchip since it isn't in the datasheet. */
-#define MAX_SPI_SPEED_HZ 1000000
+/* The datasheet indicates the theoretical maximum for SCK to be 10MHz */
+#define MAX_SPI_SPEED_HZ 10000000
#define printdev(X) (&X->spi->dev)
--
1.7.11.2
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] mrf24j40: Fix byte-order of IEEE address
[not found] ` <1363644403-11003-1-git-send-email-alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
2013-03-18 22:06 ` [PATCH 2/4] mrf24j40: Warn if transmit interrupts timeout Alan Ott
2013-03-18 22:06 ` [PATCH 3/4] mrf24j40: Increase max SPI speed to 10MHz Alan Ott
@ 2013-03-18 22:06 ` Alan Ott
2 siblings, 0 replies; 6+ messages in thread
From: Alan Ott @ 2013-03-18 22:06 UTC (permalink / raw)
To: linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
netdev-u79uwXL29TY76Z2rM5mHXA
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Alan Ott
Load the 64-bit Extended (IEEE) address into the hardware in the proper
byte order.
Signed-off-by: Alan Ott <alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
---
drivers/net/ieee802154/mrf24j40.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c
index b4f9b67..0ca8f88 100644
--- a/drivers/net/ieee802154/mrf24j40.c
+++ b/drivers/net/ieee802154/mrf24j40.c
@@ -478,7 +478,7 @@ static int mrf24j40_filter(struct ieee802154_dev *dev,
int i;
for (i = 0; i < 8; i++)
write_short_reg(devrec, REG_EADR0+i,
- filt->ieee_addr[i]);
+ filt->ieee_addr[7-i]);
#ifdef DEBUG
printk(KERN_DEBUG "Set long addr to: ");
--
1.7.11.2
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/4] Misc MRF24J40 Fixes
2013-03-18 22:06 [PATCH 0/4] Misc MRF24J40 Fixes Alan Ott
2013-03-18 22:06 ` [PATCH 1/4] mrf24j40: pinctrl support Alan Ott
[not found] ` <1363644403-11003-1-git-send-email-alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
@ 2013-03-19 14:08 ` David Miller
2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2013-03-19 14:08 UTC (permalink / raw)
To: alan
Cc: linux-zigbee-devel, netdev, alex.bluesman.smirnov, dbaryshkov,
linux-kernel
From: Alan Ott <alan@signal11.us>
Date: Mon, 18 Mar 2013 18:06:39 -0400
> These are fairly straight-forward.
All applied to net-next, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-03-19 14:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-18 22:06 [PATCH 0/4] Misc MRF24J40 Fixes Alan Ott
2013-03-18 22:06 ` [PATCH 1/4] mrf24j40: pinctrl support Alan Ott
[not found] ` <1363644403-11003-1-git-send-email-alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
2013-03-18 22:06 ` [PATCH 2/4] mrf24j40: Warn if transmit interrupts timeout Alan Ott
2013-03-18 22:06 ` [PATCH 3/4] mrf24j40: Increase max SPI speed to 10MHz Alan Ott
2013-03-18 22:06 ` [PATCH 4/4] mrf24j40: Fix byte-order of IEEE address Alan Ott
2013-03-19 14:08 ` [PATCH 0/4] Misc MRF24J40 Fixes David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).