From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: "Ezequiel García" <elezegarcia@gmail.com>
Cc: gregkh <gregkh@linuxfoundation.org>,
Hans de Goede <hdegoede@redhat.com>,
Tomas Winkler <tomasw@gmail.com>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
linux-media@vger.kernel.org, devel@driverdev.osuosl.org,
Peter Senna Tschudin <peter.senna@gmail.com>
Subject: Re: A second easycap driver implementation
Date: Wed, 07 Mar 2012 17:53:13 -0300 [thread overview]
Message-ID: <4F57CAB9.3050604@redhat.com> (raw)
In-Reply-To: <CALF0-+VnoMRoaTKeyD6bE8kP3qccun5keyiJRnM3Vg0sAecaQw@mail.gmail.com>
Em 07-03-2012 17:39, Ezequiel García escreveu:
> Hi Mauro,
>
>>
>> em28xx is a good reference.
>>
>
> I'm looking at it.
> In fact, I have a first question: why there is a limit to the number of devices
> the driver support? I found the same idea in easycap original
> implementation, but I
> can't understand why do we have to limit in such a way.
>
> /* Check to see next free device and mark as used */
> do {
> nr = find_first_zero_bit(&em28xx_devused, EM28XX_MAXBOARDS);
> if (nr >= EM28XX_MAXBOARDS) {
> /* No free device slots */
> printk(DRIVER_NAME ": Supports only %i em28xx
> boards.\n",
> EM28XX_MAXBOARDS);
> retval = -ENOMEM;
> goto err_no_slot;
> }
> } while (test_and_set_bit(nr, &em28xx_devused));
There are several reasons for that, including a few historical ones. One of them
is that the number of reserved v4l char devices is limited (well, V4L core
now supports dynamic allocation). Another one is a few modprobe arrays for em28xx.
Anyway, an USB 2.0 bus only supports one uncompressed video stream.
>
>
>>
>> It is not clear, from the easycap code, where the I2C address
>> is stored:
>>
>> int write_saa(struct usb_device *p, u16 reg0, u16 set0)
>> {
>> if (!p)
>> return -ENODEV;
>> SET(p, 0x200, 0x00);
>> SET(p, 0x204, reg0);
>> SET(p, 0x205, set0);
>> SET(p, 0x200, 0x01);
>> return wait_i2c(p);
>> }
>
> I think i2c_address it is near registers 0x200/0x204, which gets
> initialised at setup_stk().
> I'll have a closer look.
Ok.
>
> Thanks for your comments,
> Ezequiel.
next prev parent reply other threads:[~2012-03-07 20:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-06 21:04 A second easycap driver implementation Ezequiel García
2012-03-06 21:05 ` Ezequiel García
2012-03-07 9:10 ` Hans de Goede
2012-03-07 14:32 ` Ezequiel García
2012-03-07 15:43 ` gregkh
2012-03-07 16:35 ` Mauro Carvalho Chehab
2012-03-07 16:45 ` Ezequiel García
2012-03-07 17:17 ` Mauro Carvalho Chehab
2012-03-07 20:39 ` Ezequiel García
2012-03-07 20:53 ` Mauro Carvalho Chehab [this message]
2012-03-19 22:05 ` Ezequiel García
2012-03-19 22:34 ` Mauro Carvalho Chehab
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=4F57CAB9.3050604@redhat.com \
--to=mchehab@redhat.com \
--cc=devel@driverdev.osuosl.org \
--cc=elezegarcia@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=peter.senna@gmail.com \
--cc=tomasw@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.