From patchwork Wed May 17 17:13: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: 9731699 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 B49A460230 for ; Wed, 17 May 2017 17:14:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6E74287C2 for ; Wed, 17 May 2017 17:14:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB548287D2; Wed, 17 May 2017 17:14:59 +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 4A1AD287C2 for ; Wed, 17 May 2017 17:14:59 +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=cE0lTgts+EszlRYx4CvpeVR26X H8VIpEvXyJS5PJG0tdgafWDblTkLz+JVRTFJGC2bB5hBUriyCjqQlJFt/kBqQMiuI5Tc7B+LnCCvn 2WiLrIlQca/tBMMY5arXsXAGeGN9umL/UI9MtO2Aj+Bv6XqzRGP/un8yA0LHYNo6ijew1XSgHzfDR j1LF4JNLdPQJEWaz8Q9BKUWle6MVEUXls2VkoReZGCY8+u2nfbVN+BubZqPmMNJxJL9hOy/iUeAqj aP0NqLXJoC94AudIGLY+OTPqTo4DXiRc9f8Dd/l/u/vvAz9oXuSuKTQqcc4vbX+p5w0Tu/AyLtFDS 0GjRzVdw==; 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 1dB2XJ-00044J-1R; Wed, 17 May 2017 17:14:57 +0000 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dB2Wt-0003VT-SP for linux-arm-kernel@lists.infradead.org; Wed, 17 May 2017 17:14:34 +0000 Received: by mail-wr0-x243.google.com with SMTP id v42so2835166wrc.3 for ; Wed, 17 May 2017 10:14:11 -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=bZfKrtnXeMMy3iifvpck54W8jY8pe77XgcUDyrLIZjkzfI5c00n93FJXjqyD6i24ZM q3TPdPWX00JSZqcVNC+RZwa3VDW1io8U0Kv96+ppQUSw4bkekM3vZdltp4rdH1KDCOqZ cVT0nveutoEnocxSrKDTrLkwgDRMWeT3Q4U9YEujkYruD1Vlrp8glPVhZf62g/DiHaTg 0CtbKi5xYxcpt94DVBUbFuJRH/MlZHvEmfDFulmlhgqc8l7hqRX5RpRMlNNEyT0SCyY9 RMmHeXN8wKMuHve/f8lisMBZYU3VWuWIljwYAjtQ6SzklvhizQJeQ4mp3tdpzFvd/F+/ b0Qg== 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=KhoVSfq6pxpVh6v9WA0BpdzvIx2m6ZhH5tt911ojaOi2ShyNYg1MrKP+aezQABgJcZ OxU81oo5tIZnMr9acavZ6ETjuKpKBPUFbh75lZgtjvDNWDGVm3HdB1dZJvFVfPZ+R4Gv 0XrZe258/gEyPpzf1KB7T1V1iMTJRa6CtSfQF8yzqGjUlldi8/SUfA5AG+6kad3nSBVL 4goDYsaoXJfBisOjoGODMW8BO1VTFmv/71grozrQikN31cBqPp1wji5a/wBXkwSMmy4+ ppPw2SnmD8nP8EFgXEUxa+kFDrLIH9h68P3//6A7gn22+4PTo3d/CA8aXTgom2cSBrs2 AUcQ== X-Gm-Message-State: AODbwcC7nAUanpAmBUpamFPtwUYPuKUCmXp7Xcfve5HHGebW5/CgkaOS Cybxm+6MNUw6wA== X-Received: by 10.46.8.26 with SMTP id 26mr484550lji.59.1495041250068; Wed, 17 May 2017 10:14:10 -0700 (PDT) Received: from giga1.localdomain ([195.245.52.203]) by smtp.gmail.com with ESMTPSA id a17sm487498lfg.51.2017.05.17.10.14.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 May 2017 10:14:09 -0700 (PDT) From: Alexander Sverdlin To: linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Hartley Sweeten , Ryan Mallon Subject: [PATCH v4 2/5] clk: ep93xx: Add ADC clock Date: Wed, 17 May 2017 19:13:49 +0200 Message-Id: <20170517171352.20369-3-alexander.sverdlin@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170517171352.20369-1-alexander.sverdlin@gmail.com> References: <20170517171352.20369-1-alexander.sverdlin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170517_101432_151222_F15BDD43 X-CRM114-Status: GOOD ( 10.02 ) 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),