Re: [Question] Can of_find_spi_xx_by_node be moved out of CONFIG_OF_DYNAMIC in SPI driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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@xxxxxxxxxxxxxxx. 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux