From patchwork Sun May 14 09:29:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 9725617 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4D83F602C9 for ; Sun, 14 May 2017 09:39:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2480D2891C for ; Sun, 14 May 2017 09:39:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 152A028920; Sun, 14 May 2017 09:39:37 +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=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 A78F52891C for ; Sun, 14 May 2017 09:39:36 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=+URAktMM+qujstKt3DB5xOBYXfLlNH+u6VrLOWAdteM=; b=ZcjD+W8BdY2VJjydun3nYyVyzs dGocY1Ee6gKcDnHJEAk+ywSB8JWvGh4+wkmocBewpXtBHaKFcBDIIOVUL52udGdpoxA+D3kNawnsT C8fkbAIqzu7AJnM+qAdJd896KFinA7EWTxcVxKD7MBqcqE/ZEyXhjDLRlSOEWF/JGtBbYJPWIBw0D Eemu+ib54hod7Oy2YqHzd80n0o+szYg6HxBTomxFDbnCFolvvb4Z0SBb1YhiZLGTVemi9Z72bvMIE a0DwdjcpGJ8O3Q7lx93ES2cDhfuzi5/hgMfScD7HFPU6LbSjNjqymKKO04Jq4E9rwRQ+S9QjjeiiR UEBli9KQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d9pzz-0005Cz-Ny; Sun, 14 May 2017 09:39:35 +0000 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d9ptF-0001K1-Ky for linux-arm-kernel@lists.infradead.org; Sun, 14 May 2017 09:32:40 +0000 Received: by mail-wr0-x242.google.com with SMTP id g12so11341878wrg.2 for ; Sun, 14 May 2017 02:32:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sB6nAsET4TcLYj/H7fkSHIoKmvJtIxYHgPzhZNeSOtw=; b=qB7k5Qah+VF9G+lVJaen1yNNbPUAQcGlVpyeNQLJvUgyNQw9Tc0DUyJniqZ04RrwQq 5PkGIYQJF9eyTPoazqPouR+MtlmONSdbubn/pJmWm3DV6CnSRwhFIIuW3A5etrBxaoHV XYfzGTZb1ywMdIKfPFCe7LbgT9cR1P6wMlJdcR0tAZ6vL2Yq54b73H6BICIKrQI5Ht+d E/ssWtRdjm/kcuL/VrxdbpLFtTW7UnGG/fv0Q+eKOpdtIkhefGESfSqMw+rmmdH/P89W wJAkOzuuhu2pmbkDXffa7oKYnMrVum3A3QMbWCi97IVNXn4I6NHFo8t4UpRiMXg2wJ4n P3ew== 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; bh=sB6nAsET4TcLYj/H7fkSHIoKmvJtIxYHgPzhZNeSOtw=; b=LJBz8i4L9ZQ6VT/aqfO8ZrfCOkyOU4VlfhdAJVVWZIRsS+SYTh1MfekfsFHqKp5OAn Cxt1jcTsfWsJ2b84/X96w2UHHIJI2SOjmJG/0PnbfTkKJNntIYzwbm7W+8HXn6PdHPZq QdmN0MuYwSazYqpfkYQEja6pnX4DbkRby80xmsyC/d1LpE/MrJ6++qqr1EBlflOJ5iOW mzOSeKsQXdXckYKMf8mhqsXBA38K9krTU7zM7ZX6bo6pMfVeIZPmpB6g9dJn/iL16KCQ uI7XsagKinCRCaSMULZVwLJP+72DajL5TjMRxXoXjusU1sEaNs8k1GnC1LuXn1gD2xNw 3Q1g== X-Gm-Message-State: AODbwcDPaQPfipnvVrWY4nR7UyZlTqbed92fB2x8773Eto9Ac1c8ru5w n1bIet9hQme1/Q== X-Received: by 10.46.6.1 with SMTP id 1mr236958ljg.69.1494754335850; Sun, 14 May 2017 02:32:15 -0700 (PDT) Received: from giga1.localdomain ([195.245.52.203]) by smtp.gmail.com with ESMTPSA id s126sm1587516lja.43.2017.05.14.02.32.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 May 2017 02:32:15 -0700 (PDT) From: Alexander Sverdlin To: linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Hartley Sweeten , Ryan Mallon Subject: [PATCH v3 2/5] clk: ep93xx: Add ADC clock Date: Sun, 14 May 2017 11:29:51 +0200 Message-Id: <20170514092954.12790-3-alexander.sverdlin@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170514092954.12790-1-alexander.sverdlin@gmail.com> References: <20170514092954.12790-1-alexander.sverdlin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170514_023238_514019_B4605656 X-CRM114-Status: GOOD ( 10.05 ) 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: Lars-Peter Clausen , Alexander Sverdlin , Peter Meerwald-Stadler , Hartmut Knaack , Alexander Sverdlin , Jonathan Cameron MIME-Version: 1.0 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 From: Alexander Sverdlin ADC and keypad controller clocks share the same control register, so use the existing infrastructure to add ADC clock support for Cirrus Logic EP93xx SoCs. Signed-off-by: Alexander Sverdlin --- arch/arm/mach-ep93xx/clock.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c index b9cd9d7da14d..425342637e47 100644 --- a/arch/arm/mach-ep93xx/clock.c +++ b/arch/arm/mach-ep93xx/clock.c @@ -98,6 +98,13 @@ static struct clk clk_keypad = { .enable_mask = EP93XX_SYSCON_KEYTCHCLKDIV_KEN, .set_rate = set_keytchclk_rate, }; +static struct clk clk_adc = { + .parent = &clk_xtali, + .sw_locked = 1, + .enable_reg = EP93XX_SYSCON_KEYTCHCLKDIV, + .enable_mask = EP93XX_SYSCON_KEYTCHCLKDIV_TSEN, + .set_rate = set_keytchclk_rate, +}; static struct clk clk_spi = { .parent = &clk_xtali, .rate = EP93XX_EXT_CLK_RATE, @@ -214,6 +221,7 @@ static struct clk_lookup clocks[] = { INIT_CK(NULL, "pll2", &clk_pll2), INIT_CK("ohci-platform", NULL, &clk_usb_host), INIT_CK("ep93xx-keypad", NULL, &clk_keypad), + INIT_CK("ep93xx-adc", NULL, &clk_adc), INIT_CK("ep93xx-fb", NULL, &clk_video), INIT_CK("ep93xx-spi.0", NULL, &clk_spi), INIT_CK("ep93xx-i2s", "mclk", &clk_i2s_mclk),