Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1502504imu; Sun, 16 Dec 2018 02:09:02 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vs9Q/yXMQcSaa2HR8vT+a+uAE7x/ZEl3rq2bMJ/8s2DN0dWrZ737iCx40TySzt8844XueL X-Received: by 2002:a63:d252:: with SMTP id t18mr8706510pgi.133.1544954942598; Sun, 16 Dec 2018 02:09:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544954942; cv=none; d=google.com; s=arc-20160816; b=NQvGQkfoDzlCWwvtujTHhPDdOCdEaw35nzGjOh1+Stulr99pWjVpHcCw0UqC0UcYiM q9zNeskaLOZIRurgnHukjtK/QeMcDfBm0IaS65g50BUTo8iRW6md9Bd4bfsnvTuFeMbF vfiT0MMhQ3v3G//aQGSgqgO1q+0y9nx7+tLQ+rWTiJbyweDwHUv2wUwWyzoPoEuE7BOu eDZzaQ6JwN1idu19qKOb//5mbfWMqCBjtTE7rGLW2L1rCyRDy94fb2BOUNxxsh6vK2mG Wk3WN/Y8Ntqen/qmpDpjDV2FSg/DH1VDSUU6jU0Iga+bPApn5lhm/ZzYrpp8g/ptTwdz wfvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=uAOUYSCU86xDhZ3fAckuO+bpAZnmGCtgFgCyp/gva3E=; b=xVNuEa3972f9uAdDtyJRCW5EtKBL8T4K1W9l8axfH19VeFI9rop41na5y7GUkXnsf+ 1K/P4IQyo3+MulNJqyOY6vmQkeYeQN9Ucch8iKxM4bkub5cIyzdTWsESzraxmvaoYr8m fuT0ky+Xc6PHidc4xwR0HdVOGjA8dnnFeiUF32Jl3aYYZZfVfAyPEbRwGplxA2V5skRR izcGNhfsaIhB5beVpcH2NcJkeCXzf+Y+9ieVTQjjshqy0b5UMJivRqGUfwu8PslRiVyD bDWyqkW2fwDyWGT0L9WtIPky+QxKW+BZAqP/l4O+5AhfpkAC/OtiD3bgYT1TVdi1Qp5P OqPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0hr31RY8; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r11si8232959plo.319.2018.12.16.02.08.46; Sun, 16 Dec 2018 02:09:02 -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=@kernel.org header.s=default header.b=0hr31RY8; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730088AbeLPKHt (ORCPT + 99 others); Sun, 16 Dec 2018 05:07:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:58994 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729354AbeLPKHs (ORCPT ); Sun, 16 Dec 2018 05:07:48 -0500 Received: from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net [81.96.234.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 542832086C; Sun, 16 Dec 2018 10:07:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544954867; bh=Eh9wW8TO2y4lVphbj8fY/LBgvhDq4RcVnR/VtZC/9KA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=0hr31RY8GqkgL9j7cUK2ap7T6tTwSZ9oYmBbmhYxWN51H3XbIgRLkOQCFN0rdsbpw nQmAe798yMfJaDpWHT3bndYOUAu+0J37qdsbO7fzkT0vX79OD6+8Zn30KAYeZYuOQF 3jGbjOcw0DOZ/Yf6oqS3xshE8XzfLYw2HOkn6TnQ= Date: Sun, 16 Dec 2018 10:07:41 +0000 From: Jonathan Cameron To: Stephen Boyd Cc: Mircea Caprioru , Michael.Hennerich@analog.com, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, Rob Herring , linux-clk@vger.kernel.org Subject: Re: [PATCH 1/2] staging: iio: adc: ad7192: Add clock for external clock reference Message-ID: <20181216100741.4e362a17@archlinux> In-Reply-To: <154475156267.19322.6284056396098102605@swboyd.mtv.corp.google.com> References: <20181206091052.7644-1-mircea.caprioru@analog.com> <20181208152954.596529f8@archlinux> <154475156267.19322.6284056396098102605@swboyd.mtv.corp.google.com> X-Mailer: Claws Mail 3.17.2 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rob, Clk experts, questions for you below. Jonathan On Thu, 13 Dec 2018 17:39:22 -0800 Stephen Boyd wrote: > Quoting Jonathan Cameron (2018-12-08 07:29:54) > > On Thu, 6 Dec 2018 11:10:51 +0200 > > Mircea Caprioru wrote: > > > > > This patch adds a clock to the state structure of ad7192 for getting the > > > external clock frequency. This modifications is in accordance with clock > > > framework dt bindings documentation. > > > > > > Signed-off-by: Mircea Caprioru > > > > +cc Rob and the clk list for advise on how to do the binding for this one. > > > > It is basically 2 pins, you can put a clock in on one of them or connect > > a crystal across them. The driver has to set a register to say which is > > the case. > > > > Current proposal is two optional clocks (fall back to internal oscillator) > > but that doesn't seem to be commonly done, so I'm wondering if there > > is a 'standard' way to handle this sort of thing. > > > > I'm not sure I fully understand, but I think perhaps > assigned-clock-parents would work? Or does that not work because either > way some parent is assigned, either the crystal or the optional clk that > isn't a crystal? > My concern is they aren't really separate clock inputs. They are just different ways of providing the same fundamental clock. So I think we may want to just provide a single clock and have another dt binding to say what it is. So lots of ways we could do it, but I'm not sure what the right one to go with is! Jonathan