All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>,
	linux-media@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH v2 3/5] [media] mt9v032: do not clear reserved bits in read mode register
Date: Wed, 04 Jun 2014 16:50:33 +0200	[thread overview]
Message-ID: <2863074.Pbof0Rv7H7@avalon> (raw)
In-Reply-To: <1401788155-3690-4-git-send-email-p.zabel@pengutronix.de>

Hi Philipp,

Thank you for the patch.

On Tuesday 03 June 2014 11:35:53 Philipp Zabel wrote:
> The read mode register bits 8 and 9 are set and marked as reserved.
> Don't clear them.
> 
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

and applied to my tree.

> ---
> Changes since v1:
>  - Add MT9V032_READ_MODE_RESERVED #define
> ---
>  drivers/media/i2c/mt9v032.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/media/i2c/mt9v032.c b/drivers/media/i2c/mt9v032.c
> index 83ae8ca6d..d969663 100644
> --- a/drivers/media/i2c/mt9v032.c
> +++ b/drivers/media/i2c/mt9v032.c
> @@ -87,6 +87,7 @@
>  #define		MT9V032_READ_MODE_COLUMN_FLIP		(1 << 5)
>  #define		MT9V032_READ_MODE_DARK_COLUMNS		(1 << 6)
>  #define		MT9V032_READ_MODE_DARK_ROWS		(1 << 7)
> +#define		MT9V032_READ_MODE_RESERVED		0x0300
>  #define MT9V032_PIXEL_OPERATION_MODE			0x0f
>  #define		MT9V034_PIXEL_OPERATION_MODE_HDR	(1 << 0)
>  #define		MT9V034_PIXEL_OPERATION_MODE_COLOR	(1 << 1)
> @@ -415,6 +416,7 @@ static int mt9v032_s_stream(struct v4l2_subdev *subdev,
> int enable) struct i2c_client *client = v4l2_get_subdevdata(subdev);
>  	struct mt9v032 *mt9v032 = to_mt9v032(subdev);
>  	struct v4l2_rect *crop = &mt9v032->crop;
> +	unsigned int read_mode;
>  	unsigned int hbin;
>  	unsigned int vbin;
>  	int ret;
> @@ -425,9 +427,13 @@ static int mt9v032_s_stream(struct v4l2_subdev *subdev,
> int enable) /* Configure the window size and row/column bin */
>  	hbin = fls(mt9v032->hratio) - 1;
>  	vbin = fls(mt9v032->vratio) - 1;
> -	ret = mt9v032_write(client, MT9V032_READ_MODE,
> -			    hbin << MT9V032_READ_MODE_COLUMN_BIN_SHIFT |
> -			    vbin << MT9V032_READ_MODE_ROW_BIN_SHIFT);
> +	read_mode = mt9v032_read(client, MT9V032_READ_MODE);
> +	if (read_mode < 0)
> +		return read_mode;
> +	read_mode &= MT9V032_READ_MODE_RESERVED;
> +	read_mode |= hbin << MT9V032_READ_MODE_COLUMN_BIN_SHIFT |
> +		     vbin << MT9V032_READ_MODE_ROW_BIN_SHIFT;
> +	ret = mt9v032_write(client, MT9V032_READ_MODE, read_mode);
>  	if (ret < 0)
>  		return ret;

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2014-06-04 14:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-03  9:35 [PATCH v2 0/5] mt9v032: add support for v4l2-async, mt9v02x, and regmap Philipp Zabel
2014-06-03  9:35 ` [PATCH v2 1/5] [media] mt9v032: reset is self clearing Philipp Zabel
2014-06-04 14:49   ` Laurent Pinchart
2014-06-04 15:03     ` Philipp Zabel
2014-06-03  9:35 ` [PATCH v2 2/5] [media] mt9v032: register v4l2 asynchronous subdevice Philipp Zabel
2014-06-04 14:16   ` Laurent Pinchart
2014-06-04 15:04     ` Philipp Zabel
2014-06-03  9:35 ` [PATCH v2 3/5] [media] mt9v032: do not clear reserved bits in read mode register Philipp Zabel
2014-06-04 14:50   ` Laurent Pinchart [this message]
2014-06-03  9:35 ` [PATCH v2 4/5] [media] mt9v032: add support for mt9v022 and mt9v024 Philipp Zabel
2014-06-04 14:54   ` Laurent Pinchart
2014-06-03  9:35 ` [PATCH v2 5/5] [media] mt9v032: use regmap Philipp Zabel
2014-06-04 15:44   ` Laurent Pinchart
2014-06-04 16:45     ` Philipp Zabel
2014-06-04 23:46       ` Laurent Pinchart

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=2863074.Pbof0Rv7H7@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=p.zabel@pengutronix.de \
    /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.