Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1659100imm; Thu, 18 Oct 2018 01:53:31 -0700 (PDT) X-Google-Smtp-Source: ACcGV63fxVYnlfeO7tiLpsC5FjMfL5wx3KUomSf/PuSxqlfh3z7uI4HT9px4KLeZ4Ex2WEY3IX90 X-Received: by 2002:a63:e00d:: with SMTP id e13-v6mr27390869pgh.114.1539852811825; Thu, 18 Oct 2018 01:53:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539852811; cv=none; d=google.com; s=arc-20160816; b=vJKnhYBloV0eF19n1yxsH+u3ZCvnQAmWcYlXLglaWOJH/FCo45h5FaArHkq8hQylgS JxCA4wMcMEoLDjkhIxDhSqss+fYk0Le1LZYH6ro4BE1SCj1wMRcEr3HvWA7HjiJ1JXGW 3ewm4AJMekM/iFqwzp2BFKCz93USS6WS5uZTWMGRoSVRIyXF8CdMDHjSphFfKlJ0Ren6 r1hCX6dr/wKJQ8d2BGaIiNJZbJJOGRq+rJmHL3NiGYCc9BVYCUwuupBwJp+PLVf+vFMc W8nECLRs0dsd45Vh21FFlWjpn/2FPF2gFqc9liOuk+FRQN8CSRtEJcl1AZSnYRmiIpEa vxzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=9kZYDpmsySRWfvSPa6Kfurc5wRQJDTAyv7Jhjoe/kD4=; b=vZOtpIdKLPW+AI60eNqN6BrVWBfphI3Q/58fwRwaHLnaDONXu8mP3s93agvY7iT/IQ OZaLEtvB+yNFga07rkr8/lek3h2UITUsk5e07ZmA58fwReec108sDaEgMcbI+EfbJvPV H7x6X9p4ruXOEyUb1+HO/DG5nW1h+LNOJ75xiBVUhMjduZlJn8LeRWjL75Vjb6oCqO3W AnOP+6p6rAPrACdKCoA+UHkRyR/WCEwsMz9kJyiudgoz/cPRkfkvHQG3vxe71eFSWUBb OBeJi/lwm3U6My65x+rZhHb2QMkpwbLQIz+HVSJusB4RYbo3CPi1fPr50b/i3DMMu6d4 D8Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ia/bx3bj"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ce19-v6si22502487plb.162.2018.10.18.01.53.16; Thu, 18 Oct 2018 01:53:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ia/bx3bj"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727844AbeJRQwp (ORCPT + 99 others); Thu, 18 Oct 2018 12:52:45 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:43916 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727813AbeJRQwp (ORCPT ); Thu, 18 Oct 2018 12:52:45 -0400 Received: by mail-pl1-f194.google.com with SMTP id 30-v6so14000703plb.10 for ; Thu, 18 Oct 2018 01:52:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=9kZYDpmsySRWfvSPa6Kfurc5wRQJDTAyv7Jhjoe/kD4=; b=ia/bx3bj2+ZiSg36oHYXpcIdN64t31sLLMkBnf4K7Zu5H8yJ8nnU4M2KJ0jHpLTogS ZeQqaH8smRzI0al7GLQ8xXfZbCH+5dLlNWlEBEBqCh1mTxqNbJPyAx6FjlQpmUbG22nu 91w6g+AUsUL8oQG0Qb2UNWq1y1S/RBzTHKCOU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=9kZYDpmsySRWfvSPa6Kfurc5wRQJDTAyv7Jhjoe/kD4=; b=Mg/BPreuLyHshTEf+PhyzDLhV9p/xj6kKLip1/ohsx3x026LEVeK3GpzFTIKbi/vyn xXTEtAoWT/1Qmqbxfr2pHptM+35LMhNAYSTD1VWGKiNyXVEKI23/7f2GBjpEJl2WKTzA 6VRp4xOA2dRpqhmnMGYRAXo6hVRuBLycIn4Fq9Ew5dXfkqzRWZKHTU/Pd565QQpVcu/n VXgVlkNeI9pj9KOll+aQQesRrJxDkfvGsnXCGbEl/6Zt+i6FzLkwaykj3Bt7Jcm3JGYW WAuM0A18SfCy+8F1ivutkbQaP1ps9Uk3tRrhYrHjSCP6YrXwFyfyvuVscrbdfuDo3l6p dLYQ== X-Gm-Message-State: ABuFfoi2HGaPi8BmYPXQyC4171PDhKUKiGBg7k/jC9zNwti0NLnjKiQ6 xWNdZ/P13vx4MoKCEAr8UhgLaA== X-Received: by 2002:a17:902:4583:: with SMTP id n3-v6mr29427180pld.255.1539852766364; Thu, 18 Oct 2018 01:52:46 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id x186-v6sm18467528pfb.125.2018.10.18.01.52.43 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Oct 2018 01:52:45 -0700 (PDT) From: Baolin Wang To: a.zummo@towertech.it, alexandre.belloni@bootlin.com Cc: broonie@kernel.org, linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, baolin.wang@linaro.org Subject: [PATCH 1/5] rtc: sc27xx: Set wakeup capability before registering rtc device Date: Thu, 18 Oct 2018 16:52:26 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Set wakeup capability before registering rtc device, in case the alarmtimer can find one available rtc device. Signed-off-by: Baolin Wang --- drivers/rtc/rtc-sc27xx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-sc27xx.c b/drivers/rtc/rtc-sc27xx.c index deea5c3..8afba12 100644 --- a/drivers/rtc/rtc-sc27xx.c +++ b/drivers/rtc/rtc-sc27xx.c @@ -631,16 +631,18 @@ static int sprd_rtc_probe(struct platform_device *pdev) return ret; } + device_init_wakeup(&pdev->dev, 1); + rtc->rtc->ops = &sprd_rtc_ops; rtc->rtc->range_min = 0; rtc->rtc->range_max = 5662310399LL; ret = rtc_register_device(rtc->rtc); if (ret) { dev_err(&pdev->dev, "failed to register rtc device\n"); + device_init_wakeup(&pdev->dev, 0); return ret; } - device_init_wakeup(&pdev->dev, 1); return 0; } -- 1.7.9.5