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" , },
        { . compatible = "atmel,at86rf233" , },
        { . compatible = "atmel,at86rf212" , },
        { },
};
MODULE_DEVICE_TABLE(of,  at86rf230_of_match);
#else
static const struct spi_device_id at86rf230_ids [] = {         //For Non-DT
supported boards
         { "at86rf230" , 0 },
          ..............
         { },
};
MODULE_DEVICE_TABLE ( spi , at86rf230_ids );
#endif

-Varka Bhadram,
CDAC-HYD.

On March 27, 2014 at 12:17 PM Alexander Aring <alex.ar...@gmail.com> wrote:
> 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 supported boards to load the driver we have to provide struct
> > spi_board_info and we have to register our board .
> > In this shall we provide the device ids for driver by using struct
> > spi_device_id
> > or based on name in struct spi_driver the driver will load ?
> >
> > So Is there any need to give spi ids and MODULE_DEVICE_TABLE() for Non-DT
> > supported boards?
> >
> Please Varka, reply to the patches if you have any issues detected and
> don't open a new thread.
>
> I think you mean that we need a
>
> #if IS_ENABLED(CONFIG_OF)
> ...
> MODULE_DEVICE_TABLE(of, at86rf230_of_match);
> #endif
>
> I forgot this add initial devicetree support. Sorry.
>
>
>
> So to your question. We should have a MODULE_DEVICE_TABLE for DT and NON
> DT drivers, because we could set a .driver_data attribute for each
> at86rfxxx chip. That would be nice... and I know the at86rf230 needs a
> little bit more love to be perfect.
>
> I will create a patch for adding MODULE_DEVICE_TABLE to the driver, with
> a Reported-by Varka Bhadram <...> reply if this is okay for you.
>
> - Alex
-------------------------------------------------------------------------------------------------------------------------------

This e-mail is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies and the original message. Any unauthorized review, use,
disclosure, dissemination, forwarding, printing or copying of this email
is strictly prohibited and appropriate legal action will be taken.
-------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to