From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Dongchun Zhu <dongchun.zhu@mediatek.com>
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
drinkcat@chromium.org, louis.kuo@mediatek.com,
srv_heupstream@mediatek.com, linus.walleij@linaro.org,
shengnan.wang@mediatek.com, tfiga@chromium.org,
bgolaszewski@baylibre.com, sj.huang@mediatek.com,
robh+dt@kernel.org, linux-mediatek@lists.infradead.org,
sakari.ailus@linux.intel.com, matthias.bgg@gmail.com,
bingbu.cao@intel.com, mchehab@kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-media@vger.kernel.org
Subject: Re: [V8, 2/2] media: i2c: ov02a10: Add OV02A10 image sensor driver
Date: Mon, 11 May 2020 12:33:08 +0300 [thread overview]
Message-ID: <20200511093308.GF185537@smile.fi.intel.com> (raw)
In-Reply-To: <20200509080627.23222-3-dongchun.zhu@mediatek.com>
On Sat, May 09, 2020 at 04:06:27PM +0800, Dongchun Zhu wrote:
> Add a V4L2 sub-device driver for OV02A10 image sensor.
...
> +#define OV02A10_ID(_msb, _lsb) ((_msb) << 8 | (_lsb))
How often do you use this macro?
...
> +static int ov02a10_read_smbus(struct ov02a10 *ov02a10, unsigned char reg,
> + unsigned char *val)
> +{
> + struct i2c_client *client = v4l2_get_subdevdata(&ov02a10->subdev);
> + int ret;
> +
> + ret = i2c_smbus_read_byte_data(client, reg);
> +
Extra blank line.
> + if (ret < 0)
> + return ret;
> +
> + *val = (unsigned char)ret;
> +
> + return 0;
> +}
...
> +static int ov02a10_entity_init_cfg(struct v4l2_subdev *sd,
> + struct v4l2_subdev_pad_config *cfg)
> +{
> + struct v4l2_subdev_format fmt = {
> + .which = cfg ? V4L2_SUBDEV_FORMAT_TRY
> + : V4L2_SUBDEV_FORMAT_ACTIVE,
I think it would be fine to have it on one line.
> + .format = {
> + .width = 1600,
> + .height = 1200,
> + }
> + };
> +
> + ov02a10_set_fmt(sd, cfg, &fmt);
> +
> + return 0;
> +}
...
> + if (!ret) {
> + if (rotation == 180) {
if (a) {
if (b) {
...
}
}
==
if (a && b) {
...
}
> + ov02a10->upside_down = true;
> + ov02a10->fmt.code = MEDIA_BUS_FMT_SRGGB10_1X10;
> + }
> + }
--
With Best Regards,
Andy Shevchenko
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-05-11 9:35 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-09 8:06 [V8, 0/2] media: i2c: Add support for OV02A10 sensor Dongchun Zhu
2020-05-09 8:06 ` [V8, 1/2] media: dt-bindings: media: i2c: Document OV02A10 bindings Dongchun Zhu
2020-05-11 16:02 ` Rob Herring
2020-05-11 19:54 ` Sakari Ailus
2020-05-12 2:40 ` Dongchun Zhu
2020-05-21 18:59 ` Tomasz Figa
2020-05-24 20:33 ` Sakari Ailus
2020-05-21 19:35 ` Tomasz Figa
2020-05-22 9:44 ` Dongchun Zhu
2020-05-09 8:06 ` [V8, 2/2] media: i2c: ov02a10: Add OV02A10 image sensor driver Dongchun Zhu
2020-05-11 8:51 ` Sakari Ailus
2020-05-11 11:52 ` Dongchun Zhu
2020-05-11 9:33 ` Andy Shevchenko [this message]
2020-05-11 12:06 ` Dongchun Zhu
2020-05-21 19:32 ` Tomasz Figa
2020-05-23 4:50 ` Dongchun Zhu
2020-06-10 18:36 ` Tomasz Figa
2020-06-12 9:31 ` Dongchun Zhu
2020-06-12 18:49 ` Tomasz Figa
2020-06-15 7:24 ` Dongchun Zhu
2020-06-15 8:44 ` Andy Shevchenko
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=20200511093308.GF185537@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=bgolaszewski@baylibre.com \
--cc=bingbu.cao@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=dongchun.zhu@mediatek.com \
--cc=drinkcat@chromium.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=louis.kuo@mediatek.com \
--cc=mark.rutland@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=mchehab@kernel.org \
--cc=robh+dt@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=shengnan.wang@mediatek.com \
--cc=sj.huang@mediatek.com \
--cc=srv_heupstream@mediatek.com \
--cc=tfiga@chromium.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).