Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3567581pxv; Mon, 26 Jul 2021 07:02:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxv7J9+t8/yzeey80qKKBHwyyBPJdyipqWjT4ZzSbk2EUyi1xuWYHjF+fXM+iTYN9i0xQ+z X-Received: by 2002:a92:509:: with SMTP id q9mr13020163ile.239.1627308152029; Mon, 26 Jul 2021 07:02:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627308152; cv=none; d=google.com; s=arc-20160816; b=OsJ7QdPvQ5XBa7CEaey1Sfo+laFA7Kia9vvmLquSUQTwUFlKPqCd3/TfSsuboLSQ/I SGpcZg2UuiK2D7X+ELQEldck1hYDQDTSS8Tcn7l3KKbDGuq8K3EZqVBe68Q/WiTXYpiI sa+M7MdS3wDiD03sSfZgO9CETXCSlT3AETnvwrhYohSfbjDqWlQlHh41Uh/J9F+1Tp7C x9lI8x/CbDuqQRmWh+R5OhHCRM6J5cW/W5tw/V0QbYXNX/Ml3TmJxWDNODQm97PKIi/l 0HSKpzlsVViHFp3d7/X+7/ww7hCChVdyOiqz7KlN3Tr3fKcjPv0zGY9CCwSCwDKQ837O Xgfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NuHz/YWacClslgKb232VJAShP0Ke4RBK+HwgJRwIaVk=; b=qiu0bkF+3v4Mva6fPLO2qpvHx/KrmekXK24IeNvxOIq3ywB9p1UH/KooLGXOPniux3 sW7SlPSzN6+bkHF9sicPUyzf5mcvE9GBfBChNT55Dg0RrTokt25BFBXoLGXsP2J14lno 4sFeHHyZCoN9Fmh8fwZz2gi9BExo9yF+kqP6Y8uMFaFA7LZTdZuF/476d49khYKX2lHu uEef93BBJZdsNkvrZ4ZuTzY7FOD3qPvGZU1sD7gVdYjYjO8UvcNULy9d4F7p33RtYaXa 85DoCqCQAdL5FQKDPbLLmxm7JTTl1aOZaCGXft2AuOGLXLq8kFiPYlpcuHzwCYUVxtgV Qwgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@maquefel.me header.s=mail header.b=KunjZqRe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l20si48532ion.36.2021.07.26.07.02.19; Mon, 26 Jul 2021 07:02:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@maquefel.me header.s=mail header.b=KunjZqRe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234214AbhGZNU4 (ORCPT + 99 others); Mon, 26 Jul 2021 09:20:56 -0400 Received: from forward103p.mail.yandex.net ([77.88.28.106]:59448 "EHLO forward103p.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233671AbhGZNUz (ORCPT ); Mon, 26 Jul 2021 09:20:55 -0400 X-Greylist: delayed 7749 seconds by postgrey-1.27 at vger.kernel.org; Mon, 26 Jul 2021 09:20:54 EDT Received: from myt5-1892386aa303.qloud-c.yandex.net (myt5-1892386aa303.qloud-c.yandex.net [IPv6:2a02:6b8:c12:4323:0:640:1892:386a]) by forward103p.mail.yandex.net (Yandex) with ESMTP id 11F9D18C2778; Mon, 26 Jul 2021 17:01:22 +0300 (MSK) Received: from myt3-07a4bd8655f2.qloud-c.yandex.net (myt3-07a4bd8655f2.qloud-c.yandex.net [2a02:6b8:c12:693:0:640:7a4:bd86]) by myt5-1892386aa303.qloud-c.yandex.net (mxback/Yandex) with ESMTP id 9yNTtrPB3e-1LI823aw; Mon, 26 Jul 2021 17:01:21 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1627308081; bh=NuHz/YWacClslgKb232VJAShP0Ke4RBK+HwgJRwIaVk=; h=In-Reply-To:References:Date:Subject:To:From:Message-Id:Cc; b=KunjZqRejlkS/p8khjjymZuyU63i6nncL5uX5v17UA3TMWqT+WyNpURBpYX+6roZW CqcoXVBeIT67D+n5C9h1x8d8A9yM8BAlLAUnn0PBBEZIjxi9HOeE7+IOJdVpjulsmr lgZtZuRKI0Zu/K+wvHAORUNsSiC+L43ZQCL9R1PA= Authentication-Results: myt5-1892386aa303.qloud-c.yandex.net; dkim=pass header.i=@maquefel.me Received: by myt3-07a4bd8655f2.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id olJ9yWy468-1K2iqfGp; Mon, 26 Jul 2021 17:01:20 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) From: Nikita Shubin To: Alexander Sverdlin , Geert Uytterhoeven Cc: Nikita Shubin , Jonathan Cameron , Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org (open list:IIO SUBSYSTEM AND DRIVERS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 1/8] iio: ep93xx: Prepare clock before using it Date: Mon, 26 Jul 2021 16:59:49 +0300 Message-Id: <20210726140001.24820-2-nikita.shubin@maquefel.me> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210726140001.24820-1-nikita.shubin@maquefel.me> References: <20210726115058.23729-1-nikita.shubin@maquefel.me> <20210726140001.24820-1-nikita.shubin@maquefel.me> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexander Sverdlin Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch to Common Clock Framework, otherwise the following is visible: WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:1011 clk_core_enable+0x9c/0xbc Enabling unprepared ep93xx-adc ... Hardware name: Cirrus Logic EDB9302 Evaluation Board unwind_backtrace) from [] (show_stack+0x10/0x18) ... clk_core_enable clk_core_enable_lock ep93xx_adc_probe ... ep93xx-adc ep93xx-adc: Cannot enable clock ep93xx-adc: probe of ep93xx-adc failed with error -108 Signed-off-by: Alexander Sverdlin Acked-by: Jonathan Cameron Signed-off-by: Nikita Shubin --- drivers/iio/adc/ep93xx_adc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iio/adc/ep93xx_adc.c b/drivers/iio/adc/ep93xx_adc.c index c08ab3c6dfaf..5c85257b814c 100644 --- a/drivers/iio/adc/ep93xx_adc.c +++ b/drivers/iio/adc/ep93xx_adc.c @@ -207,7 +207,7 @@ static int ep93xx_adc_probe(struct platform_device *pdev) */ } - ret = clk_enable(priv->clk); + ret = clk_prepare_enable(priv->clk); if (ret) { dev_err(&pdev->dev, "Cannot enable clock\n"); return ret; @@ -215,7 +215,7 @@ static int ep93xx_adc_probe(struct platform_device *pdev) ret = iio_device_register(iiodev); if (ret) - clk_disable(priv->clk); + clk_disable_unprepare(priv->clk); return ret; } @@ -226,7 +226,7 @@ static int ep93xx_adc_remove(struct platform_device *pdev) struct ep93xx_adc_priv *priv = iio_priv(iiodev); iio_device_unregister(iiodev); - clk_disable(priv->clk); + clk_disable_unprepare(priv->clk); return 0; } base-commit: 64376a981a0e2e57c46efa63197c2ebb7dab35df -- 2.26.2