From patchwork Wed Jul 3 08:47:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hebbar, Gururaja" X-Patchwork-Id: 256555 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-oa0-x240.google.com (mail-oa0-x240.google.com [IPv6:2607:f8b0:4003:c02::240]) (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 E89ED2C007B for ; Wed, 3 Jul 2013 18:44:40 +1000 (EST) Received: by mail-oa0-f64.google.com with SMTP id i7sf2240368oag.29 for ; Wed, 03 Jul 2013 01:44:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=x-beenthere:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:mime-version: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=YN912+wyrw0aFD0r9ngvxBcNOlOJglxIplOQtUUCbYE=; b=WQXbrY+WF6UNZKex0zHdU4ZRggBxKH2PROwcpPO/QZ4QxbQw1C4bvhoP861PK1iCPY dmcFR/AlZckMaCgHa3+dcMuwLjTOjbiVFySFUHybz8Woxs7IJlnZIbTtUaAeom/a+bsU 7EkQqcKTfiAOtUUD3o8eeZ3+rHUfsbIK6VoK5i7VxzbH0dmz2IMzmsP1iUN/E+cwF0DC zlMEOfTb630lKKBdO8Dpr6Gsyyvr0rtAvm2+RMthHD78Aw9cotjVWi8Z0QTp3x7zgFmL uUaK6sH0eellDB9Xre/MchBty14zglyLdgyLpuN/3oNeZIG4VjtIoe3h0bWSns2v2m7n dDNQ== X-Received: by 10.50.4.38 with SMTP id h6mr1295578igh.8.1372841076705; Wed, 03 Jul 2013 01:44:36 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.50.29.82 with SMTP id i18ls242491igh.42.gmail; Wed, 03 Jul 2013 01:44:36 -0700 (PDT) X-Received: by 10.50.124.36 with SMTP id mf4mr17324891igb.2.1372841075929; Wed, 03 Jul 2013 01:44:35 -0700 (PDT) Received: from arroyo.ext.ti.com (arroyo.ext.ti.com. [192.94.94.40]) by gmr-mx.google.com with ESMTPS id e3si2200966igy.0.2013.07.03.01.44.35 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 03 Jul 2013 01:44:35 -0700 (PDT) Received-SPF: pass (google.com: domain of gururaja.hebbar@ti.com designates 192.94.94.40 as permitted sender) client-ip=192.94.94.40; Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id r638iX8l007699; Wed, 3 Jul 2013 03:44:33 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r638iXx8024413; Wed, 3 Jul 2013 03:44:33 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.2.342.3; Wed, 3 Jul 2013 03:44:33 -0500 Received: from ucmsshproxy.india.ext.ti.com (dbdp20.itg.ti.com [172.24.170.38]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with SMTP id r638iRTn023558; Wed, 3 Jul 2013 03:44:28 -0500 Received: from symphony.india.ext.ti.com (unknown [192.168.247.13]) by ucmsshproxy.india.ext.ti.com (Postfix) with ESMTP id 502C5158003; Wed, 3 Jul 2013 14:14:28 +0530 (IST) Received: from ubuntu-psp-linux.india.ext.ti.com (ubuntu-psp-linux [192.168.247.46]) by symphony.india.ext.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id r638iQR20885; Wed, 3 Jul 2013 14:14:26 +0530 (IST) From: Hebbar Gururaja To: , , CC: , , , , , , , , Alessandro Zummo , Subject: [rtc-linux] [Patch V2 1/4] rtc: omap: restore back (hard-code) wakeup support Date: Wed, 3 Jul 2013 14:17:02 +0530 Message-ID: <1372841225-18813-2-git-send-email-gururaja.hebbar@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1372841225-18813-1-git-send-email-gururaja.hebbar@ti.com> References: <1372841225-18813-1-git-send-email-gururaja.hebbar@ti.com> MIME-Version: 1.0 X-Original-Sender: gururaja.hebbar@ti.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of gururaja.hebbar@ti.com designates 192.94.94.40 as permitted sender) smtp.mail=gururaja.hebbar@ti.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: , rtc-omap driver modules is used both by OMAP1/2, Davinci SoC platforms. However, rtc wake support on OMAP1 is broken. Hence the device_init_wakeup() was removed from rtc-omap driver and moved to platform board files that supported it (DA850/OMAP-L138). [1] However, recently [2] it was suggested that driver should always do a device_init_wakeup(dev, true). Platforms that don't want/need wakeup support can disable it from userspace via: echo disabled > /sys/devices/.../power/wakeup Also, with the new DT boot-up, board file doesn't exist and hence there is no way to have device wakeup support rtc. The fix for above issues, is to hard code device_init_wakeup() inside driver and let platforms that don't need this, handle it through the sysfs power entry. [1] https://patchwork.kernel.org/patch/136731/ [2] http://www.mail-archive.com/davinci-linux-open-source@linux. davincidsp.com/msg26077.html Signed-off-by: Hebbar Gururaja Acked-by: Kevin Hilman Cc: Alessandro Zummo Cc: rtc-linux@googlegroups.com --- :100644 100644 b0ba3fc... 761919d... M drivers/rtc/rtc-omap.c drivers/rtc/rtc-omap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c index b0ba3fc..761919d 100644 --- a/drivers/rtc/rtc-omap.c +++ b/drivers/rtc/rtc-omap.c @@ -423,6 +423,8 @@ static int __init omap_rtc_probe(struct platform_device *pdev) * is write-only, and always reads as zero...) */ + device_init_wakeup(&pdev->dev, true); + if (new_ctrl & (u8) OMAP_RTC_CTRL_SPLIT) pr_info("%s: split power mode\n", pdev->name);