From patchwork Thu Nov 6 07:41:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 5239571 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 2652D9FD45 for ; Thu, 6 Nov 2014 07:41:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4FA1C2010C for ; Thu, 6 Nov 2014 07:41:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5EFFC200D6 for ; Thu, 6 Nov 2014 07:41:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751141AbaKFHlv (ORCPT ); Thu, 6 Nov 2014 02:41:51 -0500 Received: from mail-wg0-f51.google.com ([74.125.82.51]:48096 "EHLO mail-wg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751054AbaKFHlu (ORCPT ); Thu, 6 Nov 2014 02:41:50 -0500 Received: by mail-wg0-f51.google.com with SMTP id l18so477547wgh.38 for ; Wed, 05 Nov 2014 23:41:49 -0800 (PST) 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=dtYlXb7wdWNxsjc0LCkvpVyjApjwng8neQfQMkqfbLXOba1MDgZVktH72wQitKhVvA Q6aGpIlnnzrkbu0cGl6CKoKdQR39BYOuCkfKIojn9e6RoWdU6vtplpeqE7/LxR+f+QBc N6tzl3NIad2y4v3+kWpXS6SIK/HbcOxRJBsmKSR+GxA8JFHS8dvRuqKoLkf13mHvH5yP yWzx/sgd2aNl51ruL9+8Ec/AqqHivh8PR7/P0rbjEV/5Yje1w5zScD7p42iAeiqUeOVL nRw/x0JW1RZ4yD8L9Top2bPKaL+wjacHnyiRegxkcHzgCGpDy+s4Wpn5uh2q072hkYtL 9weA== X-Received: by 10.194.243.134 with SMTP id wy6mr3041662wjc.48.1415259709410; Wed, 05 Nov 2014 23:41:49 -0800 (PST) Received: from fangorn.rup.mentorg.com (nat-min.mentorg.com. [139.181.32.34]) by mx.google.com with ESMTPSA id gy4sm7236302wib.11.2014.11.05.23.41.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Nov 2014 23:41:48 -0800 (PST) From: Dmitry Eremin-Solenikov To: Russell King Cc: linux-pcmcia@lists.infradead.org, linux-fbdev@vger.kernel.org, Andrea Adami , Linus Walleij Subject: [PATCH RESEND 5/5] pcmcia: sa1111: provide device clock Date: Thu, 6 Nov 2014 10:41:17 +0300 Message-Id: <1415259677-18770-6-git-send-email-dbaryshkov@gmail.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1415259677-18770-1-git-send-email-dbaryshkov@gmail.com> References: <1415259677-18770-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=-4.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, SUSPICIOUS_RECIPS, 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); }