From patchwork Thu Nov 22 22:01:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10694923 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 785715A4 for ; Thu, 22 Nov 2018 22:01:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 694182C379 for ; Thu, 22 Nov 2018 22:01:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 675C02C41F; Thu, 22 Nov 2018 22:01:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DE6292C3E6 for ; Thu, 22 Nov 2018 22:01:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cXLoi9C1eleuhd5Pk/AI3N9FdNLa42gG3WIlPWc+dpY=; b=FDFUi8sImaDtAw pfnYCze1r+hTr6e7FIPn8HmPDV1o0p/MSy/Aak/sZkaFbBH5O7T2LYlTlOr4lmxKi5luFDq6ueyhL hpRBdGddc60Zoa4vZ71ofAl/jU0A63uKUeDk8k+0XPjtASs4X9v70m9NIPAHu8ffqq8PPMIpVOPHF mPGd1U9yj37uwkO9rnwd1PHnO6QrDwEwKvFC5KduKUv00x6+2jESk/DvTnJD9wuXzWthMy1lZhqk3 MgQl6etKMWPEHne610ObFPYSTzsMoq+avF5/KfaYlXlG4XtV+HUGT/qIy3QRLM6HHb6e8/h79gzWu WC4B9cN2dKwt262hdeHA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gPx2i-00066l-LJ; Thu, 22 Nov 2018 22:01:48 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gPx2W-0005sA-FS; Thu, 22 Nov 2018 22:01:37 +0000 Received: by mail-wr1-x442.google.com with SMTP id t27so2582827wra.6; Thu, 22 Nov 2018 14:01:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OekskNfYJb3GaDnKXG3tXL9mAK30t1c99Vq8PTGsDH8=; b=Ms1C6bQUY05rNAEWQ2uECwGOA0s6uxjw6zL6k/FL+3GJ6Q+5Tij4s8Gx0yb0+1o4Sr kOUovS5lmymnfAb+wbExRwacODfgKmB+LoHSg7O4eSZBWSpc7S51kXg+0coVpUKDEIdK i3QsJKkUIn1J5hg2pfzOBcqUFr3g2HhdRPokqV5kkJTnJnKmeCtYvUdoZwKIobk7tBd6 Jq2ax9p28wHpd2b6gRLNQZfmtQ+1kNQ/B35LKCC0JARomaGSvoYRk00RlnfYOitQtrdD dKEHmnIBMzW8EKDWeWe1QqJFTm5OkFOx79aY/K5Uo/4FxdpcqHujErB0RWfPMoBBo7gf rRgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OekskNfYJb3GaDnKXG3tXL9mAK30t1c99Vq8PTGsDH8=; b=gISTC3yV8imTMudC393RXGlFY2eaDaSzTQLLV/NOhkjQu19MsXeijdZsC8WsZnrZrV X4ILhon26WyfPEgITWlxhZB/pY/5X6n+fIlxXKQqvDh3QXeIeKxFza7pt0avQ4fVyT+P ZxvGVOsigwr/O/ZfYuLIqVsC5vvivswVsVhih0MfdO1XWetXJml1F7IhA/cEZi+kQVso PkWGXxA8WmNQVJ9F549jeumnwNuk4l/QVESnA39O4XPDKhm0PxqMJNIpVj45CfSGzZFw ir+W7fGVloTENvxmh+0N2SEUXQKzk+KUUyXb+8PBdYa/F+GprxPKvrYbsBVdB+A5O3bQ sSWA== X-Gm-Message-State: AA+aEWYlSN2RbJ9VoLUWRVOUmpD0hzZ59mNJkzBum/etjYrue5600jpj BFKgMTfd7wTnlxAE5d9gGKDddZ6B X-Google-Smtp-Source: AFSGD/XOfTfVXa5z9lb0FomQp9HXealdGupvfgAx2f4wmKb7hyi51eW/KsJJOCpmncpdV87OvoWXsA== X-Received: by 2002:adf:f38f:: with SMTP id m15mr11278013wro.111.1542924084592; Thu, 22 Nov 2018 14:01:24 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD732F5007DE18DA1F72FF8D9.dip0.t-ipconnect.de. [2003:dc:d732:f500:7de1:8da1:f72f:f8d9]) by smtp.googlemail.com with ESMTPSA id y81-v6sm3327823wmd.11.2018.11.22.14.01.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Nov 2018 14:01:24 -0800 (PST) From: Martin Blumenstingl To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, linux-amlogic@lists.infradead.org Subject: [PATCH 1/1] iio: adc: meson-saradc: fix internal clock names Date: Thu, 22 Nov 2018 23:01:11 +0100 Message-Id: <20181122220111.28808-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181122220111.28808-1-martin.blumenstingl@googlemail.com> References: <20181122220111.28808-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181122_140136_511460_3B7ED7A6 X-CRM114-Status: GOOD ( 13.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Before this patch we are registering the internal clocks (for example on Meson8b, where the SAR ADC IP block implements the divider and gate clocks) with the following names: - /soc/cbus@c1100000/adc@8680#adc_div - /soc/cbus@c1100000/adc@8680#adc_en This is bad because the common clock framework uses the clock to create a directory in /clk. With such name, the directory creation (silently) fails and the debugfs entry ends up being created at the debugfs root. With this change, the new clock names are: - c1108680.adc#adc_div - c1108680.adc#adc_en This matches the clock naming scheme used in the PWM, Ethernet and MMC drivers. It also fixes the problem with debugfs. The idea is shamelessly taken from commit b96e9eb62841c5 ("pwm: meson: Fix mux clock names"). Fixes: 3921db46a8c5bc ("iio: Convert to using %pOF instead of full_name") Signed-off-by: Martin Blumenstingl --- drivers/iio/adc/meson_saradc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c index 6155d26091eb..729becb2d3d9 100644 --- a/drivers/iio/adc/meson_saradc.c +++ b/drivers/iio/adc/meson_saradc.c @@ -656,8 +656,8 @@ static int meson_sar_adc_clk_init(struct iio_dev *indio_dev, struct clk_init_data init; const char *clk_parents[1]; - init.name = devm_kasprintf(&indio_dev->dev, GFP_KERNEL, "%pOF#adc_div", - indio_dev->dev.of_node); + init.name = devm_kasprintf(&indio_dev->dev, GFP_KERNEL, "%s#adc_div", + dev_name(indio_dev->dev.parent)); if (!init.name) return -ENOMEM; @@ -678,8 +678,8 @@ static int meson_sar_adc_clk_init(struct iio_dev *indio_dev, if (WARN_ON(IS_ERR(priv->adc_div_clk))) return PTR_ERR(priv->adc_div_clk); - init.name = devm_kasprintf(&indio_dev->dev, GFP_KERNEL, "%pOF#adc_en", - indio_dev->dev.of_node); + init.name = devm_kasprintf(&indio_dev->dev, GFP_KERNEL, "%s#adc_en", + dev_name(indio_dev->dev.parent)); if (!init.name) return -ENOMEM;