From: Stefano Babic <sbabic@denx.de>
To: Varka Bhadram <varkabhadram@gmail.com>,
Stefano Babic <sbabic@denx.de>,
linux-can@vger.kernel.org
Cc: Marc Kleine-Budde <mkl@pengutronix.de>,
Wolfgang Grandegger <wg@grandegger.com>,
Oliver Hartkopp <socketcan@hartkopp.net>
Subject: Re: [PATCH v4 3/3] CAN: CAN driver to support multiple CAN bus on SPI interface
Date: Fri, 25 Jul 2014 09:57:19 +0200 [thread overview]
Message-ID: <53D20DDF.6000301@denx.de> (raw)
In-Reply-To: <53D122C7.4020504@gmail.com>
Hi Varka,
On 24/07/2014 17:14, Varka Bhadram wrote:
>> In last case CONFIG_OF is not set
>> and a platform device sets the data.
>
> In our case we can load the driver by DT or Non-DT way.
>
> If the DT approach is not used means CONFIG_OF is not set. In this case
> the device ids wont be added in the kernel device ids. For this we have
> to define spi_device_ids and update .id_table in struct spi_driver.
>
I think we are doing the same thing with only a slight difference in the
implementation. For mcp251x the driver data is fix with the chip type
and there is not values set by the board. This let define the
driver_data inside the driver.
In my case I let that the platform data can be set, when CONFIG_OF=n, by
the board as it was common in the past, because I have some values that
depend on the board (number of channels, checksum enabled,..).
> For DT approach(CONFIG_OF = y) we have to define of_device_ids
> and update .driver.of_match_table with this ids.
Agree - exacttly the same is done in this driver.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
prev parent reply other threads:[~2014-07-25 7:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-24 10:11 [PATCH v4 0/3] Adding support for CAN busses via SPI interface Stefano Babic
2014-07-24 10:11 ` [PATCH v4 1/3] Add documentation for SPI to CAN driver Stefano Babic
2014-07-24 10:11 ` [PATCH v4 2/3] CAN: moved SPI drivers into a separate directory Stefano Babic
2014-07-24 18:13 ` Oliver Hartkopp
2014-07-24 18:31 ` Stefano Babic
2014-07-24 10:11 ` [PATCH v4 3/3] CAN: CAN driver to support multiple CAN bus on SPI interface Stefano Babic
2014-07-24 11:25 ` Varka Bhadram
2014-07-24 11:33 ` Marc Kleine-Budde
2014-07-24 14:54 ` Stefano Babic
2014-07-24 15:14 ` Varka Bhadram
2014-07-25 7:57 ` Stefano Babic [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53D20DDF.6000301@denx.de \
--to=sbabic@denx.de \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=socketcan@hartkopp.net \
--cc=varkabhadram@gmail.com \
--cc=wg@grandegger.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.