From: Greg KH <greg@kroah.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
Hans de Goede <j.w.r.degoede@hhs.nl>,
Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
linux-media@vger.kernel.org,
Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Subject: Re: How to handle devices sitting on multiple busses ?
Date: Mon, 24 Aug 2009 09:16:14 -0700 [thread overview]
Message-ID: <20090824161614.GA7893@kroah.com> (raw)
In-Reply-To: <200908241357.44562.laurent.pinchart@ideasonboard.com>
On Mon, Aug 24, 2009 at 01:57:44PM +0200, Laurent Pinchart wrote:
> Hi Greg,
>
> while working on video input support for embedded platforms a few developers
> including myself ran independently into a Linux device model issue. We all
> came up with hackish solutions that we are not very happy with, and we'd like
> to fix this in a clean way.
>
> The problem comes from devices sitting on multiple busses, a situation
> commonly found with video sensors connected to an embedded System on Chip
> (SoC). The sensor is controlled through an I2C bus and sends video data on a
> parallel video bus, connected to a camera controller usually referred as an
> Image Signal Processor (ISP), Video Processing Front End (VPFE), CCD
> Controller (CCDC) or simply a bridge.
>
> The bridge and the I2C master controller on the SoC are completely independent
> from each other. The I2C master controller is not dedicated to the video
> function and is often used to communication with non-video I2C devices.
>
> Unfortunately, on the sensor side, I2C and video bus are not independent. The
> I2C slave controller usually requires an external clock to be present, and the
> clock is usually provided on the video bus by the SoC bridge.
>
> As the bridge and I2C master live their own life in the Linux device tree,
> they are initialized, suspended, resumed and destroyed independently. The
> sensor being an I2C slave device, Linux initializes it after the I2C master
> device is initialized, but doesn't ensure that the bridge is initialized first
> as well. A similar problem occurs during suspend/resume, as the I2C slave
> needs to be suspended before and resumed after the video bridge.
>
> Have you ever encountered such a situation before ?
No, not really.
> Is there a clean way for a device to have multiple parents, or do you
> have plans for such a possibility in the future ?
I do not know of any future plans to support something like this in the
driver core code, sorry.
> I would be willing to give an implementation a try if you can provide
> me with some guidelines.
Hm, I really don't know of any guidelines I can provide, as I've never
thought about this before :)
I really don't know what to suggest at the moment, sorry.
greg k-h
next prev parent reply other threads:[~2009-08-24 16:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-24 11:57 How to handle devices sitting on multiple busses ? Laurent Pinchart
2009-08-24 16:16 ` Greg KH [this message]
2009-08-25 9:47 ` Anssi Hannula
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=20090824161614.GA7893@kroah.com \
--to=greg@kroah.com \
--cc=g.liakhovetski@gmx.de \
--cc=hverkuil@xs4all.nl \
--cc=j.w.r.degoede@hhs.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@maxwell.research.nokia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox