Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp889149ybf; Fri, 28 Feb 2020 09:31:51 -0800 (PST) X-Google-Smtp-Source: APXvYqzZ6ql9uDUGuGJjxv05/ZBn8RCEPzznBeG6f2Xg+3Sa4I4gcioXkuk8TEWKZ+b9sH3+yG0z X-Received: by 2002:aca:3d7:: with SMTP id 206mr4007358oid.98.1582911111594; Fri, 28 Feb 2020 09:31:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582911111; cv=none; d=google.com; s=arc-20160816; b=GlgeHpM19EsxbYwaQgDxXUix4gUwXL3BW5BAB9EQ3aGmChS3KzZPVth1LFk1stU/bx UASPjJRP1JEvuS5F3ue4/0W38E9+ST9+OUTN8uBOtww5yi3rKb6YjfIX2etFrNYqlcR0 8IScNa3pyUJu29PlbF9tK5hF+Q1ym5SSooLb5Y2Nnow3PJ6z5bfO+60MWbfWtFMaaeEP ri41igtY4vL6N8RvpylrUQVhgBwKs9R9w8wUwRuyMYwFTIV/bteeQgKlzsumxZuK6l4Y O01InQMxAP62W35vSX6Q8GYAI4djSbZG1DlLvwQS0sMtmoobm9vO4APfV/bD1LvkT7pe a5jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=kDMJgw4k/0TVmBJKgQCKTtnqqdoZnRz+8hLD+C3oQEU=; b=WC8Fo0IgvmYHUMRRrOKqimeyqUhpJUxBQIidUQaAlXAt1tWvcFUoY4+/aZswONRzJm 4saqAgX4jpDK/PepxbfOnyOPjakYczSWJuefxmXtVIjdiH8rG05R3RPyw3x0rpOl4E8t 0JXrE/P7a3D50W9LW/PIvSc+ePKl4ubv8mm/MKXlSYIB7buVFrQJ/+4WdVBA9bxRQinA UTXDHsDVWgQAZ2Q8QzGSmw5Rb7kJbXAqjyggacqz0tYOGYsNOGluyUPh1oPajm3dYv4y ubrHjF42H+fe/izrpkbJ6k2dURDCduttZcTvIyv2kaZNr1TE7boGGq5Od/fYFNufKSV3 X3pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Je24LAfs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r22si1858532otn.192.2020.02.28.09.31.38; Fri, 28 Feb 2020 09:31:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Je24LAfs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726046AbgB1RbW (ORCPT + 99 others); Fri, 28 Feb 2020 12:31:22 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:33176 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725730AbgB1RbW (ORCPT ); Fri, 28 Feb 2020 12:31:22 -0500 Received: by mail-lf1-f67.google.com with SMTP id n25so2717447lfl.0; Fri, 28 Feb 2020 09:31:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kDMJgw4k/0TVmBJKgQCKTtnqqdoZnRz+8hLD+C3oQEU=; b=Je24LAfsRFRYBbBIONtjE5FMXXLVtAf9UgF8iZMPYyZrH49+egQjYO4heaUEcCrbZo RVTrbxjmbH9uLttafjP/cgLGjwXkrELCN93m4FLZkD2+4OD+khynAn+uDUn34/sgqZpa UZbRiuoj5gDONEP65txSciDg5HK100J3x50pvGIbXYfABZ5Rab57nN82xhLv5l9eVcZO A0YgG5oFjtIly25ZuBwVc7VyUHyRYgsXUdpegASyEDEIhOdAXpgoeHtFRXpJ/AYjGkOL J/7FJAuKr4chpaBgx1hg6yv0ItZhwTp+NQQROB4azSfnUb/2TaUyBwzQg+iOAWsNQUp9 QuEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kDMJgw4k/0TVmBJKgQCKTtnqqdoZnRz+8hLD+C3oQEU=; b=sy8bmbZ4QkZA7ndipa4Gr1SMBAZZRJWiK7FSxPI6syR0mnVza5a8NpOORWleS0Gpx5 h78KT9eC80h6ToMiMOWDzeS6PqmG/QfhZLuDHTiyVPHQEoqtCwQM/uLm8RmQvbdrYN/P MrzTEmnJ3uHdOQVtF05TsDuZHSybjgTn3wq2CMhMpq7OabMIht6QUOrZJP3BdDnAQTvm 9c/6eyRfLQVlSPOjuMQli7OcExTNLfr9ydaDgk5+1+qHJCsP/qyg4TbVTUWQuxS0r3sK JtAN4OWJqfeFGbC6F/h6/mTa6ILyVm7S82Mg2DeqKr+XX/3yNExlCIMzIN7ZJn2suDH9 sDNQ== X-Gm-Message-State: ANhLgQ2ckt8hO5mq9UrGvNeHn9SYVpfl6linuLsBcL38cTjo9NFNLKLb ZAGhAd6vFnyHMIlaMBav4h9qaiJf97/xoSzwA3M= X-Received: by 2002:a05:6512:10d4:: with SMTP id k20mr3268284lfg.70.1582911079950; Fri, 28 Feb 2020 09:31:19 -0800 (PST) MIME-Version: 1.0 References: <20200228164126.17517-1-prabhakar.mahadev-lad.rj@bp.renesas.com> In-Reply-To: <20200228164126.17517-1-prabhakar.mahadev-lad.rj@bp.renesas.com> From: Fabio Estevam Date: Fri, 28 Feb 2020 14:31:08 -0300 Message-ID: Subject: Re: [PATCH] media: i2c: ov5645: Add virtual_channel module parameter To: Lad Prabhakar Cc: Mauro Carvalho Chehab , Sakari Ailus , linux-media , linux-kernel , Lad Prabhakar Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Lad, On Fri, Feb 28, 2020 at 1:41 PM Lad Prabhakar wrote: > > OV5645 can operate in virtual channel 0-3 in CSI2 interfaces, this patch > adds support for module parameter virtual_channel to select the required > channel. By default OV5645 operates in virtual channel 0. > > Signed-off-by: Lad Prabhakar > --- > drivers/media/i2c/ov5645.c | 28 ++++++++++++++++++++++++++++ > 1 file changed, 28 insertions(+) > > diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c > index a6c17d15d754..0a0671164623 100644 > --- a/drivers/media/i2c/ov5645.c > +++ b/drivers/media/i2c/ov5645.c > @@ -54,6 +54,7 @@ > #define OV5645_TIMING_TC_REG21 0x3821 > #define OV5645_SENSOR_MIRROR BIT(1) > #define OV5645_MIPI_CTRL00 0x4800 > +#define OV5645_REG_DEBUG_MODE 0x4814 > #define OV5645_PRE_ISP_TEST_SETTING_1 0x503d > #define OV5645_TEST_PATTERN_MASK 0x3 > #define OV5645_SET_TEST_PATTERN(x) ((x) & OV5645_TEST_PATTERN_MASK) > @@ -61,6 +62,11 @@ > #define OV5645_SDE_SAT_U 0x5583 > #define OV5645_SDE_SAT_V 0x5584 > > +static u8 virtual_channel; > +module_param(virtual_channel, byte, 0644); > +MODULE_PARM_DESC(virtual_channel, > + "MIPI CSI-2 virtual channel (0..3), default 0"); Should this be a device tree property instead?