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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 97656C433F5 for ; Mon, 13 Sep 2021 08:59:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 70AAC61051 for ; Mon, 13 Sep 2021 08:59:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238264AbhIMJBN (ORCPT ); Mon, 13 Sep 2021 05:01:13 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:41439 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235890AbhIMJBM (ORCPT ); Mon, 13 Sep 2021 05:01:12 -0400 Received: (Authenticated sender: jacopo@jmondi.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 72BB41C0015; Mon, 13 Sep 2021 08:59:54 +0000 (UTC) Date: Mon, 13 Sep 2021 11:00:41 +0200 From: Jacopo Mondi To: Fabio Estevam Cc: laurent.pinchart@ideasonboard.com, hverkuil-cisco@xs4all.nl, linux-media@vger.kernel.org, jacopo+renesas@jmondi.org, morimoto.kuninori@renesas.com Subject: Re: [RFC 2/3] media: tw9910: Allow the TW9990 to probe Message-ID: <20210913090041.zqj4wsnli5dmnkv6@uno.localdomain> References: <20210827130150.909695-1-festevam@gmail.com> <20210827130150.909695-2-festevam@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210827130150.909695-2-festevam@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hi Fabio, On Fri, Aug 27, 2021 at 10:01:49AM -0300, Fabio Estevam wrote: > Currently the driver rejects to probe when the ID is > different from the TW9910 one. > > Allow TW9990 to probe by allowing its ID too. > > Signed-off-by: Fabio Estevam > --- > drivers/media/i2c/tw9910.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/i2c/tw9910.c b/drivers/media/i2c/tw9910.c > index 04f3c2dbc1cc..0411b8ea9bda 100644 > --- a/drivers/media/i2c/tw9910.c > +++ b/drivers/media/i2c/tw9910.c > @@ -859,7 +859,7 @@ static int tw9910_video_probe(struct i2c_client *client) > priv->revision = GET_REV(id); > id = GET_ID(id); > > - if (id != 0x0b || priv->revision > 0x01) { > + if ((id != 0x0b && id != 0x00) || priv->revision > 0x01) { I would define these. Up to you! > dev_err(&client->dev, "Product ID error %x:%x\n", > id, priv->revision); > ret = -ENODEV; > -- > 2.25.1 >