[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200406094645.5f96457a@coco.lan>
Date: Mon, 6 Apr 2020 09:46:45 +0200
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Joe Perches <joe@...ches.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Petr Mladek <pmladek@...e.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Linux Media Mailing List <linux-media@...r.kernel.org>,
Dave Stevenson <dave.stevenson@...pberrypi.com>,
dri-devel <dri-devel@...ts.freedesktop.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Hans Verkuil <hverkuil@...all.nl>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Steven Rostedt <rostedt@...dmis.org>,
Jani Nikula <jani.nikula@...ux.intel.com>
Subject: Re: [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 <andy.shevchenko@...il.com> escreveu:
> On Fri, Apr 3, 2020 at 8:54 PM Joe Perches <joe@...ches.com> 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 <joe@...ches.com> 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;
break;
case 0x7648:
name = "OV7648";
break;
case 0x7660:
name = "OV7660";
break;
Yet, this is not too reliable, as, for some products, they use something
different:
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.
Thanks,
Mauro
Powered by blists - more mailing lists