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
> > 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);
> >
> 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*
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
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
> 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
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
> >
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
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
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
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" , },
{ .
On Thu, Mar 27, 2014 at 10:55:57AM +0530, Varka Bhadram wrote:
> Hai,
>
> By using struct of_device_id structure and of_match_table in struct spi_driver
> we can enable the device tree support for the driver. The corresponding driver
> will be loaded based on compatible property.
>
> For Non-DT s
12 matches
Mail list logo