From patchwork Sat Jun 3 23:26:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 9764583 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 7AD6460363 for ; Sat, 3 Jun 2017 23:36:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 640BF262F2 for ; Sat, 3 Jun 2017 23:36:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 57A2F2844B; Sat, 3 Jun 2017 23:36:50 +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 DD7F1262F2 for ; Sat, 3 Jun 2017 23:36:49 +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=nYT7fWQzRbp8zDMG723EqS5wh1LTXcnaeVIl9weaejQ=; b=pZic/dUvP9Ph6rzSM9uAZ0rDUH 1RNMmBvJ3G3V44hAgUFjmzhzPYPQOT3QbOJ7LzEfYEwlEvcK11elm5OAukuJLtvDwPyWTwO97JAm2 GnvIYqSoTerQcJy9/mk76TT+cFCb6d7YnNE/M+0+Jk3MmTwhifMqGk3TdJmqd1Y7YwFZOS56r0uI6 672+dzHmXLa06R4lwymNqsJTTlbhzj3lt3SM05AEZaClGxh8W9WiPIVsITJjKtPPpym/qLUxxBpm6 NHPSdLc8bHJsSBawMNrapAK2C7Gu5Jpxn/SXUWzA2V4IXMPgjsqBh11DaghAzPTZCpZ2jJxXzTypV uMeb2M+g==; 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 1dHIb5-0005AG-E8; Sat, 03 Jun 2017 23:36:43 +0000 Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dHIST-0000c0-PZ for linux-arm-kernel@lists.infradead.org; Sat, 03 Jun 2017 23:27:54 +0000 Received: by mail-lf0-x243.google.com with SMTP id f14so7072527lfe.1 for ; Sat, 03 Jun 2017 16:27:33 -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=8c+xkIYDGLqzzhSJZcEFosYZyygT4ZEfW1YPkzcBStk=; b=PN48sbDuUtEynDeWuWWMsLHBL/6TT7g77LEa67vS9NY8M371SpmajvVonrWWqJJBpg vtCuGeaK31kA6ehrmv21ZGFxBTfSSCgDX2NeJIDjPHdt2umK1pW8EiA/QWcs15duV1+k 9wMqBt5y0M4fdSHFkGTK/88QelDeqpc//d8LFsppjXMR5HU3oNRD0/vwy1tNnPwWHHY0 jzQUM+Dehr7563BgACGjWAHRuSjXBrcX5oN3eu2MUegfYUlmEmljRe1hINr7IJtPwAmd Y4cruN5YVOTUOWR0zHRfcYwYuYPNcRkn/INVijGBhHiNTU2xEZ37KAVKM18uh8vUQpX1 Wsnw== 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=8c+xkIYDGLqzzhSJZcEFosYZyygT4ZEfW1YPkzcBStk=; b=jhTv85oh37m419jC0DMqPlcDW9zPnsvQUI1NxgtOu2nWD4iI5BUU+X1zQqTSlXPxRw lBorLOOTJDFiSvh1uXPLf3QPrY/8FrQS8ErhA7PzkGXDONe6pfS6FPk1R/O6vGS7ltlr n6CVF88fPaEbSlH10iM0sSqtzN3kQajSJEp9+QPJSR6whTdMLqWJu+K89XtD1yf5uK9S +78HN/oedxryWy0HQ6ubQMbEBIRiURWTvUlBhuYgkjnWyn+gEhYoG6Dyp+o8qyFa5uXx Cnjr5efgMRaAhUv13vZNiwxllhvgRmQKm6Y0AhnwCV4oERf4kmfLt5xnbbJr2MU+mdNB LNUQ== X-Gm-Message-State: AODbwcAZWM0C4zR55PaUo7ktYNkEgI5qDYHK08VacM0Qwe+veYjadmvc j19Bra6UYlErQg== X-Received: by 10.25.37.149 with SMTP id l143mr701593lfl.140.1496532452012; Sat, 03 Jun 2017 16:27:32 -0700 (PDT) Received: from giga1.localdomain ([195.245.52.203]) by smtp.gmail.com with ESMTPSA id 10sm1078869ljf.36.2017.06.03.16.27.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Jun 2017 16:27:31 -0700 (PDT) From: Alexander Sverdlin To: linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 2/5] clk: ep93xx: Add ADC clock Date: Sun, 4 Jun 2017 01:26:49 +0200 Message-Id: <20170603232652.21401-3-alexander.sverdlin@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170603232652.21401-1-alexander.sverdlin@gmail.com> References: <20170603232652.21401-1-alexander.sverdlin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170603_162750_271701_DC2CBFBB X-CRM114-Status: UNSURE ( 9.83 ) X-CRM114-Notice: Please train this message. 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 , Ryan Mallon , Hartley Sweeten , 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 Acked-by: Ryan Mallon --- 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),