Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp58750ybd; Tue, 25 Jun 2019 16:28:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqyLe+hgsOK6qgg14N1tD+AlNoqIAbyq7Ge0E7Jcgdz4C+Fxw4Wh+oUTt3ByLFzkw+3W3s1g X-Received: by 2002:a65:6383:: with SMTP id h3mr41154245pgv.452.1561505338693; Tue, 25 Jun 2019 16:28:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561505338; cv=none; d=google.com; s=arc-20160816; b=sQYeYZrTmtVgITOecJvoJn0rVfvJYyFI/ymMo97iVhbD7mgSeTwOIgqmxY5EVZtXIQ DPeWdgKB3M9bV1lwOb/N0FjvR4HFZhICsNp8IiOQuCRQBjb4ch116mJM8Jw+afJyFKQ6 QWnAlcUfdAzOfgV9SM+NTbAke/5O7KUzM9qoCfCWnZVjBRE5xTN4LvWnNiAyb8qLICzr Xvj931bz8TRUlKbycju6YHNf7GzhG8pBroA18JGL0WjM78EOnZ8FQdtlmEB9nzDfji6o zeXVbJL840U2rSha3nAZqHnQEwQgfCeB4ZUmPZklyJnDamTu1F83CdctPYB5ikhkmAqd WWcA== 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:cc:subject :from:to:references:in-reply-to:content-transfer-encoding :mime-version:dkim-signature; bh=1zDZfVk23N+OFD0FCHDiCfWm56x8u6/12U9wViGp/yA=; b=uzs4L9PhH55RxUZ5a6zlRxMRxmrH6uH02EJtCvTyBdpuGknoxBoqO/tHQlw6g6lL7B e7rewIqtF+73Wfo9NZ16jqfQrGZfiFDxlT4E+64GqHJR5U32ImOF0vGIGzOnEaX/aj+q 1TeNFXOHzZCQPhl+jmzanRO1GEXCiNDZ9jKccHvNwlzIefYN4yEelZGExG+vBM5ijiM1 pOxRrCKVvgarw0SAotl15sx0JWEmssLoS6sVHcQ76jehgiY/q69KjnPWPyXSLa8QECrY 6jhf4hv+lNpuSaKaO58JKN7+8+i7mhR4vb30AQFrTH+9JLUb0TM4v5Z5wABBsQWnRrId 3Nbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mNi8Eavt; 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 m185si10394296pgm.421.2019.06.25.16.28.42; Tue, 25 Jun 2019 16:28: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; dkim=pass header.i=@kernel.org header.s=default header.b=mNi8Eavt; 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 S1726383AbfFYX2W (ORCPT + 99 others); Tue, 25 Jun 2019 19:28:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:58032 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725782AbfFYX2W (ORCPT ); Tue, 25 Jun 2019 19:28:22 -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 D1D4A20645; Tue, 25 Jun 2019 23:28:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561505300; bh=6+te7mpJt5x4SRywvdcyKAoVs6nKqWEZS+6deQkXGH8=; h=In-Reply-To:References:To:From:Subject:Cc:Date:From; b=mNi8EavtpgSP7114DE4Fp5biFG5wHsOt3mCwaHqAvPfToIR33ip/aGcRxUCsKxc0s EXhLCkwtAoStCqe+GzLtuLgPgtQZ1pupbmDvgjVncKJH5h41SuyDXxIch7EZ52g+6a B0t6ZoE7uS0Gi+Lpb5A0gDs/i/stm1Y4Kn4Lr/kU= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <1561502227.10069.1@crapouillou.net> References: <20190624225759.18299-1-paul@crapouillou.net> <20190624225759.18299-6-paul@crapouillou.net> <20190625220931.2F69B2086D@mail.kernel.org> <1561502227.10069.1@crapouillou.net> To: Paul Cercueil From: Stephen Boyd Subject: Re: [PATCH v13 05/13] clk: ingenic: Add driver for the TCU clocks Cc: Daniel Lezcano , James Hogan , Jason Cooper , Jonathan Corbet , Lee Jones , Marc Zyngier , Michael Turquette , Paul Burton , Ralf Baechle , Thomas Gleixner , Mathieu Malaterre , od@zcrc.me, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-doc@vger.kernel.org, linux-clk@vger.kernel.org, Artur Rojek User-Agent: alot/0.8.1 Date: Tue, 25 Jun 2019 16:28:20 -0700 Message-Id: <20190625232820.D1D4A20645@mail.kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Paul Cercueil (2019-06-25 15:37:07) > >=20 > > Do you need to get the clk by name? Or can that clk be "known" to the > > TCU somehow so we can already have a direct clk pointer? >=20 > This clock is provided by a separate driver, so I have to obtain the > clock pointer from devicetree. Ok. > >> +} > >> + > >> +static int __maybe_unused tcu_pm_suspend(void) > >> +{ > >> + struct ingenic_tcu *tcu =3D ingenic_tcu; > >> + > >> + if (tcu->clk) > >> + clk_disable(tcu->clk); > >=20 > > Do you need to unprepare? Or it just isn't possible because this is > > called from syscore and thus we can't sleep? >=20 > I thought that clk_disable() was enough. We don't actually need to > unprepare, do we? And yes, as you pointed out, this call cannot sleep. Yeah unprepare isn't necessary, but it will be different on different platforms. This is a highly platform specific driver though so I suspect this is all fine.