All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Cc: Sebastian Reichel <sre@debian.org>,
	Sakari Ailus <sakari.ailus@iki.fi>,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	Rob Herring <rob.herring@calxeda.com>,
	Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>
Subject: Re: [RFCv2] Device Tree bindings for OMAP3 Camera System
Date: Wed, 22 Jan 2014 23:57:45 +0100	[thread overview]
Message-ID: <2960230.3bGpm3THhQ@avalon> (raw)
In-Reply-To: <52E045DE.10706@gmail.com>

Hi,

On Wednesday 22 January 2014 23:27:42 Sylwester Nawrocki wrote:
> On 01/21/2014 12:27 AM, Sebastian Reichel wrote:
> > On Mon, Jan 20, 2014 at 11:16:43PM +0100, Sylwester Nawrocki wrote:
> >> On 01/20/2014 05:19 AM, Sakari Ailus wrote:

[snip]

> >>>> camera-switch {
> >>>> 
> >>>>      /*
> >>>>       * TODO:
> >>>>       *  - check if the switching code is generic enough to use a
> >>>>       *    more generic name like "gpio-camera-switch".

I think you can use a more generic name. You could probably get some 
inspiration from the i2c-mux-gpio DT bindings.

> >>>>       *  - document the camera-switch binding
> >>>>       */
> >>>>      
> >>>>      compatible = "nokia,n900-camera-switch";
> >>> 
> >>> Indeed. I don't think the hardware engineers realised what kind of a
> >>> long standing issue they created for us when they chose that solution.
> >>> ;)
> >>> 
> >>> Writing a small driver for this that exports a sub-device would probably
> >>> be the best option as this is hardly very generic. Should this be shown
> >>> to the user space or not? Probably it'd be nice to avoid showing the
> >>> related sub-device if there would be one.
> >> 
> >> Probably we should avoid exposing such a hardware detail to user space.
> >> OTOH it would be easy to handle as a media entity through the media
> >> controller API.
> > 
> > If this is exposed to the userspace, then a userspace application
> > "knows", that it cannot use both cameras at the same time. Otherwise
> > it can just react to error messages when it tries to use the second
> > camera.
> 
> Indeed, that's a good argument, I forgot about it for a while.
> 
> >>> I'm still trying to get N9 support working first, the drivers are in a
> >>> better shape and there are no such hardware hacks.
> >>> 
> >>>>      gpios =<&gpio4 1>; /* 97 */
> >> 
> >> I think the binding should be defining how state of the GPIO corresponds
> >> to state of the mux.
> > 
> > Obviously it should be mentioned in the n900-camera-switch binding
> > Documentation. This document was just the proposal for the omap3isp
> > node :)
> 
> Huh, I wasn't reading carefully enough! Then since it is just about the
> OMAP3 ISP it might be a good idea to drop the switch from the example,
> it seems unrelated.
> 
> >>>>      port@0 {
> >>>>          switch_in: endpoint {
> >>>>              remote-endpoint =<&csi1_ep>;
> >>>>          };
> >>>>          switch_out1: endpoint {
> >>>>              remote-endpoint =<&et8ek8>;
> >>>>          };
> >>>>          switch_out2: endpoint {
> >>>>              remote-endpoint =<&smiapp_dfl>;
> >>>>          };
> >>>>      };
> >> 
> >> This won't work, since names of the nodes are identical they will be
> >> combined by the dtc into a single 'endpoint' node with single
> >> 'remote-endpoint' property
> >> - might not be exactly something that you want.
> > 
> >> So it could be rewritten like:
> > right.
> > 
> >> [...]
> >> However, simplifying a bit, the 'endpoint' nodes are supposed to describe
> >> the configuration of a bus interface (port) for a specific remote device.
> >> 
> >> Then what you need might be something like:
> >>   camera-switch {
> >> 	
> >> 	compatible = "nokia,n900-camera-switch";
> >> 	
> >> 	#address-cells =<1>;
> >> 	#size-cells =<0>;
> >> 	
> >> 	switch_in: port@0 {
> >> 		reg =<0>;
> >> 		endpoint {
> >> 			remote-endpoint =<&csi1_ep>;
> >> 		};
> >> 	};
> >>          switch_out1: port@1 {
> >> 		reg =<1>;
> >> 		endpoint {
> >> 			remote-endpoint =<&et8ek8>;
> >> 		};
> >> 	};
> >> 	switch_out2: port@2 {
> >> 		endpoint {
> >> 			reg =<2>;
> >> 			remote-endpoint =<&smiapp_dfl>;
> >> 		};
> >> 	};
> >>   };
> > 
> > sounds fine to me.
> > 
> >> I'm just wondering if we need to be describing this in DT in such
> >> detail.
> > 
> > Do you have an alternative suggestion for the N900's bus switch
> > hack?
> 
> No, not really anything better at the moment.

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2014-01-22 22:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-03 22:03 [early RFC] Device Tree bindings for OMAP3 Camera Subsystem Sebastian Reichel
2013-11-04 19:49 ` jean-philippe francois
2013-11-06  0:48 ` Laurent Pinchart
2013-11-15 17:18 ` Mark Rutland
2014-01-15 19:41 ` [RFCv2] Device Tree bindings for OMAP3 Camera System Sebastian Reichel
2014-01-20  4:19   ` Sakari Ailus
2014-01-20 22:16     ` Sylwester Nawrocki
2014-01-20 23:27       ` Sebastian Reichel
2014-01-22 22:27         ` Sylwester Nawrocki
2014-01-22 22:57           ` Laurent Pinchart [this message]
2014-01-23  0:11             ` Sebastian Reichel
2014-01-23 11:44               ` Laurent Pinchart
2014-02-01  9:39         ` Sakari Ailus

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=2960230.3bGpm3THhQ@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-media@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=rob.herring@calxeda.com \
    --cc=sakari.ailus@iki.fi \
    --cc=sre@debian.org \
    --cc=sylvester.nawrocki@gmail.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.