Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4642458rdh; Wed, 29 Nov 2023 07:02:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IF0Mey+91mdj8j67b2P2CYi1DJqMDGynDO5X7mX4NNYdOt0OqUhEfPXtzQ6r+aIItrpOQii X-Received: by 2002:a05:6830:1db6:b0:6d6:4558:bd56 with SMTP id z22-20020a0568301db600b006d64558bd56mr20336166oti.5.1701270164882; Wed, 29 Nov 2023 07:02:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701270164; cv=none; d=google.com; s=arc-20160816; b=xwlKQxnQ4uh7Whmqd5820gk1+qC2gwzwvGKJYxSGUMa5MITOvXIHOGPxeSSjLAUax9 r3y5h/rTtjzIcxWBiq/L3470+h3WeHT17Afw93jPmflIpRRivptzy0AhV33EMsw5CicX 1sVMhhV382OZdT1U0u8XKSTGV2dgboh6c6UxGE1q7EFKNYBJDyktlMCDluEPwlAFoEL/ tZgfNiCS32OKixZ7Vnn+K7Cu9ibsYk5mnM68e5/QF++Wjc8HSn2msc6kUD7XR45h0314 YizNTTQT8JlzJ4BX0nY/HQAncHMl5udjnlpC3/TzFBYkPJ/X9e5IDT52UZGaue6UB3VV aUEw== 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:dkim-signature; bh=FqEXn4TkNGmRqOG8wUHq0Wi1OtW5C8oFhPUq5ry9A8E=; fh=l4LF7dr9KHyjijrmQHUQ6hFEdF+B69O2AtDfpXhSw3I=; b=NlXcc+D8T4m+4Nnu3/JAF2SW/keYaGft1j7dw49K4kKiy16CErkmqYU2wivW03jRHq Jmv+ZefTMvv9bppPtj5ik7csVKhvmGPvq6gY9+/Z5HZUjGc6rOFiIV4avH061Pn6GZ2r SlG285gD3vkulnTEAVf3JZcFM6VjfZF4HryMmCvWEbbLGVzZr9tiIIgAFasT1ORI3Gx4 hnY4sVOYL6ORsTIJCkC3DaH47tsrqBEKjCqjKZ5uB6dSE0Kelt5kxw0vtebUYIIM+9ZK y1djE0L8tQMT7fgFALJW/kkWvrlSthX2FIkDM1GtqaiT9mlDWMdqwhpkF560qK7mYJ2n HLOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=E+jLAui0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id a25-20020a056830101900b006d7f7f409e2si5358672otp.109.2023.11.29.07.02.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 07:02:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=E+jLAui0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 5C623804C660; Wed, 29 Nov 2023 07:02:38 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234954AbjK2PCH (ORCPT + 99 others); Wed, 29 Nov 2023 10:02:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234733AbjK2PCG (ORCPT ); Wed, 29 Nov 2023 10:02:06 -0500 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::224]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8681CD63; Wed, 29 Nov 2023 07:02:11 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 323E0E0005; Wed, 29 Nov 2023 15:02:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1701270130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FqEXn4TkNGmRqOG8wUHq0Wi1OtW5C8oFhPUq5ry9A8E=; b=E+jLAui0VL91nd52Dvf3cRY0kx7RLWv49clkgeDoW80bFX6OLdPW8bq/jKE9X7eTmJe6PF z2J9HMO1R/IJFwr8oZEz3HHa1noeLNzk+3heXTuIxWfeuIZ3aEibhCqcAsM4t7Qe9HXzc8 YA5cP88WBKEzqKczbe9JHSHfS5zKORGDRT52GJnl647+KN8LCeMIH5VaCfszweBSIzkK0q RGqMm+FZvpRRfil41AaRZUWU+Vk7S8R8PV6sflgaODMafXaaBcsOJfW7PMyr3N1mMWuiTS v8FDtsZQDMfMwcl2/3bfVyebkRcp1xTLhMXl7deko05NeNn8bVelDqOAABlS8A== Date: Wed, 29 Nov 2023 16:02:08 +0100 From: Paul Kocialkowski To: Mehdi Djait Cc: mchehab@kernel.org, heiko@sntech.de, hverkuil-cisco@xs4all.nl, laurent.pinchart@ideasonboard.com, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, conor+dt@kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, alexandre.belloni@bootlin.com, maxime.chevallier@bootlin.com Subject: Re: [PATCH v9 3/3] media: i2c: Introduce a driver for the Techwell TW9900 decoder Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Mt5NDXBwaHl6onk+" Content-Disposition: inline In-Reply-To: X-GND-Sasl: paul.kocialkowski@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 29 Nov 2023 07:02:38 -0800 (PST) --Mt5NDXBwaHl6onk+ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Mehdi, On Fri 17 Nov 23, 16:42, Mehdi Djait wrote: > The Techwell video decoder supports PAL, NTSC standards and > has a parallel BT.656 output interface. >=20 > This commit adds support for this device, with basic support > for NTSC and PAL, along with brightness and contrast controls. >=20 > The TW9900 is capable of automatic standard detection. This > driver is implemented with support for PAL and NTSC > autodetection. Very nice work on this iteration, I am quite happy with it! There is just one cosmetic comment below. With that fixed, you can add my: Reviewed-by: Paul Kocialkowski Cheers, Paul > Signed-off-by: Mehdi Djait > --- > MAINTAINERS | 6 + > drivers/media/i2c/Kconfig | 15 + > drivers/media/i2c/Makefile | 1 + > drivers/media/i2c/tw9900.c | 777 +++++++++++++++++++++++++++++++++++++ > 4 files changed, 799 insertions(+) > create mode 100644 drivers/media/i2c/tw9900.c [...] > diff --git a/drivers/media/i2c/tw9900.c b/drivers/media/i2c/tw9900.c > new file mode 100644 > index 000000000000..895ca459087b > --- /dev/null > +++ b/drivers/media/i2c/tw9900.c > @@ -0,0 +1,777 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Driver for the Techwell TW9900 multi-standard video decoder. > + * > + * Copyright (C) 2018 Fuzhou Rockchip Electronics Co., Ltd. > + * Copyright (C) 2020 Maxime Chevallier > + * Copyright (C) 2023 Mehdi Djait > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#define TW9900_REG_CHIP_ID 0x00 > +#define TW9900_REG_CHIP_STATUS 0x01 > +#define TW9900_REG_CHIP_STATUS_VDLOSS BIT(7) > +#define TW9900_REG_CHIP_STATUS_HLOCK BIT(6) > +#define TW9900_REG_OUT_FMT_CTL 0x03 > +#define TW9900_REG_OUT_FMT_CTL_STANDBY 0xA7 > +#define TW9900_REG_OUT_FMT_CTL_STREAMING 0xA0 > +#define TW9900_REG_CKHY_HSDLY 0x04 > +#define TW9900_REG_OUT_CTRL_I 0x05 > +#define TW9900_REG_ANALOG_CTL 0x06 > +#define TW9900_REG_CROP_HI 0x07 > +#define TW9900_REG_VDELAY_LO 0x08 > +#define TW9900_REG_VACTIVE_LO 0x09 > +#define TW9900_REG_HACTIVE_LO 0x0B > +#define TW9900_REG_CNTRL1 0x0C > +#define TW9900_REG_BRIGHT_CTL 0x10 > +#define TW9900_REG_CONTRAST_CTL 0x11 > +#define TW9900_REG_VBI_CNTL 0x19 > +#define TW9900_REG_ANAL_CTL_II 0x1A > +#define TW9900_REG_OUT_CTRL_II 0x1B > +#define TW9900_REG_STD 0x1C > +#define TW9900_REG_STD_AUTO_PROGRESS BIT(7) > +#define TW9900_STDNOW_MASK GENMASK(6, 4) > +#define TW9900_REG_STDR 0x1D > +#define TW9900_REG_MISSCNT 0x26 > +#define TW9900_REG_MISC_CTL_II 0x2F > +#define TW9900_REG_VVBI 0x55 Please reintroduce the newline here... > +#define TW9900_CHIP_ID 0x00 > +#define TW9900_STD_NTSC_M 0 > +#define TW9900_STD_PAL_BDGHI 1 > +#define TW9900_STD_AUTO 7 =2E.. and here to separate between register definitions and more general va= lues. > +#define TW9900_VIDEO_POLL_TRIES 20 --=20 Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com --Mt5NDXBwaHl6onk+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEJZpWjZeIetVBefti3cLmz3+fv9EFAmVnUnAACgkQ3cLmz3+f v9FDmAf+JO+XU2DEEL1k7QGncbc3yYPy1S/nrSHdwgazhkCcEUsOhO33tsv6Cha0 XB2pQEq3vYMH0KweFc2cD1ljvioqld//oxl1bgCNu2BkpcJxU5KwEfOO0Xxi4c+k gnkhovi2t/8z4yQ2jPQQfaaJre9IsQN7EBlRz7Gf+toXfiyzJNgcIuVk5LtoH26B CZNDNVHuRSLovT7SHBfNRKucRyZdNB64yyHurJwSbrAb6dVKAuJul422LRYT1TUD PCYULKA+gfytvbH+VUQwsBC82ThQZND4YhouBj1TjSKsTBmjE5jzvUFZPg8bhtoa 7UdiOQIPyb7Rn4p8hPv2gWqal8idbg== =q+aS -----END PGP SIGNATURE----- --Mt5NDXBwaHl6onk+--