Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp2753563ybn; Thu, 26 Sep 2019 17:19:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqw5nWSe0pC7YoWfMOg+P24k10kR0Hp7opq+hOUVBOmeebkHhrkufXkT+vc3Agm1RJhGBUTz X-Received: by 2002:a50:ed17:: with SMTP id j23mr1671175eds.248.1569543542100; Thu, 26 Sep 2019 17:19:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569543542; cv=none; d=google.com; s=arc-20160816; b=RpgDwIPAXXZ1oAb7N+acQE3cxYkicn80GlZ1/Ij/suZWfmtOGm9XaVOXSJpuf+Ux2k OswHTkCHz1xNk4BGLZd5xe47km383J1tAdx+ONhmXbf3U6nPhLbjjEpCpSPgEaDjlur4 sqYhfKcoOEOCjZVyoH1SUB2UhHpPfEAvjbYmyr557QUAXF3oje6pk+R0xXkiRRZ0suFG 1XXjXtNu45xwNYwnddGg0lxg0qx74dj0W+fcDTJk13CGlXfnwHPrAZHBeM9BJ0XIUYi+ FD8+8Fz1rKpLKVezVM7AkmffAexJd3iQzGBqNZ+GPkeZMzX5M2gROTyx3EIA8gnp0UXn ZVFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:user-agent:subject:from :to:cc:references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=ouc/ZGlpophw+opTwcJn7DhMFr0Pb1HOOZEWpUUYSk0=; b=D91KGCKmwgtGiMyR8n1lP3YDpM3Szzq4AfuR3R6WTEPR88O5D1CNnHeO/w8E5xXmF/ ylVZBM9HGanNun1a0iPPx7QUHCRZlcEoHNw6qdyVtgouLUFCl5Se2I+Mo1DcmiBiHdud 9rkxMKHyZUcbn4d2s+q8FjZ/TnMhVGpLcJcfFPVIGwjn1N9emXRWJ+PoZ6KWdg0gasf0 /524u7DP+n4OldDCS79Si9E7PC5ZmzpSIVNP6Gx62TuEBeORrWeKSV8cJl/saCRpNSRX aEK6ULJquEOrQzjSAC8c+3n8lyPhPIT0IeKJ4YOAR7oVbDyjjjYw5Q256cWSXg2rxxgY Q7Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DRdMZW5A; 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 h23si529601edh.248.2019.09.26.17.18.37; Thu, 26 Sep 2019 17:19:02 -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; dkim=pass header.i=@kernel.org header.s=default header.b=DRdMZW5A; 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 S1727305AbfI0AO0 (ORCPT + 99 others); Thu, 26 Sep 2019 20:14:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:46162 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726411AbfI0AO0 (ORCPT ); Thu, 26 Sep 2019 20:14:26 -0400 Received: from kernel.org (unknown [104.132.0.74]) (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 DFDC7207FF; Fri, 27 Sep 2019 00:14:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569543266; bh=ouc/ZGlpophw+opTwcJn7DhMFr0Pb1HOOZEWpUUYSk0=; h=In-Reply-To:References:Cc:To:From:Subject:Date:From; b=DRdMZW5AJXatJs4G1JlQTfOfltYGKHwfQVF23ynDzZJFds1pYvAYEyx/JxesVC+dt gxTeolLgLZudoqnLbTi5VsZObkLPTtiZuRqz6glzq0r8YrmSg+SB3xzeUcyj+Io4oN pqH6gowGJ0wJFBxhDSeWYNE4X7xhF2Ev/zt3+X18= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20190919102518.25126-2-narmstrong@baylibre.com> References: <20190919102518.25126-1-narmstrong@baylibre.com> <20190919102518.25126-2-narmstrong@baylibre.com> Cc: Neil Armstrong , linux-clk@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org To: Neil Armstrong , jbrunet@baylibre.com, mturquette@baylibre.com From: Stephen Boyd Subject: Re: [PATCH RFC 1/2] clk: introduce clk_invalidate_rate() User-Agent: alot/0.8.1 Date: Thu, 26 Sep 2019 17:14:25 -0700 Message-Id: <20190927001425.DFDC7207FF@mail.kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Neil Armstrong (2019-09-19 03:25:17) > This introduces the clk_invalidate_rate() call used to recalculate the > rate and parent tree of a particular clock if it's known that the > underlying registers set has been altered by the firmware, like from > a suspend/resume handler running in trusted cpu mode. >=20 > The call refreshes the actual parent and when changed, instructs CCF > the parent has changed. Finally the call will recalculate the rate of > each part of the tree to make sure the CCF cached tree is in sync with > the hardware. >=20 > Signed-off-by: Neil Armstrong > --- The knee-jerk reaction to these patches is that it shouldn't be a consumer API (i.e. taking a struct clk) but a provider API (i.e. taking a struct clk_hw). I haven't looked in any more detail but just know that it's a non-starter to be a consumer based API because we don't want random consumers out there to be telling the CCF or provider drivers that some clk has lost state and needs to be "refreshed".