soc_camera and device-tree
Hi Guennadi,
I'm slowly converting all of my drivers to device-tree. In the process, I met ... soc_camera.
I converted mt9m111.c and pxa_camera.c, but now I need the linking soc_camera. And I don't have a clear idea on how it should be done.
I was thinking of having soc_camera_pdrv_probe() changed, to handle device-tree. What bothers me a bit is that amongst the needed data for me are the bus_id and a soc_camera_subdev_desc. I was thinking that this could be expressed in device-tree like :
soc_camera {
icd = <&mt9m111>;
ici = <&pxa_camera>;
}
...
pxai2c1: i2c@40301680 {
status = "okay";
mt9m111@5d {
compatible = "micron,mt9m111";
reg = <0x5d>;
};
};
pxa_camera {
compatible = "mrvl,pxa_camera";
mclk_10khz = <5000>;
flags = <0xc9>;
};Do you have any hints and advices to help me ?
Cheers.
Signature · 1 line
Robert
Hi Robert,
Quoted 7 lines · Robert Jarzmik
Hi Guennadi,
I'm slowly converting all of my drivers to device-tree. In the process, I met ...
soc_camera.I converted
mt9m111.candpxa_camera.c, but now I need the linkingsoc_camera. And I don't have a clear idea on how it should be done.
Have a look at this thread
http://thread.gmane.org/gmane.linux.ports.sh.devel/34412/focus=36244
Thanks
Guennadi
Quoted 31 lines
I was thinking of having
soc_camera_pdrv_probe()changed, to handle device-tree. What bothers me a bit is that amongst the needed data for me are thebus_idand asoc_camera_subdev_desc. I was thinking that this could be expressed in device-tree like :soc_camera { icd = <&mt9m111>; ici = <&pxa_camera>; } ... pxai2c1: i2c@40301680 { status = "okay"; mt9m111@5d { compatible = "micron,mt9m111"; reg = <0x5d>; }; }; pxa_camera { compatible = "mrvl,pxa_camera"; mclk_10khz = <5000>; flags = <0xc9>; };Do you have any hints and advices to help me ?
Cheers.
Signature · 1 line
Robert
Quoted 9 lines · Guennadi Liakhovetski
Hi Robert,
Quoted 5 lines · Robert Jarzmik
Hi Guennadi,
I'm slowly converting all of my drivers to device-tree. In the process, I met ...
soc_camera.
Quoted 6 lines
Quoted 2 lines
I converted
mt9m111.candpxa_camera.c, but now I need the linkingsoc_camera. And I don't have a clear idea on how it should be done.Have a look at this thread
http://thread.gmane.org/gmane.linux.ports.sh.devel/34412/focus=36244
Ah excellent, job's done before working, just as I like it :)
Just a couple of remarks :
- in Ben's serie, there is/are call(s) to v4l2_of_get_next_endpoint(). This was recently replaced with of_graph_get_next_endpoint(). Same story for v4l2_of_get_remote_port() replaced by of_graph_get_remote_port().
See commit "[media] of: move graph helpers from drivers/media/v4l2-core to drivers/of", commit id fd9fdb7.
- the clock "mclk" topic
There will be cases where this SoC clock won't be available in the common clock framework, ie. not in drivers/clk. For example the PXA architecture is not yet ported to the commmon clk framework (it's in the staging). So we should be carefull to not assume common clock framework is available.
- the testing coverage
For the next spin I'd like to be joined to the list of reviewers/testers. As I'm testing it for another couple of host/icd, that will grow up the test base.
Cheers.
--
Robert
Quoted 5 lines · Robert Jarzmik
Hi Guennadi,
I'm slowly converting all of my drivers to device-tree. In the process, I met ...
soc_camera.
Quoted 7 lines
I converted
mt9m111.candpxa_camera.c, but now I need the linkingsoc_camera. And I don't have a clear idea on how it should be done.I was thinking of having
soc_camera_pdrv_probe()changed, to handle device-tree. What bothers me a bit is that amongst the needed data for me are thebus_idand asoc_camera_subdev_desc. I was thinking that this could be expressed in device-tree like :
I will put a new series out today for review.
Signature · 2 lines
Ben Dooks http://www.codethink.co.uk/ Senior Engineer Codethink - Providing Genius
Hi Robert,
Quoted 11 lines · Robert Jarzmik
Quoted 9 lines · Guennadi Liakhovetski
Hi Robert,
Quoted 5 lines · Robert Jarzmik
Hi Guennadi,
I'm slowly converting all of my drivers to device-tree. In the process, I met ...
soc_camera.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
I converted
mt9m111.candpxa_camera.c, but now I need the linkingsoc_camera. And I don't have a clear idea on how it should be done.Have a look at this thread
http://thread.gmane.org/gmane.linux.ports.sh.devel/34412/focus=36244
Ah excellent, job's done before working, just as I like it :)
Sorry to disappoint you, but it's not quite done yet. Have a look at the thread, at the last mails, we're still waiting for an updated version. Feel free to propose one yourself, I don't think Ben will have anything against this. Or maybe he'll prefer to submit an update himself, doesn't matter that much for me.
Thanks
Guennadi
Quoted 29 lines
Just a couple of remarks :
- in Ben's serie, there is/are call(s) tov4l2_of_get_next_endpoint(). This was recently replaced withof_graph_get_next_endpoint(). Same story forv4l2_of_get_remote_port()replaced byof_graph_get_remote_port().See commit "[media] of: move graph helpers from
drivers/media/v4l2-coretodrivers/of", commit id fd9fdb7.- the clock "mclk" topic
There will be cases where this SoC clock won't be available in the common clock framework, ie. not indrivers/clk. For example the PXA architecture is not yet ported to the commmon clk framework (it's in the staging). So we should be carefull to not assume common clock framework is available.- the testing coverage
For the next spin I'd like to be joined to the list of reviewers/testers. As I'm testing it for another couple of host/icd, that will grow up the test base.Cheers.
--
Robert
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 11 lines · Guennadi Liakhovetski
Hi Robert,
Quoted 7 lines · Robert Jarzmik
Hi Guennadi,
I'm slowly converting all of my drivers to device-tree. In the process, I met ...
soc_camera.I converted
mt9m111.candpxa_camera.c, but now I need the linkingsoc_camera. And I don't have a clear idea on how it should be done.
New series is on the list. Let me know if there are any issues.
I am pushing the series up to git.codethink.co.uk.
http://git.codethink.co.uk/linux.git bjdooks/v315/vin-of
Signature · 2 lines
Ben Dooks http://www.codethink.co.uk/ Senior Engineer Codethink - Providing Genius