All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: "Hans Verkuil" <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org, sakari.ailus@maxwell.research.nokia.com
Subject: Re: [RFC/PATCH 2/6] v4l: subdev: Add device node support
Date: Thu, 8 Jul 2010 14:01:52 +0200	[thread overview]
Message-ID: <201007081401.53023.laurent.pinchart@ideasonboard.com> (raw)
In-Reply-To: <72c0021199a577840a434d9195cb9e61.squirrel@webmail.xs4all.nl>

Hi Hans,

On Wednesday 07 July 2010 15:04:17 Hans Verkuil wrote:
> > On Wednesday 07 July 2010 14:30:45 Hans Verkuil wrote:

[snip]

> > Some (most ?) I2C sensors need to be accessed during probe. This involves
> > powering the sensor up, which is handled by a board code function called
> > through a platform data function pointer.
> > 
> > On the OMAP3 ISP the sensor clock can be generated by the ISP. This means
> > that board code needs to call an ISP (exported) function to turn the clock
> > on. To do so we currently retrieve a pointer to the ISP device through the
> > subdev's parent v4l2_device, embedded in the ISP device structure. This
> > requires the subdev to be registered, otherwise its parent will be NULL.
> > For that reason we're still using the core::s_config operation.
> > 
> > This is obviously not an ideal situation, and I'm open to suggestions on
> > how to solve it without core::s_config. One possibility would be to use a
> > global ISP device pointer in the board code, as there's only one ISP
> > device in the system. It feels a bit hackish though.
> 
> Or make the v4l2_device pointer part of the platform data? That way the
> subdev driver has access to the v4l2_device pointer in a fairly clean
> manner.

As we've discussed on IRC, the platform data should really store hardware 
properties, not software/driver information. Beside, storing the v4l2_device 
pointer in the platform data would be quite difficult, as 
v4l2_device_register_subdev only sees a void * pointer for platform_data. It 
has no knowledge of the device-specific structure.

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2010-07-08 12:02 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-07 11:53 [RFC/PATCH 0/6] V4L2 subdev userspace API Laurent Pinchart
2010-07-07 11:53 ` [RFC/PATCH 1/6] v4l: subdev: Don't require core operations Laurent Pinchart
2010-07-07 12:21   ` Hans Verkuil
2010-07-07 14:05   ` Karicheri, Muralidharan
2010-07-07 11:53 ` [RFC/PATCH 2/6] v4l: subdev: Add device node support Laurent Pinchart
2010-07-07 12:30   ` Hans Verkuil
2010-07-07 12:53     ` Laurent Pinchart
2010-07-07 13:04       ` Hans Verkuil
2010-07-08 12:01         ` Laurent Pinchart [this message]
2010-07-08 12:34           ` Hans Verkuil
2010-07-07 12:43   ` Hans Verkuil
2010-07-07 14:00     ` Laurent Pinchart
2010-07-07 14:14   ` Karicheri, Muralidharan
2010-07-07 14:39     ` Sylwester Nawrocki
2010-07-07 15:08     ` Mauro Carvalho Chehab
2010-07-08  7:20     ` Pawel Osciak
2010-07-07 14:58   ` Mauro Carvalho Chehab
2010-07-07 19:44     ` Laurent Pinchart
2010-07-07 20:53       ` Mauro Carvalho Chehab
2010-07-08 12:08         ` Laurent Pinchart
2010-07-08 13:51           ` Mauro Carvalho Chehab
2010-07-09  8:57             ` Laurent Pinchart
2010-07-07 11:53 ` [RFC/PATCH 3/6] v4l: subdev: Uninline the v4l2_subdev_init function Laurent Pinchart
2010-07-07 12:31   ` Hans Verkuil
2010-07-07 11:53 ` [RFC/PATCH 4/6] v4l: subdev: Control ioctls support Laurent Pinchart
2010-07-07 12:33   ` Hans Verkuil
2010-07-07 12:35     ` Laurent Pinchart
2010-07-07 11:53 ` [RFC/PATCH 5/6] v4l: subdev: Events support Laurent Pinchart
2010-07-07 12:37   ` Hans Verkuil
2010-07-07 11:53 ` [RFC/PATCH 6/6] v4l: subdev: Generic ioctl support Laurent Pinchart
2010-07-07 12:38   ` Hans Verkuil

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=201007081401.53023.laurent.pinchart@ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=hverkuil@xs4all.nl \
    --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 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.