Re: [Linux-zigbee-devel] at86rf230: DT and Non-DT support question

2014-03-27 Thread Varka Bhadram
Ya its okay for me . But I think the code should be #if IS_ENABLED(CONFIG_OF) //For DT supported boards static struct of_device_id at86rf230_of_match [] = { { . compatible = "atmel,at86rf230" , }, { . compatible = "atmel,at86rf231" , }, { .

Re: [Linux-zigbee-devel] at86rf230: DT and Non-DT support question

2014-03-27 Thread Alexander Aring
On Thu, Mar 27, 2014 at 12:49:55PM +0530, Varka Bhadram wrote: > > Ya its okay for me . But I think the code should be > > #if IS_ENABLED(CONFIG_OF) //For DT supported > boards > static struct of_device_id at86rf230_of_match [] = { > { . compatible = "atme

Re: [Linux-zigbee-devel] at86rf230: DT and Non-DT support question

2014-03-27 Thread Alexander Aring
On Thu, Mar 27, 2014 at 12:49:55PM +0530, Varka Bhadram wrote: > > Ya its okay for me . But I think the code should be > > #if IS_ENABLED(CONFIG_OF) //For DT supported > boards > static struct of_device_id at86rf230_of_match [] = { > { . compatible = "atme

Re: [Linux-zigbee-devel] at86rf230: DT and Non-DT support question

2014-03-27 Thread Varka Bhadram
Hai Alex, > btw. I think the else would be here wrong because we can boot also > without devicetree if devicetree is enabled.I only see sometimes a > #ifdef CONFIG_OF in driver to give the compiler a little help to remove > the struct if it's not enabled. > Ya you are right. But there is fundamen

Re: [Linux-zigbee-devel] at86rf230: DT and Non-DT support question

2014-03-27 Thread Alexander Aring
On Thu, Mar 27, 2014 at 02:31:07PM +0530, Varka Bhadram wrote: > Hai Alex, > > > btw. I think the else would be here wrong because we can boot also > > without devicetree if devicetree is enabled.I only see sometimes a > > #ifdef CONFIG_OF in driver to give the compiler a little help to remove > >

Re: [Linux-zigbee-devel] at86rf230: DT and Non-DT support question

2014-03-27 Thread Varka Bhadram
> no, of_match_ptr will return NULL if CONFIG_OF is not defined. We don't > need any IS_ENABLED(CONFIG_OF). > > see include/linux/of.h line 521 > > - Alex You are correct. I think the only way is #ifdef CONFIG_OF static struct of_device_id at86rf230_of_match [] = { { . compatible = "atmel,at86rf

Re: [Linux-zigbee-devel] at86rf230: DT and Non-DT support question

2014-03-27 Thread Alexander Aring
Hi Varka, On Thu, Mar 27, 2014 at 03:35:17PM +0530, Varka Bhadram wrote: > > > no, of_match_ptr will return NULL if CONFIG_OF is not defined. We don't > > need any IS_ENABLED(CONFIG_OF). > > > > see include/linux/of.h line 521 > > > > - Alex > > You are correct. I think the only way is > > #ifd

Re: [Linux-zigbee-devel] at86rf230: DT and Non-DT support question

2014-03-27 Thread Alexander Aring
Hi, On Thu, Mar 27, 2014 at 11:46:10AM +0100, Alexander Aring wrote: > Linux handle this #ifdef CONFIG_OF already in of.h > > A static struct declaration is an already zeroed memory space, so we > don't need a #ifdef CONFIG_OF here and we should have a small codebase. > > if CONFIG_OF is not def

[Linux-zigbee-devel] Fwd: Re: at86rf230: DT and Non-DT support question

2014-03-27 Thread Varka Bhadram
-- Original Message -- From: Varka Bhadram To: Alexander Aring Date: March 27, 2014 at 4:30 PM Subject: Re: at86rf230: DT and Non-DT support question > We also need a > > .id_table = at86rf230_ids, > > here. > > > . driver = { > > #ifdef CONFIG_OF > > . of_match_table = of_matc

Re: [Linux-zigbee-devel] at86rf230: DT and Non-DT support question

2014-03-27 Thread Varka Bhadram
> filename: > /lib/modules/3.14.0-rc8-01856-g8652599/kernel/drivers/net/ieee802154/at86rf230.ko > license: GPL v2 > description: AT86RF230 Transceiver Driver > srcversion: 046691C0B2230A291E98B63 > alias: of:N*T*Catmel,at86rf212* > alias: of:N*T*Catmel,at86rf233* > alias: of:N*T*Catmel,at86rf231*

Re: [Linux-zigbee-devel] at86rf230: DT and Non-DT support question

2014-03-27 Thread Varka Bhadram
> > static const struct of_device_id at86rf230_of_match[] = { > > { .compatible = "atmel,at86rf230", }, > > { .compatible = "atmel,at86rf231", }, > > { .compatible = "atmel,at86rf233", }, > > { .compatible = "atmel,at86rf212", }, > > { }, > > }; > > MODULE_DEVICE_TABLE(of, at86rf230_of_match); > >

Re: [Linux-zigbee-devel] at86rf230: DT and Non-DT support question

2014-03-27 Thread Alexander Aring
On Thu, Mar 27, 2014 at 05:26:30PM +0530, Varka Bhadram wrote: > > > > static const struct of_device_id at86rf230_of_match[] = { > > > { .compatible = "atmel,at86rf230", }, > > > { .compatible = "atmel,at86rf231", }, > > > { .compatible = "atmel,at86rf233", }, > > > { .compatible = "atmel,at86rf21

Re: [Linux-zigbee-devel] [PATCH net-next 0/6] at86rf230: cleanups and add missing devicetree documentation

2014-03-27 Thread Alexander Aring
Hi David, please drop this patch-series I found a small issue on while unloading the at86rf230 module. We need to call devm_free_irq in remove callback before flush_work, otherwise the interrupt will use some already freed memory. I will rework this patch serie and send a v2, sorry. - Alex ---

[Linux-zigbee-devel] [PATCH net] mac802154: move flush and destroy workqueue

2014-03-27 Thread Alexander Aring
While transmit over a at86rf231 device which use the mac802154 stack and unloading the module I got: [ 29.643073] WARNING: CPU: 0 PID: 3 at kernel/workqueue.c:1335 __queue_work+0xb4/0x224() [ 29.651457] Modules linked in: at86rf230(-) autofs4 [ 29.656612] CPU: 0 PID: 3 Comm: ksoftirqd/0 Tai

Re: [Linux-zigbee-devel] [PATCH net] mac802154: move flush and destroy workqueue

2014-03-27 Thread Alexander Aring
Hi, I failed with the patch subject, I will send a v2. Sorry for the noise. - Alex -- ___ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists

[Linux-zigbee-devel] [PATCH v2 net] mac802154: stop tx queue before destroy workqueue

2014-03-27 Thread Alexander Aring
While transmit over a at86rf231 device which use the mac802154 stack and unloading the module I got: [ 29.643073] WARNING: CPU: 0 PID: 3 at kernel/workqueue.c:1335 __queue_work+0xb4/0x224() [ 29.651457] Modules linked in: at86rf230(-) autofs4 [ 29.656612] CPU: 0 PID: 3 Comm: ksoftirqd/0 Tai

[Linux-zigbee-devel] 802.15.4 Question

2014-03-27 Thread Martin Townsend
Hi, A couple of questions on 802.15.4: Is it possible for a device to co-ordinate more than 1 WPAN on the same PHY, beacon enabled or beaconless? If so is it possible to bridge or route from one WPAN to another within a device over the same PHY? Can a slave join more than one WPAN, again using t

Re: [Linux-zigbee-devel] 802.15.4 Question

2014-03-27 Thread Phoebe Buckheister
> Is it possible for a device to co-ordinate more than 1 WPAN on the same > PHY, beacon enabled or beaconless? > If so is it possible to bridge or route from one WPAN to another within > a device over the same PHY? > Can a slave join more than one WPAN, again using the same PHY? Theoretically yes

Re: [Linux-zigbee-devel] 802.15.4 Question

2014-03-27 Thread Martin Townsend
On 27/03/14 19:13, Phoebe Buckheister wrote: >> Is it possible for a device to co-ordinate more than 1 WPAN on the same >> PHY, beacon enabled or beaconless? >> If so is it possible to bridge or route from one WPAN to another within >> a device over the same PHY? >> Can a slave join more than one W

Re: [Linux-zigbee-devel] 802.15.4 Question

2014-03-27 Thread Phoebe Buckheister
> Hi Phoebe, > > Thank you for the swift response it has given my a lot to think about. > I remember the discussion and like you I was in favour of removing the > slave list. But as chance would have it I think we may actually need it > now or some other method of multiple WPANs per PHY. In that

Re: [Linux-zigbee-devel] 802.15.4 Question

2014-03-27 Thread Martin Townsend
On 27/03/14 20:10, Phoebe Buckheister wrote: >> Hi Phoebe, >> >> Thank you for the swift response it has given my a lot to think about. >> I remember the discussion and like you I was in favour of removing the >> slave list. But as chance would have it I think we may actually need it >> now or som

Re: [Linux-zigbee-devel] 802.15.4 Question

2014-03-27 Thread Phoebe Buckheister
> Thanks again for the detailed response. To give some context our > powerline PHY isn't like any in the 802.15.4 spec and we are hoping to > utilise just the MAC. I need to check with the system guys but I think > we can only multiplex multiple WPANs in time not frequency. We would > also need t

Re: [Linux-zigbee-devel] at86rf230: Interrupt Handling

2014-03-27 Thread Alexander Aring
Hi Varka, please take the mailinglist always in CC. There are also other people who knows more about the interrupt handling in at86rf230 On Fri, Mar 28, 2014 at 11:59:31AM +0530, Varka Bhadram wrote: > Hai Alex, > > I have small question about interrupt handling. > > When an interrupt occur the