Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1073719imu; Wed, 16 Jan 2019 12:16:26 -0800 (PST) X-Google-Smtp-Source: ALg8bN6Cf8nf5ThK/Kno2oTr41BdBT/XHmfxM04d99C4xa//br8iXRZhAnWbzKJ+ZEfngg67ZUGR X-Received: by 2002:a17:902:7005:: with SMTP id y5mr11695155plk.7.1547669786503; Wed, 16 Jan 2019 12:16:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547669786; cv=none; d=google.com; s=arc-20160816; b=gnccf3zwapXtCIpgq3SwwbKvYhV6ASWUsdi9XB6KiHneTAiuHq4aDxRuG3gInsNCvS /ysRrI/bueI9Jkjb5XBQvKkuU+dpF8y2BnlFm8Wydj64shwmtqsta/pf4dBRMp9Uzynx LZky+BcNkDG60OvUONSPKUApDAT19D2FnS8EcxeqA/dVd54o+juK5BA7F0a0H1c8CJaB FeLwzkIrIgPeYZWhhGG5JXEuWXsdT2McPjtHr/90leKugw739g5apR7L21NqWLNIVJIG rWPqHksW99TDEEXmaX92Zh4Fd6sy0BTLe4O1amvPVPB7SyPT0DK5dBHyzTzFrzUZhcg1 6sCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=BvT8UEGTNgUOWn4aDzojgNkCEy0NRz+atz8DCKuaLjQ=; b=XZuvbGA9hcUWBgk90L8VMYJwtESuEyDX2yhg0RjKn9Xizg6mgAdJoUSSzrdiASHEoX 2tF8GIt9jHwrJqM+o83uMls44XP0bL63nrgX10lDAxycGZ8VJDPa1vQoiqZlqUe/m7ew HpFx87BO3i9/CrmIddKRNpQqGbXq4SRbhQZORHsiSkF6bVCWFVzTAUyICX0pIUczR6gf ZBw+bdAmgSb2UUr1wRoya78YUW/jiYBTcdJPyTvzvVQMw+aXmzs8FlPScTkzZ1fUd6vK hLz0qe0N7Ws6qvMUOi+xqEPaMiANE7MHxQPX40acRpySP7qpIl2bCNwp0CwDX0owjdZm ufEg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d17si6714857pgl.484.2019.01.16.12.16.11; Wed, 16 Jan 2019 12:16:26 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389945AbfAPMOb (ORCPT + 99 others); Wed, 16 Jan 2019 07:14:31 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:35640 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730413AbfAPMOb (ORCPT ); Wed, 16 Jan 2019 07:14:31 -0500 Received: by mail-qt1-f196.google.com with SMTP id v11so6887821qtc.2; Wed, 16 Jan 2019 04:14:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BvT8UEGTNgUOWn4aDzojgNkCEy0NRz+atz8DCKuaLjQ=; b=H1X/bdVMTIUXAoqj2b7Hs9Fbg5lzWg0wF+0aVVqPWeaCdjz97F/YVoYY6vmZGp4lTD Osj+5XxTvaNQcAP8EuPrjhCDLJfjhimvtkLlA7SeEfbIpBQl71RFfsODS92v019eHZlU RLZRL3a0D7eIQyUh4r02i1+Myb9jo8jlmGtbz5/jM60p7Kw9P/p9DahNGY/Epedthmup 04mcrdAyw35YI406lddZA6GEa0pXQVu+XepuISH7fEvTvlprKz5MR+JCpNgYHHr2N5Tg e8eIFvWjO4moY/kA0Cj9dc8HF7hIsTnpRz0hrf1t7XOLtDcUOrwHxT3FAMQGzStlUayd 3J4Q== X-Gm-Message-State: AJcUukf4YSZmFsp564vd2Pnyh+5TTE/N2iUoVGyOAtDce6gTtDJ7VDf0 UgNeB/7E56whaOPoTZbHpBytEFjnn0CdKJC4hcQ= X-Received: by 2002:ac8:4141:: with SMTP id e1mr6496899qtm.96.1547640870312; Wed, 16 Jan 2019 04:14:30 -0800 (PST) MIME-Version: 1.0 References: <1544604495-4082-1-git-send-email-fabrice.gasnier@st.com> <1544604495-4082-3-git-send-email-fabrice.gasnier@st.com> In-Reply-To: <1544604495-4082-3-git-send-email-fabrice.gasnier@st.com> From: Arnd Bergmann Date: Wed, 16 Jan 2019 13:14:13 +0100 Message-ID: Subject: Re: [PATCH v2 2/3] mfd: syscon: Add optional clock support To: Fabrice Gasnier Cc: Lee Jones , Rob Herring , Alexandre Torgue , Maxime Coquelin , Mark Rutland , Gabriel Fernandez , DTML , Linux Kernel Mailing List , linux-stm32@st-md-mailman.stormreply.com, Linux ARM Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (sorry for the late reply, I just realized that I had never sent out the mail after Lee asked me for a review last year and I had drafted my reply). On Wed, Dec 12, 2018 at 9:48 AM Fabrice Gasnier wrote: > > Some system control registers need to be clocked, so the registers can > be accessed. Add an optional clock and attach it to regmap. > > Signed-off-by: Fabrice Gasnier This looks ok to me in principle, but I have one question: When we do a clk_get() and clk_prepare() as part of regmap_mmio_attach_clk(), does that change the behavior of syscon nodes that are otherwise unused? I think we have a bunch of devices that started out as a syscon but then we added a proper driver for them, which would handle the clocks explicitly. Is it guaranteed that this will keep working (including shutting down the clocks when they are unused) if we have two drivers that call clk_get() on the same device node? Arnd