From: qiaozhou <qiaozhou-XOWFcpiLszpWk0Htik3J/w@public.gmane.org>
To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: <pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>,
<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
<linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [Question] Can of_find_spi_xx_by_node be moved out of CONFIG_OF_DYNAMIC in SPI driver
Date: Fri, 15 Jul 2016 10:03:26 +0800 [thread overview]
Message-ID: <5788446E.9080601@asrmicro.com> (raw)
In-Reply-To: <20160714101128.GK9976-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
On 2016年07月14日 18:11, Mark Brown wrote:
> On Thu, Jul 14, 2016 at 09:15:44AM +0800, qiaozhou wrote:
>> Hi Mark,
> Please don't take things off-list unless there is a really strong reason
> to do so. Sending things to the list ensures that everyone gets a
> chance to read and comment on things.
Add linux-spi-u79uwXL29TaiAVqoAR/hOA@public.gmane.org I missed it. It's indeed helpful.Thanks
for the tips.
>
>> I've a question about the two functions, of_find_spi_device/master_by_node.
>> Can they be moved out of CONFIG_OF_DYNAMIC so that some spi device driver
>> can use them without CONFIG_OF_DYNAMIC defined? Some vendor provides both
>> SPI and I2C interfaces, and the I2C driver has of_find_i2c_xx_by_node
>> function without OF_DYNAMIC limitation. I made a patch for SPI driver, and
>> don't know whether it's appropriate. Could you help to give some comments?
> Why not just use a phandle to connect the two devices?
My case is like this: I got a ARM mali-video driver, which may have
several ports/endpoints, which needs I2C/SPI interface to do some
initiation. In the video driver, it uses device node conf to find
matching ports, and calls functions, such as of_find_video_tx_by_node ->
of_find_i2c_device_by_node. Now the hardware changes from i2c to spi, so
I wonder whether of_find_spi_device_by_node can be used freely.
Otherwise I may need to modify the mali-video driver, and as it's
provided to us and may get updated from time to time, my change may be
conflicted with future versions.
Also I didn't quite understand the way to "use a phandle to connect the
two devices", is there any code/driver which I can take as a reference?
I'll study it.
Thanks a lot for the suggestions.
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next parent reply other threads:[~2016-07-15 2:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5786E7C0.4050709@asrmicro.com>
[not found] ` <20160714101128.GK9976@sirena.org.uk>
[not found] ` <20160714101128.GK9976-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-07-15 2:03 ` qiaozhou [this message]
[not found] ` <5788446E.9080601-XOWFcpiLszpWk0Htik3J/w@public.gmane.org>
2016-07-15 10:58 ` [Question] Can of_find_spi_xx_by_node be moved out of CONFIG_OF_DYNAMIC in SPI driver Mark Brown
[not found] ` <20160715105841.GE30372-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-07-15 11:23 ` qiaozhou
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=5788446E.9080601@asrmicro.com \
--to=qiaozhou-xowfcpilszpwk0htik3j/w@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org \
/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.