Re: [Linux-zigbee-devel] [PATCH net-next 14/15] at86rf230: remove unnecessary state read

2014-04-23 Thread Stefan Schmidt
Hello. On Tue, 2014-04-22 at 20:55, Alexander Aring wrote: > This patch removes a unnecessary state read. The status value is never > evaluate after reading the state. > > Signed-off-by: Alexander Aring > --- > drivers/net/ieee802154/at86rf230.c | 4 > 1 file changed, 4 deletions(-) > > d

Re: [Linux-zigbee-devel] [PATCH net-next 14/15] at86rf230: remove unnecessary state read

2014-04-23 Thread Alexander Aring
Hi Stefan, On Wed, Apr 23, 2014 at 11:37:20AM +0200, Stefan Schmidt wrote: > Hello. > > On Tue, 2014-04-22 at 20:55, Alexander Aring wrote: > > This patch removes a unnecessary state read. The status value is never > > evaluate after reading the state. > > > > Signed-off-by: Alexander Aring > >

Re: [Linux-zigbee-devel] [PATCH net-next] mrf24j40: seperate mrf24j40 h/w init and add checkings

2014-04-23 Thread Alexander Aring
Hi Varka, for me this patch looks good but wait for Alan's opinion. He knows much more about the mrf24j40 driver. There a are some whitespace issues in your code, please solve that. On Wed, Apr 23, 2014 at 03:34:16PM +0530, Varka Bhadram wrote: > This patch adds chekings and separate the mrf24j4

Re: [Linux-zigbee-devel] [PATCH] mrf24j40: seperate mrf24j40 h/w init and add checkings

2014-04-23 Thread Alexander Aring
Hi Alan, On Wed, Apr 23, 2014 at 09:51:33AM -0400, Alan Ott wrote: > On 04/23/2014 09:11 AM, Varka Bhadram wrote: > >I followed the process that you mailed earlier, thnks for that. > > > >I am expecting the mail from Alan about the changes. > > Hi Varka, > > Is there a specific problem you're se

Re: [Linux-zigbee-devel] [PATCH] mrf24j40: seperate mrf24j40 h/w init and add checkings

2014-04-23 Thread Alan Ott
On 04/23/2014 09:11 AM, Varka Bhadram wrote: > I followed the process that you mailed earlier, thnks for that. > > I am expecting the mail from Alan about the changes. Hi Varka, Is there a specific problem you're seeing? Typically in the kernel we expect the SPI controller to succeed for a coupl

Re: [Linux-zigbee-devel] [PATCH] mrf24j40: seperate mrf24j40 h/w init and add checkings

2014-04-23 Thread Werner Almesberger
Alan Ott wrote: > 3. The code to check for it just adds a lot of bloat without much > measurable benefit. As a very general note, if - in any C program, not just the kernel - you have too many error checks for comfort, you may want to consider keeping a cumulative error status (e.g., in this case

[Linux-zigbee-devel] [PATCH net-next v2 00/14] at86rf230 cleanup

2014-04-23 Thread Alexander Aring
Hi, this is the first patch series to cleanup the at86rf230 driver. Later I want to implement regmap and a asynchron spi handling for transmit and receiving frames. If all seems fine I will send these patches to net-next tomorrow. (Not as v2) - Alex changes since v2: - rename status variable t

[Linux-zigbee-devel] [PATCH net-next v2 06/14] at86rf230: add missing MODULE_DEVICE_TABLE

2014-04-23 Thread Alexander Aring
Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index d52700f..46d992a 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drivers/net/ieee802154/at

[Linux-zigbee-devel] [PATCH net-next v2 01/14] at86rf230: use irq_get_trigger_type

2014-04-23 Thread Alexander Aring
This patch removes the platform data for the irq_type. We use instead the irq_get_trigger_type function to get these flags which should already configured by the interrupt controller. Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 28 include

[Linux-zigbee-devel] [PATCH net-next v2 14/14] at86rf230: remove function for setting irq polarity

2014-04-23 Thread Alexander Aring
The function is small enough, we don't need a extra function for this. Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index 13

[Linux-zigbee-devel] [PATCH net-next v2 05/14] at86rf230: use devm_gpio_request_one

2014-04-23 Thread Alexander Aring
This patch replace the gpio_request functions with devm_gpio_request_one functions. Then we don't need to take care about freeing gpios. Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 53 +- 1 file changed, 12 insertions(+), 41 deletio

[Linux-zigbee-devel] [PATCH net-next v2 08/14] at86rf230: add at86rf230_device_id table

2014-04-23 Thread Alexander Aring
This patch adds a at86rf230_device_id table to offers various module aliases. Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index 41c33

[Linux-zigbee-devel] [PATCH net-next v2 04/14] at86rf230: use devm_request_irq

2014-04-23 Thread Alexander Aring
This patch replace request_irq with devm_request_irq. With devm_request_irq we don't need to care about freeing the irq. Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/net/ieee802154/at

[Linux-zigbee-devel] [PATCH net-next v2 13/14] at86rf230: remove unnecessary state read

2014-04-23 Thread Alexander Aring
This patch removes a unnecessary state read. The status value is never evaluate after reading the state. Also rename the status variable to dvdd, because this variable will be used later. Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 10 +++--- 1 file changed, 3 in

[Linux-zigbee-devel] [PATCH net-next v2 12/14] at86rf230: remove unnecessary spi_set_drvdata

2014-04-23 Thread Alexander Aring
Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index 994c334..67c01bf 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drivers/net/ieee802154/at8

[Linux-zigbee-devel] [PATCH net-next v2 07/14] at86rf230: make of_device_id const

2014-04-23 Thread Alexander Aring
Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index 46d992a..41c3384 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drivers/n

[Linux-zigbee-devel] [PATCH net-next v2 09/14] at86rf230: remove #ifdef CONFIG_OF

2014-04-23 Thread Alexander Aring
This is already handled by the of_match_ptr macro. Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index cf376c4..b324bb3 100644 --- a/drivers/net/i

[Linux-zigbee-devel] [PATCH net-next v2 02/14] devicetree: add at86rf230 bindings

2014-04-23 Thread Alexander Aring
This patch adds devicetree bindings for the at86rf230 IEEE 802.15.4 SPI device driver. Signed-off-by: Alexander Aring --- .../bindings/net/ieee802154/at86rf230.txt | 23 ++ 1 file changed, 23 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/ie

[Linux-zigbee-devel] [PATCH net-next v2 03/14] at86rf230: remove irq_type in request_irq

2014-04-23 Thread Alexander Aring
We don't need to set these values at request_irq. The interrupt line is already configured to same value like irq_get_trigger_type returned. Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/iee

[Linux-zigbee-devel] [PATCH net-next v2 11/14] at86rf230: reset irq line before irq request

2014-04-23 Thread Alexander Aring
This patch resets the irq line before we are requesting the irq. This avoids pending interrupts before requesting. Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ieee802154/at86rf230.c

[Linux-zigbee-devel] [PATCH net-next v2 10/14] at86rf230: remove unnecessary assign

2014-04-23 Thread Alexander Aring
Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index b324bb3..960444b 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drive

Re: [Linux-zigbee-devel] [PATCH] mrf24j40: seperate mrf24j40 h/w init and add checkings

2014-04-23 Thread Varka Bhadram
Hi Alan, My view is same as Alex view. If spi_sync() is not able to write and get the data we will get an error number return. The driver is allocating so many kernel resources even if you get the errno return also. So this patch will return from driver probe() if spi_sync() returns err. Thank