* Re: [Question] Can of_find_spi_xx_by_node be moved out of CONFIG_OF_DYNAMIC in SPI driver
[not found] ` <20160714101128.GK9976-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
@ 2016-07-15 2:03 ` qiaozhou
[not found] ` <5788446E.9080601-XOWFcpiLszpWk0Htik3J/w@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: qiaozhou @ 2016-07-15 2:03 UTC (permalink / raw)
To: Mark Brown
Cc: pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w,
grant.likely-QSEj5FYQhm4dnm+yROfE0A,
linux-spi-u79uwXL29TY76Z2rM5mHXA
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Question] Can of_find_spi_xx_by_node be moved out of CONFIG_OF_DYNAMIC in SPI driver
[not found] ` <5788446E.9080601-XOWFcpiLszpWk0Htik3J/w@public.gmane.org>
@ 2016-07-15 10:58 ` Mark Brown
[not found] ` <20160715105841.GE30372-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2016-07-15 10:58 UTC (permalink / raw)
To: qiaozhou
Cc: pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w,
grant.likely-QSEj5FYQhm4dnm+yROfE0A,
linux-spi-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 1204 bytes --]
On Fri, Jul 15, 2016 at 10:03:26AM +0800, qiaozhou wrote:
> 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
This sounds like a fairly standard setup, most external HDMI encoders
are I2C and SPI controlled, which already works fine as far as I'm aware.
> 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.
Off the top of my head something like the TDA998x or ADV7511 should be
worth looking at here - it just sounds like the the Mali driver may just
not be using the frameworks well, you should probably encourage people
to get it upstreamed.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Question] Can of_find_spi_xx_by_node be moved out of CONFIG_OF_DYNAMIC in SPI driver
[not found] ` <20160715105841.GE30372-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
@ 2016-07-15 11:23 ` qiaozhou
0 siblings, 0 replies; 3+ messages in thread
From: qiaozhou @ 2016-07-15 11:23 UTC (permalink / raw)
To: Mark Brown
Cc: pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w,
grant.likely-QSEj5FYQhm4dnm+yROfE0A,
linux-spi-u79uwXL29TY76Z2rM5mHXA
On 2016年07月15日 18:58, Mark Brown wrote:
> On Fri, Jul 15, 2016 at 10:03:26AM +0800, qiaozhou wrote:
>
>> 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
> This sounds like a fairly standard setup, most external HDMI encoders
> are I2C and SPI controlled, which already works fine as far as I'm aware.
>
>> 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.
> Off the top of my head something like the TDA998x or ADV7511 should be
> worth looking at here - it just sounds like the the Mali driver may just
> not be using the frameworks well, you should probably encourage people
> to get it upstreamed.
Got it. I'll check 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-15 11:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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 ` [Question] Can of_find_spi_xx_by_node be moved out of CONFIG_OF_DYNAMIC in SPI driver qiaozhou
[not found] ` <5788446E.9080601-XOWFcpiLszpWk0Htik3J/w@public.gmane.org>
2016-07-15 10:58 ` Mark Brown
[not found] ` <20160715105841.GE30372-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-07-15 11:23 ` qiaozhou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).