From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1512FC54E8D for ; Mon, 11 May 2020 09:35:31 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ACAFF207FF for ; Mon, 11 May 2020 09:35:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dRWFyxM5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ACAFF207FF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KIH8hf/nNOmXv7h+matSQ7sdHLf9MamG2MiK4nk8TUc=; b=dRWFyxM5WLluwN aL4fFw84al87UQGkAxAK737j0sEv4Ho+jetohEec028eAXxf4Krn1wmeBwM5U5ipUJH2Ui0qpoYVY NQuGc01Jmd9xFtyUQfPpaWrBHEYaRmRHhUrTc7QAd21z9hKx4WfcudUlIRJB3H5dF/qV9ZVaM6DLG ew7qmfpGS5ByXOgmPTmHub1IsdHHZVOj+7WrcwPmo6VXM9vbofmyLfVlq9lcOVx8pcOXLJ/sh/r7X mCL7+MAY4aIv92InaOSUkUKompVv6k4tQn3QHgTTIl8CIC9gXqhHqXFQmJJm17WsnSgOwlGDXi/q1 sK5tkAZi8OoBSYiaxnlA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jY4qP-00072Z-Ec; Mon, 11 May 2020 09:35:29 +0000 Received: from mga02.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jY4oB-00036d-RT; Mon, 11 May 2020 09:33:13 +0000 IronPort-SDR: jdVOlFjP40SMSG91Mhe8vOIQcSPgpYnwCzSyXB2VVFLjaF44cpZ5A3uO2oPI1As7J0fcpXc/kT w+5ycurg8k/w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2020 02:33:10 -0700 IronPort-SDR: ONYW+QqYbjMLn1MDFmvWENe6egF5WQnYr3Nj7Te1ktN7xBvPMhyHdGCfc/X9xjhrYEJUEWRnwl KL4sexatOzeQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,379,1583222400"; d="scan'208";a="371171194" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga001.fm.intel.com with ESMTP; 11 May 2020 02:33:06 -0700 Received: from andy by smile with local (Exim 4.93) (envelope-from ) id 1jY4o8-005vQO-I5; Mon, 11 May 2020 12:33:08 +0300 Date: Mon, 11 May 2020 12:33:08 +0300 From: Andy Shevchenko To: Dongchun Zhu Subject: Re: [V8, 2/2] media: i2c: ov02a10: Add OV02A10 image sensor driver Message-ID: <20200511093308.GF185537@smile.fi.intel.com> References: <20200509080627.23222-1-dongchun.zhu@mediatek.com> <20200509080627.23222-3-dongchun.zhu@mediatek.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200509080627.23222-3-dongchun.zhu@mediatek.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200511_023311_960479_35423B89 X-CRM114-Status: GOOD ( 13.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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