From patchwork Wed Oct 21 10:10:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 55370 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lf0-f70.google.com (mail-lf0-f70.google.com [209.85.215.70]) by patches.linaro.org (Postfix) with ESMTPS id 94CC82303B for ; Wed, 21 Oct 2015 10:13:24 +0000 (UTC) Received: by lffy185 with SMTP id y185sf15518727lff.2 for ; Wed, 21 Oct 2015 03:13:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:cc:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=iafoE/6MCkVpFM0mBSxO/5i41f7MzbkK2xhr0u3dCyk=; b=kOJNhthcU1kpyb3KEb5TQMhqJIaIgw/5iHdWdoETLIqCJWFlAZ4sgfTpXOczqlHGDF CrZbVWOHbOidpXWllbk7C6zjZmDmqbKPH6YgZiH6XoIU3QK7GRggrGtJQQ5AuIv65tFF DAIdG09cV8bR9WOkzuibqBstOH7oUi3gCiLxHQOyKH+9Ih4tcKs4BoM0M52F8XKfFoRt nn7Qlt4kDBHuE7QoTAmLVlCBI8slUBKGk3DL7wlc4X6Jcw3oV1sjA1GyseoP2+JcTMC5 XRCnEitV7vWBUbskrSEuHYbhj/pJHMAlf+U6wzSLiU8LYFkDGSnG3QJafmG6ATiV98ke P8hg== X-Gm-Message-State: ALoCoQnaWaLFMzzSz2OVl4RDOEOSBX/uKzfRo476+BBG7NjWGve/hNVO3EEvWjzfFwAZvsN4LRpN X-Received: by 10.112.54.197 with SMTP id l5mr1919073lbp.21.1445422403202; Wed, 21 Oct 2015 03:13:23 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.39.6 with SMTP id n6ls166845lfn.36.gmail; Wed, 21 Oct 2015 03:13:23 -0700 (PDT) X-Received: by 10.25.142.203 with SMTP id q194mr3047092lfd.83.1445422403072; Wed, 21 Oct 2015 03:13:23 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id 73si5794823lfs.33.2015.10.21.03.13.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Oct 2015 03:13:23 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by lbbes7 with SMTP id es7so34714341lbb.2 for ; Wed, 21 Oct 2015 03:13:23 -0700 (PDT) X-Received: by 10.112.198.69 with SMTP id ja5mr3587488lbc.106.1445422402948; Wed, 21 Oct 2015 03:13:22 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp2596008lbq; Wed, 21 Oct 2015 03:13:22 -0700 (PDT) X-Received: by 10.68.68.143 with SMTP id w15mr9865837pbt.56.1445422401988; Wed, 21 Oct 2015 03:13:21 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id yk10si12336399pab.6.2015.10.21.03.13.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Oct 2015 03:13:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZoqNO-0003c9-9l; Wed, 21 Oct 2015 10:12:10 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZoqML-0002jx-DQ for linux-arm-kernel@lists.infradead.org; Wed, 21 Oct 2015 10:11:06 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 799A34F2; Wed, 21 Oct 2015 03:10:39 -0700 (PDT) Received: from e103737-lin.cambridge.arm.com (e103737-lin.cambridge.arm.com [10.1.207.150]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 30FDA3F308; Wed, 21 Oct 2015 03:10:43 -0700 (PDT) From: Sudeep Holla To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH 04/19] rtc: isl12057: enable support for the standard "wakeup-source" property Date: Wed, 21 Oct 2015 11:10:01 +0100 Message-Id: <1445422216-29375-5-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445422216-29375-1-git-send-email-sudeep.holla@arm.com> References: <1445422216-29375-1-git-send-email-sudeep.holla@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151021_031105_528132_2F6D1611 X-CRM114-Status: GOOD ( 13.87 ) X-Spam-Score: -6.9 (------) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-6.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [217.140.101.70 listed in list.dnswl.org] 0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Cc: Alessandro Zummo , Alexandre Belloni , rtc-linux@googlegroups.com, Sudeep Holla MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sudeep.holla@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Though the isl12057 rtc driver should and will continue to support the legacy "isil,irq2-can-wakeup-machine" property to enable RTC as the wakeup source, we need to add support for the new standard property "wakeup-source". This patch adds support for "wakeup-source" property in addition to the existing "isil,irq2-can-wakeup-machine" property. Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: rtc-linux@googlegroups.com Signed-off-by: Sudeep Holla --- drivers/rtc/rtc-isl12057.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/rtc/rtc-isl12057.c b/drivers/rtc/rtc-isl12057.c index a0462e5430c7..54328d4ac0d3 100644 --- a/drivers/rtc/rtc-isl12057.c +++ b/drivers/rtc/rtc-isl12057.c @@ -466,9 +466,8 @@ static int isl12057_check_rtc_status(struct device *dev, struct regmap *regmap) * is for instance the case on ReadyNAS 102, 104 and 2120. On those * devices with no IRQ driectly connected to the SoC, the RTC chip * can be forced as a wakeup source by stating that explicitly in - * the device's .dts file using the "isil,irq2-can-wakeup-machine" - * boolean property. This will guarantee 'wakealarm' sysfs entry is - * available on the device. + * the device's .dts file using the "wakeup-source" boolean property. + * This will guarantee 'wakealarm' sysfs entry is available on the device. * * The function below returns 1, i.e. the capability of the chip to * wakeup the device, based on IRQ availability or if the boolean @@ -479,8 +478,9 @@ static bool isl12057_can_wakeup_machine(struct device *dev) { struct isl12057_rtc_data *data = dev_get_drvdata(dev); - return (data->irq || of_property_read_bool(dev->of_node, - "isil,irq2-can-wakeup-machine")); + return data->irq || of_property_read_bool(dev->of_node, "wakeup-source") + || of_property_read_bool(dev->of_node, /* legacy */ + "isil,irq2-can-wakeup-machine"); } #else static bool isl12057_can_wakeup_machine(struct device *dev)