Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3625699imu; Mon, 28 Jan 2019 08:03:43 -0800 (PST) X-Google-Smtp-Source: ALg8bN7+jyA9m2aKjaBwkC31occORLSa7qv4BHbLww4dmdd2/JFbKDKCzNgXIV1PZLRLJPdPEBOO X-Received: by 2002:aa7:824f:: with SMTP id e15mr21929637pfn.192.1548691423088; Mon, 28 Jan 2019 08:03:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548691423; cv=none; d=google.com; s=arc-20160816; b=Io67CEOEBvChpjZSTFsBnjFBsOiIixfXC+oBamIhfcf6VPpOjrDTxAdwFYwz+yX2WW a7s3C6+Cdf99WELVADxgr6l/tFeq6AjBcxvy5egBwhCPQEfkvzr63bsqo2IPSzrDmFs8 zceettUA+D44XKzuo6YbZm+cNKWWr9y6NsjHNUaoGbGCgWRpciK8xdStvs0cePhHTQuV 0vsFJvN+8dTBQb8QECr4MVg7g06ZB+DEOnrs+otkDf+SByGlzKQxR7Sf/Ugmx9D+I1Xg Q+vTYGj+hphBFOE20Jl40KslAb4IEQKvyaI9IuFrJVRWRBVawzR1DQMo7qtehPVXiTq2 Tb8g== 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:date:subject:cc:to:from :dkim-signature; bh=Hjd2wdzESHBaTtpl+B38fx9ag5wu4tywdbZXDUc635k=; b=mtUZwamngUaXmJoCc4QPcecJmv4fTuhBsIoaDZB4uL8vs74zmf6cqZv4bLOlRlqPkn fogoKLc60l1sGMELn4YDM7eo8V3zgM9uwgIcibZAJQ2ZlNzAtUBlHVUww1gYYnN/6Lmq aFqF0sv89UKv+s7F7WVT1MfX4GS2Rkr6A/Y47Ql5WTNuWtYNCcumoGK74eopU17vkM6Y ilbw76vmNSFRapTUgoQhMF9TuvJ6CZbIQPNBzD//ILqFCkr6OM8eUJ9As/zwsVh8A7Or NO+xq44M/RCigoDKlqVyhOnD/E3f/iN/SQXPAE7S7O+5BJ+NCQGtytrmrAW5bt3fS6hz GFag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nWsJRCew; 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 g19si16401370pgj.358.2019.01.28.08.03.27; Mon, 28 Jan 2019 08:03:43 -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=nWsJRCew; 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 S1731271AbfA1QCo (ORCPT + 99 others); Mon, 28 Jan 2019 11:02:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:48000 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731260AbfA1QCk (ORCPT ); Mon, 28 Jan 2019 11:02:40 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 543B621852; Mon, 28 Jan 2019 16:02:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691360; bh=1SU7FDjCTgi/NU6y4Ir9NbYfENcBQ6hC0LaIvq3qu7A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nWsJRCewwXWH9M5g2treyfNGCK3gx0dcXsNWx3FoJyr7sFsWxZ9qlmFLDzaPFsEXA Nzunt+qkfMcVdj+oq9xVtUwYfMA+R2AQOeQgj9S+JrIzrMlMoZNQ1D3A71pf+JtG3y HuI8e7up6GQ5iIsXE6ns/2fsxbtMwm7gLpZIyiTs= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Martin Blumenstingl , Jonathan Cameron , Sasha Levin , linux-iio@vger.kernel.org, linux-amlogic@lists.infradead.org Subject: [PATCH AUTOSEL 4.19 067/258] iio: adc: meson-saradc: fix internal clock names Date: Mon, 28 Jan 2019 10:56:13 -0500 Message-Id: <20190128155924.51521-67-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Martin Blumenstingl [ Upstream commit 50314f98b0ac468218e7c9af8c99f215a35436df ] 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 Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin --- 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 da4c391b8977..5dd104cf0939 100644 --- a/drivers/iio/adc/meson_saradc.c +++ b/drivers/iio/adc/meson_saradc.c @@ -587,8 +587,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; @@ -609,8 +609,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; -- 2.19.1