From patchwork Tue May 21 21:40:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 245410 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-qc0-x23a.google.com (mail-qc0-x23a.google.com [IPv6:2607:f8b0:400d:c01::23a]) (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 3985D2C0091 for ; Wed, 22 May 2013 07:40:35 +1000 (EST) Received: by mail-qc0-f186.google.com with SMTP id d1sf374997qcz.13 for ; Tue, 21 May 2013 14:40:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=x-beenthere:x-mail-handler:x-originating-ip:x-report-abuse-to :x-mho-user:date:from:to:cc:subject:message-id:mime-version :user-agent: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:content-disposition; bh=k3BtF72ZjEDDO2WpYztFaKTyfIrHTXNrAyfy4goCHBM=; b=vpDh3vRlrk+u9qcE9txWQGQnSxcZxleac3nt9ewekeyPkBa7RfynIQLC20+kwzO8YV 9b5hEmd3NG6JidkYjNGsus/+sKnh9flDSh9eSdT1v7VbgQGldrlmCGRbLLwUaFcecL/i AK4kb/U/p/JiyxDNKx3Fy/oKYL7hpyszLu81Q+AR7+0CWwfnTGDWEwKVQONmCYHbpEIt ZUtXSxK9wdSl/x+lzwb0rU6p2W5zer0+bcmOsCDOvIOv49dRIixJIg37yqmOt1e/9pKm OnzxYVbVc6KdsK26A0quDHj2raklC1yA6tqu7D2jLYcN7Fqere9kpNoWHWt/SakPim5Z oYEg== X-Received: by 10.49.35.179 with SMTP id i19mr454252qej.3.1369172430628; Tue, 21 May 2013 14:40:30 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.49.83.36 with SMTP id n4ls528975qey.76.gmail; Tue, 21 May 2013 14:40:30 -0700 (PDT) X-Received: by 10.236.171.65 with SMTP id q41mr2222201yhl.53.1369172430250; Tue, 21 May 2013 14:40:30 -0700 (PDT) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org. [204.13.248.66]) by gmr-mx.google.com with ESMTPS id n23si392218yhi.7.2013.05.21.14.40.29 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 21 May 2013 14:40:29 -0700 (PDT) Received-SPF: neutral (google.com: 204.13.248.66 is neither permitted nor denied by best guess record for domain of tony@atomide.com) client-ip=204.13.248.66; Received: from c-50-131-214-131.hsd1.ca.comcast.net ([50.131.214.131] helo=localhost.localdomain) by mho-01-ewr.mailhop.org with esmtpa (Exim 4.72) (envelope-from ) id 1UeuIH-000I7k-B8; Tue, 21 May 2013 21:40:29 +0000 Received: from Mutt by mutt-smtp-wrapper.pl 1.2 (www.zdo.com/articles/mutt-smtp-wrapper.shtml) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 50.131.214.131 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18kBubdO+jdRcGylEsDiRKK Date: Tue, 21 May 2013 14:40:27 -0700 From: Tony Lindgren To: Alessandro Zummo Cc: rtc-linux@googlegroups.com, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Kevin Hilman Subject: [rtc-linux] [PATCH] rtc: rtc-twl: Fix missing device_init_wakeup() when booted with device tree Message-ID: <20130521214026.GV10378@atomide.com> MIME-Version: 1.0 User-Agent: Mutt/1.5.20 (2009-06-14) X-Original-Sender: tony@atomide.com X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 204.13.248.66 is neither permitted nor denied by best guess record for domain of tony@atomide.com) smtp.mail=tony@atomide.com 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: , Content-Disposition: inline When booted in legacy mode device_init_wakeup() gets called by drivers/mfd/twl-core.c when the children are initialized. However, when booted using device tree, the children are created with of_platform_populate() instead add_children(). This means that the RTC driver will not have device_init_wakeup() set, and we need to call it from the driver probe like RTC drivers typically do. Without this we cannot test PM wake-up events on omaps for cases where there may not be any physical wake-up event. Reported-by: Kevin Hilman Signed-off-by: Tony Lindgren --- This fix is for the -rc cycle please. --- a/drivers/rtc/rtc-twl.c +++ b/drivers/rtc/rtc-twl.c @@ -524,6 +524,7 @@ static int twl_rtc_probe(struct platform_device *pdev) } platform_set_drvdata(pdev, rtc); + device_init_wakeup(&pdev->dev, 1); return 0; out2: