All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Jacopo Mondi <jacopo+renesas@jmondi.org>,
	kieran.bingham+renesas@ideasonboard.com,
	laurent.pinchart+renesas@ideasonboard.com,
	niklas.soderlund+renesas@ragnatech.se, geert@linux-m68k.org
Cc: linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org, Hyun Kwon <hyunk@xilinx.com>,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
	sergei.shtylyov@gmail.com,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: [PATCH v8 1/5] media: i2c: Add driver for RDACM21 camera module
Date: Mon, 8 Feb 2021 12:28:52 +0100	[thread overview]
Message-ID: <c5fc0815-7754-1fac-af0a-ccbca922e479@xs4all.nl> (raw)
In-Reply-To: <20210114170429.139762-2-jacopo+renesas@jmondi.org>

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)

Just replace with OV10640_CHIP_ID & 0xff.

Regards,

	Hans

  parent reply	other threads:[~2021-02-08 11:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14 17:04 [PATCH v8 0/5] media: i2c: Add RDACM21 camera module Jacopo Mondi
2021-01-14 17:04 ` [PATCH v8 1/5] media: i2c: Add driver for " Jacopo Mondi
2021-02-08 11:21   ` Hans Verkuil
2021-02-08 11:28     ` Laurent Pinchart
2021-02-08 11:34       ` Hans Verkuil
2021-02-08 11:37         ` Laurent Pinchart
2021-02-08 11:28   ` Hans Verkuil [this message]
2021-02-08 11:43     ` Jacopo Mondi
2021-01-14 17:04 ` [PATCH v8 2/5] dt-bindings: media: max9286: Document 'maxim,reverse-channel-microvolt' Jacopo Mondi
2021-01-14 17:04 ` [PATCH v8 3/5] media: i2c: max9286: Break-out reverse channel setup Jacopo Mondi
2021-01-14 17:04 ` [PATCH v8 4/5] media: i2c: max9286: Make channel amplitude programmable Jacopo Mondi
2021-01-14 17:04 ` [PATCH v8 5/5] media: i2c: max9286: Configure reverse channel amplitude Jacopo Mondi
2021-02-01  8:54 ` [PATCH v8 0/5] media: i2c: Add RDACM21 camera module Jacopo Mondi
2021-02-01 13:00   ` Sakari Ailus
2021-02-01 18:14     ` Jacopo Mondi

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=c5fc0815-7754-1fac-af0a-ccbca922e479@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=geert@linux-m68k.org \
    --cc=hyunk@xilinx.com \
    --cc=jacopo+renesas@jmondi.org \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=sergei.shtylyov@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.