linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* soc_camera and device-tree
@ 2014-06-14 20:30 Robert Jarzmik
  2014-06-14 20:58 ` Guennadi Liakhovetski
  2014-06-15 19:19 ` Ben Dooks
  0 siblings, 2 replies; 6+ messages in thread
From: Robert Jarzmik @ 2014-06-14 20:30 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: linux-media

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.

-- 
Robert

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: soc_camera and device-tree
  2014-06-14 20:30 soc_camera and device-tree Robert Jarzmik
@ 2014-06-14 20:58 ` Guennadi Liakhovetski
  2014-06-15 14:02   ` Robert Jarzmik
  2014-06-15 19:59   ` Ben Dooks
  2014-06-15 19:19 ` Ben Dooks
  1 sibling, 2 replies; 6+ messages in thread
From: Guennadi Liakhovetski @ 2014-06-14 20:58 UTC (permalink / raw)
  To: Robert Jarzmik; +Cc: linux-media

Hi Robert,

On Sat, 14 Jun 2014, Robert Jarzmik wrote:

> 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.

Have a look at this thread

http://thread.gmane.org/gmane.linux.ports.sh.devel/34412/focus=36244

Thanks
Guennadi

> 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.
> 
> -- 
> Robert
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: soc_camera and device-tree
  2014-06-14 20:58 ` Guennadi Liakhovetski
@ 2014-06-15 14:02   ` Robert Jarzmik
  2014-06-15 19:20     ` Guennadi Liakhovetski
  2014-06-15 19:59   ` Ben Dooks
  1 sibling, 1 reply; 6+ messages in thread
From: Robert Jarzmik @ 2014-06-15 14:02 UTC (permalink / raw)
  To: Guennadi Liakhovetski, Ben Dooks; +Cc: linux-media

Guennadi Liakhovetski <g.liakhovetski@gmx.de> writes:

> Hi Robert,
>
> On Sat, 14 Jun 2014, Robert Jarzmik wrote:
>
>> 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.
>
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: soc_camera and device-tree
  2014-06-14 20:30 soc_camera and device-tree Robert Jarzmik
  2014-06-14 20:58 ` Guennadi Liakhovetski
@ 2014-06-15 19:19 ` Ben Dooks
  1 sibling, 0 replies; 6+ messages in thread
From: Ben Dooks @ 2014-06-15 19:19 UTC (permalink / raw)
  To: Robert Jarzmik, Guennadi Liakhovetski; +Cc: linux-media

On 14/06/14 21:30, Robert Jarzmik wrote:
> 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 :

I will put a new series out today for review.

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: soc_camera and device-tree
  2014-06-15 14:02   ` Robert Jarzmik
@ 2014-06-15 19:20     ` Guennadi Liakhovetski
  0 siblings, 0 replies; 6+ messages in thread
From: Guennadi Liakhovetski @ 2014-06-15 19:20 UTC (permalink / raw)
  To: Robert Jarzmik; +Cc: Ben Dooks, linux-media

Hi Robert,

On Sun, 15 Jun 2014, Robert Jarzmik wrote:

> Guennadi Liakhovetski <g.liakhovetski@gmx.de> writes:
> 
> > Hi Robert,
> >
> > On Sat, 14 Jun 2014, Robert Jarzmik wrote:
> >
> >> 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.
> >
> > 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

> 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
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: soc_camera and device-tree
  2014-06-14 20:58 ` Guennadi Liakhovetski
  2014-06-15 14:02   ` Robert Jarzmik
@ 2014-06-15 19:59   ` Ben Dooks
  1 sibling, 0 replies; 6+ messages in thread
From: Ben Dooks @ 2014-06-15 19:59 UTC (permalink / raw)
  To: Guennadi Liakhovetski, Robert Jarzmik; +Cc: linux-media

On 14/06/14 21:58, Guennadi Liakhovetski wrote:
> Hi Robert,
> 
> On Sat, 14 Jun 2014, Robert Jarzmik wrote:
> 
>> 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.

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

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-06-15 19:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-14 20:30 soc_camera and device-tree Robert Jarzmik
2014-06-14 20:58 ` Guennadi Liakhovetski
2014-06-15 14:02   ` Robert Jarzmik
2014-06-15 19:20     ` Guennadi Liakhovetski
2014-06-15 19:59   ` Ben Dooks
2014-06-15 19:19 ` Ben Dooks

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).