lkml.org 
[lkml]   [2021]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v8 1/5] media: i2c: Add driver for RDACM21 camera module
Hi Hans,

On Mon, Feb 08, 2021 at 12:28:52PM +0100, Hans Verkuil wrote:
> Hi Jacopo,
>
> On 14/01/2021 18:04, Jacopo Mondi wrote:
> > The RDACM21 is a GMSL camera supporting 1280x1080 resolution images
> > developed by IMI based on an Omnivision OV10640 sensor, an Omnivision
> > OV490 ISP and a Maxim MAX9271 GMSL serializer.
> >
> > The driver uses the max9271 library module, to maximize code reuse with
> > other camera module drivers using the same serializer, such as rdacm20.
> >
> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
> > ---
> > MAINTAINERS | 12 +
> > drivers/media/i2c/Kconfig | 13 +
> > drivers/media/i2c/Makefile | 2 +
> > drivers/media/i2c/rdacm21.c | 623 ++++++++++++++++++++++++++++++++++++
> > 4 files changed, 650 insertions(+)
> > create mode 100644 drivers/media/i2c/rdacm21.c
> >
>
> <snip>
>
> > diff --git a/drivers/media/i2c/rdacm21.c b/drivers/media/i2c/rdacm21.c
> > new file mode 100644
> > index 000000000000..dcc21515e5a4
> > --- /dev/null
> > +++ b/drivers/media/i2c/rdacm21.c
>
> <snip>
>
> > +static int ov10640_initialize(struct rdacm21_device *dev)
> > +{
> > + u8 val;
> > +
> > + /* Power-up OV10640 by setting RESETB and PWDNB pins high. */
> > + ov490_write_reg(dev, OV490_GPIO_SEL0, OV490_GPIO0);
> > + ov490_write_reg(dev, OV490_GPIO_SEL1, OV490_SPWDN0);
> > + ov490_write_reg(dev, OV490_GPIO_DIRECTION0, OV490_GPIO0);
> > + ov490_write_reg(dev, OV490_GPIO_DIRECTION1, OV490_SPWDN0);
> > + ov490_write_reg(dev, OV490_GPIO_OUTPUT_VALUE0, OV490_GPIO0);
> > + ov490_write_reg(dev, OV490_GPIO_OUTPUT_VALUE0, OV490_SPWDN0);
> > + usleep_range(3000, 5000);
> > +
> > + /* Read OV10640 ID to test communications. */
> > + ov490_write_reg(dev, OV490_SCCB_SLAVE0_DIR, OV490_SCCB_SLAVE_READ);
> > + ov490_write_reg(dev, OV490_SCCB_SLAVE0_ADDR_HIGH, OV10640_CHIP_ID >> 8);
> > + ov490_write_reg(dev, OV490_SCCB_SLAVE0_ADDR_LOW, (u8)OV10640_CHIP_ID);
>
> This line results in a sparse warning:
>
> drivers/media/i2c/rdacm21.c:348:62: warning: cast truncates bits from constant value (300a becomes a)

Which is intended :)

>
> Just replace with OV10640_CHIP_ID & 0xff.

Will send a patch on top as the series has been collected.

Thanks
j

>
> Regards,
>
> Hans

\
 
 \ /
  Last update: 2021-02-08 13:06    [W:0.067 / U:6.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site