From patchwork Mon Jun 11 15:24:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 164217 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-lpp01m010-f56.google.com (mail-lpp01m010-f56.google.com [209.85.215.56]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 0DD2BB704D for ; Tue, 12 Jun 2012 01:25:27 +1000 (EST) Received: by lagp5 with SMTP id p5sf2176848lag.11 for ; Mon, 11 Jun 2012 08:25:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=mime-version:x-beenthere:received-spf:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; bh=WmXqXy722UU1Frbn33xchw0vVLKLso6mhNFVGWYpwm0=; b=pK99HKKzoHoAP5Sohck8MW5uxB8eaK/bh0OkkMRWykgInivcFxOpgEi5MWVcz2z5Kn Lltt0OFjLWO1C5E1lZao5tInb8m6NucfgYMtAeXNT85yqQp4H4aKy63gT/rzC1nZDkzY w45OKeJjbAIlH/3POak2HHcroum/bxrcFktqY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:received-spf:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references:x-gm-message-state :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-google-group-id:list-post :list-help:list-archive:sender:list-subscribe:list-unsubscribe :content-type; bh=WmXqXy722UU1Frbn33xchw0vVLKLso6mhNFVGWYpwm0=; b=peyl7y7lWTuJ04goIql9UD8wTMyxSl/t4Z6BZFei0vOVWWPXG7Ktd8qsoiFWySsuBh jTpZwdWhiNUtJVDwGLSu8KxJ8LWB4JyAAFlbQXddlglLrakwsieQeLYg4wdJfVF63Xmr uRie+OquDj0HUsxUH1b0BgF6c3lX/NBSVwZf3F64/6tZdaEcKwRLM+Ye+U1/zgWiyjGd +VfSavbKpKzWBOoPpI9apSicuQISq1/VxlzwC7al6H0HHPXaZpfw3f7CsF4E+MbCGcnu kcZYCAO5iJRv05EE5/Q56C8mS2HSeZXohVhdelKYleM5gF6UlhdmDomcsTC3cC/qY1wR 6bZw== Received: by 10.216.141.200 with SMTP id g50mr399288wej.16.1339428323141; Mon, 11 Jun 2012 08:25:23 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.216.51.197 with SMTP id b47ls3439526wec.9.gmail; Mon, 11 Jun 2012 08:25:22 -0700 (PDT) Received: by 10.180.104.41 with SMTP id gb9mr483497wib.4.1339428322565; Mon, 11 Jun 2012 08:25:22 -0700 (PDT) Received: by 10.180.104.41 with SMTP id gb9mr483496wib.4.1339428322558; Mon, 11 Jun 2012 08:25:22 -0700 (PDT) Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com [74.125.82.48]) by gmr-mx.google.com with ESMTPS id er1si4290984wib.0.2012.06.11.08.25.22 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 11 Jun 2012 08:25:22 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.48 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.48; Received: by mail-wg0-f48.google.com with SMTP id dq11so2167629wgb.5 for ; Mon, 11 Jun 2012 08:25:22 -0700 (PDT) Received: by 10.180.83.197 with SMTP id s5mr21790466wiy.9.1339428322429; Mon, 11 Jun 2012 08:25:22 -0700 (PDT) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id ch9sm39413606wib.8.2012.06.11.08.25.20 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 11 Jun 2012 08:25:21 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: linus.walleij@stericsson.com, arnd@arndb.de, grant.likely@secretlab.ca, Lee Jones , Alessandro Zummo , rtc-linux@googlegroups.com Subject: [rtc-linux] [PATCH 02/14] rtc: Ensure correct probing of the AB8500 RTC when Device Tree is enabled Date: Mon, 11 Jun 2012 16:24:55 +0100 Message-Id: <1339428307-3850-3-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1339428307-3850-1-git-send-email-lee.jones@linaro.org> References: <1339428307-3850-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQlSOHQEldk7gyu6cJTD+ba+hIrRQ3ZPT79WEfOymcQhTQfSAubNTN1MdQbT6N2o+B0joUJD X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 74.125.82.48 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , Without this patch, if Device Tree is enabled the AB8500 RTC wouldn't get probed at all, as there is no reference to it from platform code. This patch ensures the driver is probed during normal DT start-up. Cc: Alessandro Zummo Cc: rtc-linux@googlegroups.com Signed-off-by: Lee Jones Acked-by: Linus Walleij --- drivers/rtc/rtc-ab8500.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-ab8500.c b/drivers/rtc/rtc-ab8500.c index b11a2ec..116c23d 100644 --- a/drivers/rtc/rtc-ab8500.c +++ b/drivers/rtc/rtc-ab8500.c @@ -17,6 +17,7 @@ #include #include #include +#include #define AB8500_RTC_SOFF_STAT_REG 0x00 #define AB8500_RTC_CC_CONF_REG 0x01 @@ -430,7 +431,6 @@ static int __devinit ab8500_rtc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, rtc); - err = ab8500_sysfs_rtc_register(&pdev->dev); if (err) { dev_err(&pdev->dev, "sysfs RTC failed to register\n"); @@ -454,10 +454,16 @@ static int __devexit ab8500_rtc_remove(struct platform_device *pdev) return 0; } +static const struct of_device_id ab8500_rtc_match[] = { + { .compatible = "stericsson,ab8500-rtc", }, + {} +}; + static struct platform_driver ab8500_rtc_driver = { .driver = { .name = "ab8500-rtc", .owner = THIS_MODULE, + .of_match_table = ab8500_rtc_match, }, .probe = ab8500_rtc_probe, .remove = __devexit_p(ab8500_rtc_remove),