[lkml]   [2020]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2 1/1] lib/vsprintf: Add support for printing V4L2 and DRM fourccs
Em Fri, 3 Apr 2020 21:32:42 +0300
Andy Shevchenko <> escreveu:

> On Fri, Apr 3, 2020 at 8:54 PM Joe Perches <> wrote:
> > On Fri, 2020-04-03 at 19:32 +0200, Mauro Carvalho Chehab wrote:
> > > Em Fri, 03 Apr 2020 09:56:42 -0700
> > > Joe Perches <> escreveu:
> > It _might_ be useful to use a CONFIG_MEDIA_SUPPORT guard
> > in lib/vsprintf for this.
> No need. FourCC, if Sakari makes it more generic, can be used for
> other purposes, e.g. printing component names from the chips (not
> related to media at all).

Hmm... not 100% sure about what you're meaning with "component names".

At media, some vendors use a cc-like code to allow identifying the
name of the chip, retrieved on a common register via an I2C bus.
Omnivision uses, for example, uses a 2 bytes code:

OV5670_CHIP_ID 0x5670
OV5675_CHIP_ID 0x5675
OV2680_CHIP_ID 0x2680
OV5670_CHIP_ID 0x5670
OV5675_CHIP_ID 0x5675

We used this at the em28xx driver to detect a camera sensor, and give
a name for the chip (see drivers/media/usb/em28xx/em28xx-camera.c):

switch (id) {
case 0x2642:
name = "OV2640";
dev->em28xx_sensor = EM28XX_OV2640;
case 0x7648:
name = "OV7648";
case 0x7660:
name = "OV7660";

Yet, this is not too reliable, as, for some products, they use something

OV8856_CHIP_ID 0x885a
OV13858_CHIP_ID 0xd855

OV9640 can either be 0x9648 or 0x9649, depending on its revision.

If you're referring to this kind of code, I don't think we can have
something generic.


 \ /
  Last update: 2020-04-06 09:47    [W:0.087 / U:5.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site