All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Dmitri Belimov <d.belimov@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>, linux-media@vger.kernel.org
Subject: Re: saa7134 and μPD61151 MPEG2 coder
Date: Thu, 28 Jan 2010 13:00:25 +0100	[thread overview]
Message-ID: <201001281300.25222.hverkuil@xs4all.nl> (raw)
In-Reply-To: <20100128110941.47fda876@glory.loctelecom.ru>

On Thursday 28 January 2010 03:09:41 Dmitri Belimov wrote:
> HIi Hans
> 
> > Hi Dmitri,
> > 
> > Just a quick note: the video4linux mailinglist is obsolete, just use
> > linux-media.
> 
> OK
> 
> > On Wednesday 27 January 2010 06:36:37 Dmitri Belimov wrote:
> > > Hi Hans.
> > > 
> > > I finished saa7134 part of SPI. Please review saa7134-spi.c and
> > > diff saa7134-core and etc. I wrote config of SPI to board
> > > structure. Use this config for register master and slave devices.
> > > 
> > > SPI other then I2C, do not need call request_module. Udev do it. 
> > > I spend 10 days for understanding :(  
> > 
> > I'm almost certain that spi works the same way as i2c and that means
> > that you must call request_module. Yes, udev will load it for you,
> > but that is a delayed load: i.e. the module may not be loaded when we
> > need it. The idea behind this is that usually i2c or spi modules are
> > standalone, but in the context of v4l such modules are required to be
> > present before the bridge can properly configure itself.
> > 
> > The easiest way to ensure the correct load sequence is to do a
> > request_module at the start.
> > 
> > Now, I haven't compiled this, but I think this will work:
> > 
> > struct v4l2_subdev *v4l2_spi_new_subdev(struct v4l2_device *v4l2_dev,
> >                struct spi_master *master, struct spi_board_info *info)
> > {
> > 	struct v4l2_subdev *sd = NULL;
> >         struct spi_device *spi;
> > 	
> > 	BUG_ON(!v4l2_dev);
> > 
> > 	if (module_name)
> >         	request_module(module_name);

There is one thing missing here: module_name should be passed in as argument
to v4l2_spi_new_subdev. Does this code actually compile? If so, then I suspect
module_name must be some global variable with some bogus value which causes
request_module to time out.

> [  240.476082]  [<f84c8f3b>] ? v4l2_spi_new_subdev_board+0x2e/0x35 [v4l2_common]
> [  240.476086]  [<f84c8fa6>] ? v4l2_spi_new_subdev+0x64/0x6c [v4l2_common]

Remove v4l2_spi_new_subdev_board. Just have a v4l2_spi_new_subdev as in my code.

Regards,

	Hans

-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG

  reply	other threads:[~2010-01-28 12:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20091007101142.3b83dbf2@glory.loctelecom.ru>
     [not found] ` <200912160849.17005.hverkuil@xs4all.nl>
     [not found]   ` <20100112172209.464e88cd@glory.loctelecom.ru>
     [not found]     ` <201001130838.23949.hverkuil@xs4all.nl>
2010-01-27  5:36       ` saa7134 and μPD61151 MPEG2 coder Dmitri Belimov
2010-01-27 11:14         ` Hans Verkuil
2010-01-28  2:09           ` Dmitri Belimov
2010-01-28 12:00             ` Hans Verkuil [this message]
2010-01-29  7:12               ` Dmitri Belimov
2010-02-09  5:41                 ` Dmitri Belimov
2010-02-12 15:44                   ` Hans Verkuil
2010-02-16  7:53                     ` Dmitri Belimov
2010-02-22 22:38         ` eb1a:2860 eMPIA em28xx device to usb1 ??? usb hub problem? j
2010-02-22 22:52           ` Devin Heitmueller
2010-02-23  6:37             ` Dean
2010-02-23 16:46               ` Devin Heitmueller
2010-02-23 21:17                 ` Dean
2010-02-23 21:22                   ` Devin Heitmueller

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=201001281300.25222.hverkuil@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=d.belimov@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.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.