Can of_find_spi_xx_by_node be moved out of CONFIG_OF_DYNAMIC in SPI driver
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 5 lines · Mark Brown
Quoted 1 line · qiaozhou
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/[email protected] I missed it. It's indeed helpful.Thanks for the tips.
Quoted 8 lines
Quoted 7 lines
I've a question about the two functions, of_find_spi_device/master_by_node. Can they be moved out of
CONFIG_OF_DYNAMICso that some spi device driver can use them withoutCONFIG_OF_DYNAMICdefined? Some vendor provides both SPI and I2C interfaces, and the I2C driver hasof_find_i2c_xx_by_nodefunction withoutOF_DYNAMIClimitation. 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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 5788446E.9080601-XOWFcpiLszpWk0Htik3J/[email protected]
Quoted 3 lines · qiaozhou
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.
Quoted 8 lines
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 whetherof_find_spi_device_by_nodecan 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.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 16 lines · Mark Brown
Quoted 3 lines · qiaozhou
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.
Quoted 8 lines
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 whetherof_find_spi_device_by_nodecan 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.
Quoted 4 lines
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html