From patchwork Fri Oct 24 10:37:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 5145571 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 366AF9F349 for ; Fri, 24 Oct 2014 10:39:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 71C752021B for ; Fri, 24 Oct 2014 10:39:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 962EF200D9 for ; Fri, 24 Oct 2014 10:39:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756341AbaJXKiv (ORCPT ); Fri, 24 Oct 2014 06:38:51 -0400 Received: from mail-pd0-f180.google.com ([209.85.192.180]:36660 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756274AbaJXKiR (ORCPT ); Fri, 24 Oct 2014 06:38:17 -0400 Received: by mail-pd0-f180.google.com with SMTP id fp1so1235685pdb.39 for ; Fri, 24 Oct 2014 03:38:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=j0Zj59OIDZLDBYcAhbnKXcCE7hmWXwH2x7cwLhJPhqE=; b=HVpCj5+7j1eidUQZaNrpecp7EsNghk4+a/mtB8/iglTkIKV1UWIYszfrrFkCeAb4zG g7VnXeL8gblu/H13YaxU4LkScqx2B9SavjeP+0TK5XerMvpHQowX8jOPJn9C9i4hrtsA flXyqNTOTosppWpVkc6bBlHtdfgzgo58PXIxVGjwf13mncCLY5XLGDExFTSyMvAz+QjU bxod8WY8r7K2Ds9G4+AU3BXwwkL0ANs5uwIP5+o94ewKBoiAE8HNGu7t3UNwNvu0xPiT T4h5Ev3qiakZXQcLCw9JEatjnsXeaiMwGVEZmvERjEqQnGk3bl89b2uBOOKk/vjBMZ1K hQBg== X-Received: by 10.70.38.201 with SMTP id i9mr3559007pdk.127.1414147097032; Fri, 24 Oct 2014 03:38:17 -0700 (PDT) Received: from fangorn.rup.mentorg.com (nat-min.mentorg.com. [139.181.32.34]) by mx.google.com with ESMTPSA id jc3sm3590019pbb.49.2014.10.24.03.38.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Oct 2014 03:38:16 -0700 (PDT) From: Dmitry Eremin-Solenikov To: linux-arm-kernel@lists.infradead.org, linux-pcmcia@lists.infradead.org, linux-fbdev@vger.kernel.org Cc: Russell King , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , Linus Walleij , Andrea Adami Subject: [PATCH 5/5] pcmcia: sa1111: provide device clock Date: Fri, 24 Oct 2014 14:37:27 +0400 Message-Id: <1414147047-12892-6-git-send-email-dbaryshkov@gmail.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1414147047-12892-1-git-send-email-dbaryshkov@gmail.com> References: <1414147047-12892-1-git-send-email-dbaryshkov@gmail.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Both pxa2xx (long ago) and sa1100 (now) make use of clock device to get the cpu speed. Make sa1111 glue code provide clock to platform layer. Signed-off-by: Dmitry Eremin-Solenikov --- drivers/pcmcia/sa1111_generic.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c index 65b02c3..c5988be 100644 --- a/drivers/pcmcia/sa1111_generic.c +++ b/drivers/pcmcia/sa1111_generic.c @@ -145,6 +145,9 @@ int sa1111_pcmcia_add(struct sa1111_dev *dev, struct pcmcia_low_level *ops, return -ENOMEM; s->soc.nr = ops->first + i; + s->soc.clk = clk_get(&dev->dev, NULL); + if (IS_ERR(s->soc.clk)) + return -ENODEV; soc_pcmcia_init_one(&s->soc, ops, &dev->dev); s->dev = dev; if (s->soc.nr) { @@ -220,6 +223,7 @@ static int pcmcia_remove(struct sa1111_dev *dev) for (; s; s = next) { next = s->next; soc_pcmcia_remove_one(&s->soc); + clk_put(s->soc.clk); kfree(s); }