All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@iki.fi>
To: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
	linux-media@vger.kernel.org, pavel@ucw.cz
Subject: Re: [PATCH 5/8] v4l: Add support for CSI-1 and CCP2 busses
Date: Wed, 19 Jul 2017 23:53:30 +0300	[thread overview]
Message-ID: <20170719205329.akt2tcspq7ri3xh4@valkosipuli.retiisi.org.uk> (raw)
In-Reply-To: <20170719163751.3fd7c891@vento.lan>

On Wed, Jul 19, 2017 at 04:37:51PM -0300, Mauro Carvalho Chehab wrote:
> Em Thu,  6 Jul 2017 02:00:16 +0300
> Sakari Ailus <sakari.ailus@linux.intel.com> escreveu:
> 
> > From: Sakari Ailus <sakari.ailus@iki.fi>
> > 
> > CCP2 and CSI-1, are older single data lane serial busses.
> > 
> > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> > Signed-off-by: Pavel Machek <pavel@ucw.cz>
> > ---
> >  drivers/media/platform/pxa_camera.c              |  3 ++
> >  drivers/media/platform/soc_camera/soc_mediabus.c |  3 ++
> >  drivers/media/v4l2-core/v4l2-fwnode.c            | 58 +++++++++++++++++++-----
> >  include/media/v4l2-fwnode.h                      | 19 ++++++++
> >  include/media/v4l2-mediabus.h                    |  4 ++
> >  5 files changed, 76 insertions(+), 11 deletions(-)
> > 
> > diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c
> > index 399095170b6e..17e797c9559f 100644
> > --- a/drivers/media/platform/pxa_camera.c
> > +++ b/drivers/media/platform/pxa_camera.c
> > @@ -638,6 +638,9 @@ static unsigned int pxa_mbus_config_compatible(const struct v4l2_mbus_config *cf
> >  		mipi_clock = common_flags & (V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK |
> >  					     V4L2_MBUS_CSI2_CONTINUOUS_CLOCK);
> >  		return (!mipi_lanes || !mipi_clock) ? 0 : common_flags;
> > +	default:
> > +		__WARN();
> > +		return -EINVAL;
> >  	}
> >  	return 0;
> >  }
> > diff --git a/drivers/media/platform/soc_camera/soc_mediabus.c b/drivers/media/platform/soc_camera/soc_mediabus.c
> > index 57581f626f4c..43192d80beef 100644
> > --- a/drivers/media/platform/soc_camera/soc_mediabus.c
> > +++ b/drivers/media/platform/soc_camera/soc_mediabus.c
> > @@ -508,6 +508,9 @@ unsigned int soc_mbus_config_compatible(const struct v4l2_mbus_config *cfg,
> >  		mipi_clock = common_flags & (V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK |
> >  					     V4L2_MBUS_CSI2_CONTINUOUS_CLOCK);
> >  		return (!mipi_lanes || !mipi_clock) ? 0 : common_flags;
> > +	default:
> > +		__WARN();
> > +		return -EINVAL;
> >  	}
> >  	return 0;
> >  }
> > diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c
> > index d71dd3913cd9..76a88f210cb6 100644
> > --- a/drivers/media/v4l2-core/v4l2-fwnode.c
> > +++ b/drivers/media/v4l2-core/v4l2-fwnode.c
> > @@ -154,6 +154,31 @@ static void v4l2_fwnode_endpoint_parse_parallel_bus(
> >  
> >  }
> >  
> > +void v4l2_fwnode_endpoint_parse_csi1_bus(struct fwnode_handle *fwnode,
> > +					 struct v4l2_fwnode_endpoint *vep,
> > +					 u32 bus_type)
> > +{
> > +       struct v4l2_fwnode_bus_mipi_csi1 *bus = &vep->bus.mipi_csi1;
> > +       u32 v;
> > +
> > +       if (!fwnode_property_read_u32(fwnode, "clock-inv", &v))
> > +               bus->clock_inv = v;
> > +
> > +       if (!fwnode_property_read_u32(fwnode, "strobe", &v))
> > +               bus->strobe = v;
> > +
> > +       if (!fwnode_property_read_u32(fwnode, "data-lanes", &v))
> > +               bus->data_lane = v;
> > +
> > +       if (!fwnode_property_read_u32(fwnode, "clock-lanes", &v))
> > +               bus->clock_lane = v;
> > +
> > +       if (bus_type == V4L2_FWNODE_BUS_TYPE_CCP2)
> > +	       vep->bus_type = V4L2_MBUS_CCP2;
> > +       else
> > +	       vep->bus_type = V4L2_MBUS_CSI1;
> > +}
> > +
> 
> This function is indented with whitespaces! Next time, please check with
> checkpatch.
> 
> I fixed when merging it upstream.

Well, what can I say?

Apologies for the collateral damage, and thanks! :-)

-- 
Regards,

Sakari Ailus
e-mail: sakari.ailus@iki.fi	XMPP: sailus@retiisi.org.uk

  reply	other threads:[~2017-07-19 20:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-05 23:00 [PATCH 0/8] Prepare for CCP2 / CSI-1 support, omap3isp fixes Sakari Ailus
2017-07-05 23:00 ` [PATCH 1/8] dt: bindings: Explicitly specify bus type Sakari Ailus
2017-07-05 23:00 ` [PATCH 2/8] dt: bindings: Add strobe property for CCP2 Sakari Ailus
2017-07-05 23:00 ` [PATCH 3/8] v4l: fwnode: Call CSI2 bus csi2, not csi Sakari Ailus
2017-07-06 11:07   ` Sebastian Reichel
2017-07-05 23:00 ` [PATCH 4/8] v4l: fwnode: Obtain data bus type from FW Sakari Ailus
2017-07-06 11:08   ` Sebastian Reichel
2017-07-05 23:00 ` [PATCH 5/8] v4l: Add support for CSI-1 and CCP2 busses Sakari Ailus
2017-07-06 11:08   ` Sebastian Reichel
2017-07-19 19:37   ` Mauro Carvalho Chehab
2017-07-19 20:53     ` Sakari Ailus [this message]
2017-07-19 20:56       ` Mauro Carvalho Chehab
2017-07-20  7:32       ` Pavel Machek
2017-07-05 23:00 ` [PATCH 6/8] smiapp: add CCP2 support Sakari Ailus
2017-07-05 23:00 ` [PATCH 7/8] omap3isp: Check for valid port in endpoints Sakari Ailus
2017-07-06 11:11   ` Sebastian Reichel
2017-07-07 13:04     ` Sakari Ailus
2017-07-13 11:12       ` Pavel Machek
2017-07-05 23:00 ` [PATCH 8/8] omap3isp: Destroy CSI-2 phy mutexes in error and module removal Sakari Ailus
2017-07-06 10:43 ` [PATCH 0/8] Prepare for CCP2 / CSI-1 support, omap3isp fixes Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170719205329.akt2tcspq7ri3xh4@valkosipuli.retiisi.org.uk \
    --to=sakari.ailus@iki.fi \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@s-opensource.com \
    --cc=pavel@ucw.cz \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.