Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4063366ybb; Mon, 6 Apr 2020 23:23:58 -0700 (PDT) X-Google-Smtp-Source: APiQypIjOkiv9mVbqK5L9AwfD25SN4d+/9qfTcPWIDjqp+sbeVY/MqqhUIjm5WgzwzximBZbpMxe X-Received: by 2002:a4a:370f:: with SMTP id r15mr657158oor.100.1586240638709; Mon, 06 Apr 2020 23:23:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586240638; cv=none; d=google.com; s=arc-20160816; b=sl+YrCp9E3dMjWzD2IQGOUQm/M/fhw11HXErwXhqt+6geB+2a1Kiqo1h43IY7BZL0K hTYC09qnH3AfaYB1O74AMkVg2tSP5s7nEEumYnl0HcS+EuqXtxH3PslmzlG108OIyLvT +SEEDVvr1K2UIBYizek2kqDZKixQFjum3Bi9X97Tod7VX20HeOJQlApqYOkwEJNlG7ec 4DnlIZt6bRRhPqxId2Bf8e0CTy8DVfjc+UkxBzYYaeHa+cL5/2cJ/Jzp6YlQ5887OafI 6aapdonfcc2ECWc1HY5bgwqJmERO3t+R1JLOBniL9u7a+okqNR3eeeJrdx4BLuGIIr+E voTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=d/7oVXE/RV30g407YF8Yt2SpSbTSS/7K+krT3EOIezU=; b=wh6LXJWHufr2ldpzCui7JY5a9RQsPLjG00ZoS5HN4/Puwf+oFJrWrJrrapQqSGLcv/ BybVlMJWG6XCkXSGZ9R+a/Gon8IWKR3gWLI4yHP2DBQNqx10tyLinq/NiXnlMOQNgHLe JOCO+OtJ5z1LCKM/OMhUhk0AHPnve4uP4xn7lC804TcZO8/CZDDu6/HqAIQGrRH72vMX oY1x9s6BzxVr91oYkeZyMXtPQsTM6Rdyvf7E2zD+n+8MTINd9+d6MUlAFSECXGr1a+WP rbnJ1ygM/m6RydbGdhBifObfQjZSqv2ml/QB0WitKyMJ1b0zYKPQzjS34oPag9+1fNS/ pQ/Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q197si273038oic.262.2020.04.06.23.23.47; Mon, 06 Apr 2020 23:23:58 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726996AbgDGGWx (ORCPT + 99 others); Tue, 7 Apr 2020 02:22:53 -0400 Received: from mga17.intel.com ([192.55.52.151]:24121 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726232AbgDGGWx (ORCPT ); Tue, 7 Apr 2020 02:22:53 -0400 IronPort-SDR: X/TfEfD4CRWsSqpo9g//RH7yxgCg3aDDh2rMr4R2HnxH7/0K1exrTDQYMyVY5Sxiiz9yOwc5+A BaidyKcclqlQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2020 23:22:52 -0700 IronPort-SDR: qEYf7JlZgWdR2QkscqkIrxsVpn+lpD0+6yCVbuUCA6pZmUdEMlc1wMb91tOE6waPGgHcLc/tPD dUU2kteimC7g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,353,1580803200"; d="scan'208";a="248519276" Received: from klatzer-mobl1.ger.corp.intel.com (HELO kekkonen.fi.intel.com) ([10.252.39.161]) by orsmga008.jf.intel.com with ESMTP; 06 Apr 2020 23:22:46 -0700 Received: by kekkonen.fi.intel.com (Postfix, from userid 1000) id 07E9E21D18; Tue, 7 Apr 2020 09:22:41 +0300 (EEST) Date: Tue, 7 Apr 2020 09:22:41 +0300 From: Sakari Ailus To: Laurent Pinchart Cc: Lad Prabhakar , Mauro Carvalho Chehab , Rob Herring , Mark Rutland , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Kieran Bingham , Geert Uytterhoeven , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Lad Prabhakar , Maxime Ripard Subject: Re: [PATCH v5 2/5] media: i2c: ov5645: Drop reading clock-frequency dt-property Message-ID: <20200407062241.GA8883@kekkonen.localdomain> References: <1586191361-16598-1-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com> <1586191361-16598-3-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com> <20200406165108.GA7646@kekkonen.localdomain> <20200406173234.GD16885@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200406173234.GD16885@pendragon.ideasonboard.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Laurent, On Mon, Apr 06, 2020 at 08:32:34PM +0300, Laurent Pinchart wrote: > Hi Sakari, > > (CC'ing Maxime) > > On Mon, Apr 06, 2020 at 07:51:08PM +0300, Sakari Ailus wrote: > > On Mon, Apr 06, 2020 at 05:42:38PM +0100, Lad Prabhakar wrote: > > > Modes in the driver are based on xvclk frequency fixed to 24MHz, but where > > > as the OV5645 sensor can support the xvclk frequency ranging from 6MHz to > > > 24MHz. So instead making clock-frequency as dt-property just let the > > > driver enforce the required clock frequency. > > > > Even if some current systems where the driver is used are using 24 MHz > > clock, that doesn't mean there wouldn't be systems using another frequency > > that the driver does not support right now. > > > > The driver really should not set the frequency unless it gets it from DT, > > but I think the preferred means is to use assigned-clock-rates instead, and > > not to involve the driver with setting the frequency. > > > > Otherwise we'll make it impossible to support other frequencies, at least > > without more or less random defaults. > > We're running in circles here. > > As the driver only supports 24MHz at the moment, the frequency should be > set by the driver, as it's a driver limitation. We can then work on > supporting additional frequencies, which will require DT to provide a > list of supported frequencies for the system, but that can be done on > top. I guess it would be possible to use different external clock frequencies on a sensor in a given system but that seems to be a bit far fetched, to the extent I've never seen anyone doing that in practice. Originally, the driver set the frequency based on the clock-frequency property. If we're removing that but use a fixed frequency instead, then how is that going to work going forward when someone adds support for other frequencies in the driver and has a system requiring that, while there are some other platforms relying on the driver setting a particular frequency? Although, if you're saying that this driver only needs to work with DT that comes with the kernel and you don't care about DT binary compatibility, this would be fine. -- Regards, Sakari Ailus