Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp106924pxu; Tue, 1 Dec 2020 07:11:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJz+OkBZN7bcLDmEELlQHVUOe26V1WYqQDxnJSeDq/E6h7hbtY+NCV+3OIC9sHK6hBlyk0tL X-Received: by 2002:aa7:d154:: with SMTP id r20mr3621358edo.258.1606835492240; Tue, 01 Dec 2020 07:11:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606835492; cv=none; d=google.com; s=arc-20160816; b=tyKA9sOIVPrHq+jr1nMGMl9DNIpAzDiKRZ3HLHTYh+yBeaRMs56HE1C58G4Zrv0ULb U4DAkPoUMJJuiV1L1jM8Fv3vW0BIK7Z4kLPI5YyydP+CDaZzVwdBqJF5Txzzm7R+HmJm j3+APImqPDVGiM+OGXcuPTQjKu7WwYM3vxEPFps0foUvaFdimOcL7B+RQ/CSCPMIV0gJ aI1sqb/rIXhFXPVNzb/RPQHm8Fxpc1ACjbtRlbGelne99aq3Yea1SD+SdCNzJ3cQLpIW wHtpY/lGqrDWlPtcmH+q/G655AFSZilCvcDs7rz5obF34RU95fgViAtAc2ql5qk3ljH+ 6FKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=cH7iSktHhqtqMSoa4lM8Syu28aRRjOFO4moj/6Ww5Kw=; b=pejiTnGBtwxU+RLvK2C80+l0JVruNv/MjbEaDyhdF+am+t7LYfsoCdFG7iyuZWXd8S I6NO71jNzCyf5qOHGqEUSAU3LfUNG8+siLdkQHgZaAY1STMA5XH1yuX52WtRC06L4N3P mb3pB8PXo9uSibqKK5IUdi3ubVcC7QnazgF3Gfv1Ozdvbvu3FMtnH8UWXo+4Ds0wbWLZ 4rdVZEiuONbPAoBFADuS9cQq4GVvoV3BD3l1AZ0QLykzm6g8LPgbQ9sPp48QSWOAR4u2 hHW5T44tKEE8VJqRJ9o9jvRRV5+TB6vRmJ2ZPZN5QVJQkZne8zPqyTfbfm0rn0w5fSO2 WfTQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t17si74711ejj.562.2020.12.01.07.11.07; Tue, 01 Dec 2020 07:11:32 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391732AbgLAPHU (ORCPT + 99 others); Tue, 1 Dec 2020 10:07:20 -0500 Received: from mga12.intel.com ([192.55.52.136]:56660 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387462AbgLAPHT (ORCPT ); Tue, 1 Dec 2020 10:07:19 -0500 IronPort-SDR: O0Gq3HRctk79IbPZ5bOC9GaU9TuwpVT112ZXX20mvKAQnlJp+Nn5XMHWLUNlCoZ5/hyBzQKYrQ Q5zMmdkXyMSA== X-IronPort-AV: E=McAfee;i="6000,8403,9822"; a="152093092" X-IronPort-AV: E=Sophos;i="5.78,384,1599548400"; d="scan'208";a="152093092" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2020 07:05:36 -0800 IronPort-SDR: OQ4oSN/ZfoiCZhKZjYG9XGJcVgAuKTLV12ethorldSZdb2n1J8QTmg5CGra7aN4/3BwuY5Evsq sSZ/uEhZiGHw== X-IronPort-AV: E=Sophos;i="5.78,384,1599548400"; d="scan'208";a="367579376" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2020 07:05:30 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1kk7Ec-00BIOo-Rr; Tue, 01 Dec 2020 17:06:30 +0200 Date: Tue, 1 Dec 2020 17:06:30 +0200 From: Andy Shevchenko To: Sakari Ailus Cc: Daniel Scally , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-gpio@vger.kernel.org, linux-i2c@vger.kernel.org, linux-media@vger.kernel.org, devel@acpica.org, rjw@rjwysocki.net, lenb@kernel.org, gregkh@linuxfoundation.org, mika.westerberg@linux.intel.com, linus.walleij@linaro.org, bgolaszewski@baylibre.com, wsa@kernel.org, yong.zhi@intel.com, sakari.ailus@linux.intel.com, bingbu.cao@intel.com, tian.shu.qiu@intel.com, mchehab@kernel.org, robert.moore@intel.com, erik.kaneda@intel.com, pmladek@suse.com, rostedt@goodmis.org, sergey.senozhatsky@gmail.com, linux@rasmusvillemoes.dk, kieran.bingham+renesas@ideasonboard.com, jacopo+renesas@jmondi.org, laurent.pinchart+renesas@ideasonboard.com, jorhand@linux.microsoft.com, kitakar@gmail.com, heikki.krogerus@linux.intel.com Subject: Re: [PATCH 13/18] ipu3-cio2: Add functionality allowing software_node connections to sensors on platforms designed for Windows Message-ID: <20201201150630.GF4077@smile.fi.intel.com> References: <20201130133129.1024662-1-djrscally@gmail.com> <20201130133129.1024662-14-djrscally@gmail.com> <20201130203551.GP4351@valkosipuli.retiisi.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201130203551.GP4351@valkosipuli.retiisi.org.uk> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 30, 2020 at 10:35:51PM +0200, Sakari Ailus wrote: > On Mon, Nov 30, 2020 at 01:31:24PM +0000, Daniel Scally wrote: ... > > +/* > > + * Extend this array with ACPI Hardware ID's of devices known to be working. > > + * Do not add a HID for a sensor that is not actually supported. > > + */ > > +static const char * const cio2_supported_devices[] = { > > + "INT33BE", > > + "OVTI2680", > > I guess we don't have the known-good frequencies for the CSI-2 bus in > firmware? > > One option would be to put there what the drivers currently use. This > assumes the support for these devices is, well, somewhat opportunistic but > I guess there's no way around that right now at least. > > As the systems are laptops, they're likely somewhat less prone to EMI > issues to begin with than mobile phones anyway. ACPI has only XTAL clock frequency (dunno if it's the same as CSI-2 bus clock). Currently it may be one out of 19.2 MHz, 24 MHz (with a remark that all sensors must use same value as PMIC can't produce several clocks). > > +}; ... > > + strcpy(sensor->prop_names.clock_frequency, "clock-frequency"); > > + strcpy(sensor->prop_names.rotation, "rotation"); > > + strcpy(sensor->prop_names.bus_type, "bus-type"); > > + strcpy(sensor->prop_names.data_lanes, "data-lanes"); > > + strcpy(sensor->prop_names.remote_endpoint, "remote-endpoint"); > > Please use the actual field size instead with strncpy / strscpy. Perhaps Laurent's proposal is better? -- With Best Regards, Andy Shevchenko