v4l2-fwnode: Fix clock lane parsing

Message ID 20170306072323.GA23509@amd (mailing list archive)
State Superseded, archived
Delegated to: Sakari Ailus
Headers

Commit Message

Pavel Machek March 6, 2017, 7:23 a.m. UTC
  Fix clock lane parsing in v4l2-fwnode.
    
Signed-off-by: Pavel Machek <pavel@ucw.cz>
  

Comments

Sakari Ailus March 10, 2017, 10:54 p.m. UTC | #1
On Mon, Mar 06, 2017 at 08:23:24AM +0100, Pavel Machek wrote:
> Fix clock lane parsing in v4l2-fwnode.
>     
> Signed-off-by: Pavel Machek <pavel@ucw.cz>
> 
> diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c
> index d6666d3..44036b8 100644
> --- a/drivers/media/v4l2-core/v4l2-fwnode.c
> +++ b/drivers/media/v4l2-core/v4l2-fwnode.c
> @@ -167,7 +167,7 @@ void v4l2_fwnode_endpoint_parse_csi1_bus(struct fwnode_handle *fwn,
>                 bus->data_lane = v;
>  
>         if (!fwnode_property_read_u32(fwn, "clock-lanes", &v))
> -               bus->data_lane = v;
> +               bus->clock_lane = v;

Oh my. Did I really write it like that?

I'll merge your fix next Monday. Thanks!
  
Pavel Machek June 13, 2017, 12:22 p.m. UTC | #2
Hi!

Are there any news about the fwnode branch?

I have quite usable camera, but it is still based on
982e8e40390d26430ef106fede41594139a4111c (that's v4.10). It would be
good to see fwnode stuff upstream... are there any plans for that?

Is there stable branch to which I could move the stuff?

Thanks,
									Pavel
  
Sakari Ailus June 13, 2017, 12:47 p.m. UTC | #3
Hi Pavel,

On Tue, Jun 13, 2017 at 02:22:40PM +0200, Pavel Machek wrote:
> Hi!
> 
> Are there any news about the fwnode branch?
> 
> I have quite usable camera, but it is still based on
> 982e8e40390d26430ef106fede41594139a4111c (that's v4.10). It would be
> good to see fwnode stuff upstream... are there any plans for that?
> 
> Is there stable branch to which I could move the stuff?

What's relevant for most V4L2 drivers is in linux-media right now.

There are new features that will take some time to get in. The trouble has
been, and continue to be, that the patches need to go through various trees
so it'll take some time for them to be merged.

I expect to have most of them in during the next merge window.
  
Pavel Machek June 13, 2017, 9:09 p.m. UTC | #4
Hi!

> > Are there any news about the fwnode branch?
> > 
> > I have quite usable camera, but it is still based on
> > 982e8e40390d26430ef106fede41594139a4111c (that's v4.10). It would be
> > good to see fwnode stuff upstream... are there any plans for that?
> > 
> > Is there stable branch to which I could move the stuff?
> 
> What's relevant for most V4L2 drivers is in linux-media right now.
> 
> There are new features that will take some time to get in. The trouble has
> been, and continue to be, that the patches need to go through various trees
> so it'll take some time for them to be merged.
> 
> I expect to have most of them in during the next merge window.

So git://linuxtv.org/media_tree.git branch master is the right one to
work one?

Thanks,
									Pavel
  
Sakari Ailus June 14, 2017, 11:06 a.m. UTC | #5
Hi, Pavel!

On Tue, Jun 13, 2017 at 11:09:00PM +0200, Pavel Machek wrote:
> Hi!
> 
> > > Are there any news about the fwnode branch?
> > > 
> > > I have quite usable camera, but it is still based on
> > > 982e8e40390d26430ef106fede41594139a4111c (that's v4.10). It would be
> > > good to see fwnode stuff upstream... are there any plans for that?
> > > 
> > > Is there stable branch to which I could move the stuff?
> > 
> > What's relevant for most V4L2 drivers is in linux-media right now.
> > 
> > There are new features that will take some time to get in. The trouble has
> > been, and continue to be, that the patches need to go through various trees
> > so it'll take some time for them to be merged.
> > 
> > I expect to have most of them in during the next merge window.
> 
> So git://linuxtv.org/media_tree.git branch master is the right one to
> work one?

I also pushed the rebased ccp2 branch there:

<URL:https://git.linuxtv.org/sailus/media_tree.git/log/?h=ccp2>

It's now right on the top of media-tree master.
  
Pavel Machek June 15, 2017, 10:22 p.m. UTC | #6
Hi!

Ok, so I played a bit, and now I have working camera in v4.12-rc3.
https://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-n900.git/
camera-fw5-3 is recommended branch to play with.

Sakari, should I attempt to clean/send you patches, or would it be
better to wait till ccp2 branch is merged upstream? There's one
compile fix, I'll submit that one in following email.

I even have patches for v4l2-utils, so digital camera can be used as
... digital camera :-). (With rather slow autofocus, and 1Mpix only at
the moment, but hey, its a start, and I already have _one_ nice
picture from it.)

Best regards,

									Pavel
  
Pavel Machek July 4, 2017, 3:08 p.m. UTC | #7
Hi!

> > > > Are there any news about the fwnode branch?
> > > > 
> > > > I have quite usable camera, but it is still based on
> > > > 982e8e40390d26430ef106fede41594139a4111c (that's v4.10). It would be
> > > > good to see fwnode stuff upstream... are there any plans for that?
> > > > 
> > > > Is there stable branch to which I could move the stuff?
> > > 
> > > What's relevant for most V4L2 drivers is in linux-media right now.
> > > 
> > > There are new features that will take some time to get in. The trouble has
> > > been, and continue to be, that the patches need to go through various trees
> > > so it'll take some time for them to be merged.
> > > 
> > > I expect to have most of them in during the next merge window.
> > 
> > So git://linuxtv.org/media_tree.git branch master is the right one to
> > work one?
> 
> I also pushed the rebased ccp2 branch there:
> 
> <URL:https://git.linuxtv.org/sailus/media_tree.git/log/?h=ccp2>
> 
> It's now right on the top of media-tree master.

Is ccp2 branch expected to go into 4.13, too?

Best regards,
									Pavel
  
Sakari Ailus July 5, 2017, 9:32 a.m. UTC | #8
On Tue, Jul 04, 2017 at 05:08:19PM +0200, Pavel Machek wrote:
> Hi!
> 
> > > > > Are there any news about the fwnode branch?
> > > > > 
> > > > > I have quite usable camera, but it is still based on
> > > > > 982e8e40390d26430ef106fede41594139a4111c (that's v4.10). It would be
> > > > > good to see fwnode stuff upstream... are there any plans for that?
> > > > > 
> > > > > Is there stable branch to which I could move the stuff?
> > > > 
> > > > What's relevant for most V4L2 drivers is in linux-media right now.
> > > > 
> > > > There are new features that will take some time to get in. The trouble has
> > > > been, and continue to be, that the patches need to go through various trees
> > > > so it'll take some time for them to be merged.
> > > > 
> > > > I expect to have most of them in during the next merge window.
> > > 
> > > So git://linuxtv.org/media_tree.git branch master is the right one to
> > > work one?
> > 
> > I also pushed the rebased ccp2 branch there:
> > 
> > <URL:https://git.linuxtv.org/sailus/media_tree.git/log/?h=ccp2>
> > 
> > It's now right on the top of media-tree master.
> 
> Is ccp2 branch expected to go into 4.13, too?

Hi Pavel,

What I've done is just rebased the ccp2 branch. In other words, the patches
in that branch are no more ready than they were.

To get these merged we should ideally

1) Make sure there will be no regressions,

2) clean things up in the omap3isp; which resources are needed and when
(e.g. regulators, PHY configuration) isn't clear at the moment and

2) have one driver using the implementation.

At least 1) is needed. I think a number of framework patches could be
mergeable before 2) and 3) are done. I can prepare a set later this week.
But even that'd be likely for 4.14, not 4.13.
  

Patch

diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c
index d6666d3..44036b8 100644
--- a/drivers/media/v4l2-core/v4l2-fwnode.c
+++ b/drivers/media/v4l2-core/v4l2-fwnode.c
@@ -167,7 +167,7 @@  void v4l2_fwnode_endpoint_parse_csi1_bus(struct fwnode_handle *fwn,
                bus->data_lane = v;
 
        if (!fwnode_property_read_u32(fwn, "clock-lanes", &v))
-               bus->data_lane = v;
+               bus->clock_lane = v;
 
        if (bus_type == V4L2_FWNODE_BUS_TYPE_CCP2)
 	       vfwn->bus_type = V4L2_MBUS_CCP2;