From patchwork Thu Oct 18 08:52:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 149104 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1699133lji; Thu, 18 Oct 2018 01:52:56 -0700 (PDT) X-Google-Smtp-Source: ACcGV61FzvPZjYu+SeQMW92iISck3AUxuztoNZW2qdu+6O0h9n28K+8VSxKJEoQaJiZieyFzsWYT X-Received: by 2002:a17:902:104:: with SMTP id 4-v6mr29485122plb.189.1539852776106; Thu, 18 Oct 2018 01:52:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539852776; cv=none; d=google.com; s=arc-20160816; b=fMiugL3ZKLciPumKAcDSHn0A/Q12sUauzbIgHppUrQgqoLQFxuh3QxAnA+FZO/sFTK sOO/ZL2w09xZxVeZZpgvf5+QUX7/Ayb89x/qQFOM13aPTSWVnLMJbS+ly6JD0jUmBas4 VG1Oize9NftOZCQHhiORaVZm2YQGuU5zj55ccSOsz3AIufJDOTHDvMiQmtxSgnTKjx19 QnHoqBAGU4D3CIoF2I2xIpupFlpXviqJR+vMidrZA7MBYyvyVU9Ve54nfLj2g46xVQAS 0HYpgHL3XARY3tMyzo+VaJsZ4TkIm4hTeb8/BeHruGoKH2VbG10QSH/OQIBmdWYPIho3 GKJw== 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=wuTLNNFPtvGEn50eKaEyNEzBPZsJcfU/sfOOV2dCAmc=; b=Ml+we3ye6DwC3HKUE8/4q5yBhD6wfkn0Qx5IvwkaBwAeoRYqiO3N8mBSezpDpPsDUb oWuhfYgdPhDU1f+7ke9nxCYhDz23WC9XJdATZ+acYbOkW/RUupJkW/WTJqtM9ISFJYJJ 7cAICwqvK60rsxxTwS4ZzzoMG2bQqCu8mW8FPHHtT4Mu+B/fu+Hghdfy7kqTNodYrUoM LxONpG4UgiUQE8pLRLVX4iL1sEk5nIhSDGvV9UNHepNfq72kfTXW6Rsrk7aImkvDVZO9 Z/jdRuDpAVa6NfrRra9j24cRAtNJR2zx4SAD1CBhV3RHrEc0jKWFSmZD6XceG7eN3C81 EOEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IBd11yo1; 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 l1-v6si20313458pld.375.2018.10.18.01.52.55; Thu, 18 Oct 2018 01:52:56 -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=IBd11yo1; 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 S1727974AbeJRQww (ORCPT + 32 others); Thu, 18 Oct 2018 12:52:52 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:33376 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727813AbeJRQwv (ORCPT ); Thu, 18 Oct 2018 12:52:51 -0400 Received: by mail-pf1-f195.google.com with SMTP id 78-v6so12194454pfq.0 for ; Thu, 18 Oct 2018 01:52:53 -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=wuTLNNFPtvGEn50eKaEyNEzBPZsJcfU/sfOOV2dCAmc=; b=IBd11yo1pLxVL9pACURpAokeSMvwGB54pTZFTBDD8U5OhJPNp3MNjH0YCSLKPohgeh yrDeKbJ/OYUvodz7eVGrF6ejRZf1J4ke0j10tG1jg9CufQfMuHkz9oxysyphJpDPDf5q u4WAzthRr82U7sXz01PHWT3BVFCRPns9eZl7I= 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=wuTLNNFPtvGEn50eKaEyNEzBPZsJcfU/sfOOV2dCAmc=; b=KUD8pS8WvIAGGwormG5ebMNS5B/CvI0sa/vjT78HnrhTx1CzmOgyWoq7F7ionZsJ9y KUJfsfNhyavFyAJintdwY33Yiua6ILjg6Sc1tJcBqRuknMsbrOUuVRO55IjHVW+LMH1Y MtxZhPa0Y+z+whbxCABXae0xOX20hfMX97yLSd2ej/05nGKpOd/5DBdTO3P1FJyGOSu9 Vu2ad0k9A/zcr59ESIilcBnyN4PoIs3RYumu2ufAIh2VY6lkR/daqNhagqN79tHlz2Ix 81CTzSZeqI8T/3/C/84yXSJNuG2YbxfV8JHmblI9F0kKwe0EQc9ZlvXyW6/frDn6ZfEA reEA== X-Gm-Message-State: ABuFfojNsN35cZNtIK5ho8rvPU/YIEfYYJyHp4kjqJf+T5ldcn8U3IYj FFBuz4jZDhTtneI+48UNPPR1uQ== X-Received: by 2002:a63:5021:: with SMTP id e33-v6mr27572885pgb.306.1539852772874; Thu, 18 Oct 2018 01:52:52 -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.49 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Oct 2018 01:52:51 -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 3/5] rtc: sc27xx: Remove interrupts disable and clear in probe() Date: Thu, 18 Oct 2018 16:52:28 +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 When registering one rtc device, it will check to see if there is an alarm already set in rtc hardware by issuing __rtc_read_alarm(). So we should not disable the RTC interrupts and clear the interrupts status in probe() function. Signed-off-by: Baolin Wang --- drivers/rtc/rtc-sc27xx.c | 20 -------------------- 1 file changed, 20 deletions(-) -- 1.7.9.5 diff --git a/drivers/rtc/rtc-sc27xx.c b/drivers/rtc/rtc-sc27xx.c index 6ac5653..4ecabe6 100644 --- a/drivers/rtc/rtc-sc27xx.c +++ b/drivers/rtc/rtc-sc27xx.c @@ -129,19 +129,6 @@ static int sprd_rtc_clear_alarm_ints(struct sprd_rtc *rtc) SPRD_RTC_ALM_INT_MASK); } -static int sprd_rtc_disable_ints(struct sprd_rtc *rtc) -{ - int ret; - - ret = regmap_update_bits(rtc->regmap, rtc->base + SPRD_RTC_INT_EN, - SPRD_RTC_INT_MASK, 0); - if (ret) - return ret; - - return regmap_write(rtc->regmap, rtc->base + SPRD_RTC_INT_CLR, - SPRD_RTC_INT_MASK); -} - static int sprd_rtc_lock_alarm(struct sprd_rtc *rtc, bool lock) { int ret; @@ -609,13 +596,6 @@ static int sprd_rtc_probe(struct platform_device *pdev) rtc->dev = &pdev->dev; platform_set_drvdata(pdev, rtc); - /* clear all RTC interrupts and disable all RTC interrupts */ - ret = sprd_rtc_disable_ints(rtc); - if (ret) { - dev_err(&pdev->dev, "failed to disable RTC interrupts\n"); - return ret; - } - /* check if RTC time values are valid */ ret = sprd_rtc_check_power_down(rtc); if (ret) {