Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3939478pxb; Mon, 8 Feb 2021 04:08:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzANB753TzpOV01lW51jsbRQwO8JJILeYxpCCDnIf5PMLcdauEeP3SUHEsMqhy/SeVdi5Cs X-Received: by 2002:a17:906:4013:: with SMTP id v19mr16627359ejj.5.1612786134442; Mon, 08 Feb 2021 04:08:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612786134; cv=none; d=google.com; s=arc-20160816; b=m4drj1ra8OcIcxayxlQzUFl/PP1OKkyb6STpFKbvB5MpLNOjR7IaD13Wc9t06fuGbn Li5q81zdvHzEvrqf82o+OHGSRoOBV6whHNVDylV3VsmFcRrPluNS3hK2YMe5rOn5EZT+ cD0SZRDQmIQRHs0FORW3+zZ/HnQ+Pg90+eavrJrWjLwleSGwhrfm+DLKAeY9w5TwteW6 p2mRufUuPz4cSQ3jF5gQ0HWKm1w/UuO37jNc4rVr3qUrp6T6u3hfs/B3kUBvhBbMUk26 Y4BuS8SzBhP9VGTZ8BXUQ9XHrS58X9K4CCrc0bPxGMU+kKKZ6eZuMMGqzoQy7RYQep82 8SIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=+geKRBDKyg6ZblFnsWQl+JCF+qHEb4kkAVAZAdiI0G8=; b=pD0sm+4XKYogXhSunZ+iTB1ug5E6DbYqp8FNGBu4s8sZcnue78i8lFna94ljBhO7Zz r7P4lS+PpLJlLyIh1vdjTQYRQfB8NnCDDubnDhqChedMae5thfo8X2kcYrRYlDIdmyts aWdZM1f6rzI2WSy1WBxAWXn8nJRfGkFOw+BCeayweQxXmAu9QSDQlW+JiMKCxgo+lPqL sTudcxxbSsubdnpZwzI32pmzTpyeVOx5nHz3n5F/nmHjLdJBsniTDB/9j1BhPzRVkGoQ npQx1yHHgehW0ywPwPavNKpzbOX73NirY5CKYeVpHS4EYa1QHmag/tihkMl8d/oiT0dz YsPA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t11si11409410eds.609.2021.02.08.04.08.30; Mon, 08 Feb 2021 04:08:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232676AbhBHMFl (ORCPT + 99 others); Mon, 8 Feb 2021 07:05:41 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:44791 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231784AbhBHLn7 (ORCPT ); Mon, 8 Feb 2021 06:43:59 -0500 X-Originating-IP: 93.34.118.233 Received: from uno.localdomain (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 5331AC0005; Mon, 8 Feb 2021 11:42:38 +0000 (UTC) Date: Mon, 8 Feb 2021 12:43:02 +0100 From: Jacopo Mondi To: Hans Verkuil Cc: Jacopo Mondi , kieran.bingham+renesas@ideasonboard.com, laurent.pinchart+renesas@ideasonboard.com, niklas.soderlund+renesas@ragnatech.se, geert@linux-m68k.org, linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Hyun Kwon , Manivannan Sadhasivam , sergei.shtylyov@gmail.com, Laurent Pinchart Subject: Re: [PATCH v8 1/5] media: i2c: Add driver for RDACM21 camera module Message-ID: <20210208114302.yxane4iifalacjnr@uno.localdomain> References: <20210114170429.139762-1-jacopo+renesas@jmondi.org> <20210114170429.139762-2-jacopo+renesas@jmondi.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > Signed-off-by: Jacopo Mondi > > --- > > 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 > > > > > > > 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 > > > > > +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