Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1659201imm; Thu, 18 Oct 2018 01:53:39 -0700 (PDT) X-Google-Smtp-Source: ACcGV62AmBLI9Oy2mxADkMGpYCUkQAJ/0bpAUQ77wXnLqlrC3eHgz03o3MbOFjkwOly4V3VUroOr X-Received: by 2002:a63:cf4c:: with SMTP id b12-v6mr27399974pgj.418.1539852819521; Thu, 18 Oct 2018 01:53:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539852819; cv=none; d=google.com; s=arc-20160816; b=eyYo8UByEnowwJfHZNbBUq+NNkuC7yEVjXA+/DUXI2KGlkaR+A6pF3bmyYthuCy66l GS5JZCVA/TqCr6USnpKv3yGy56qGyEL2VTLq3N6KzcUN/Ka1ncC4kwkgiRWYJ2EHTIpg piGHKBcZvXj0ELBHODqYI+SGsQEZrc5u7RaF+gdbbuUEAnlrrxNn476upJ75tMxYbkOS 69kfQUbEYqvO+zrjPfEyfHCoZEf2hil9bfzphOCO0C4zgk/tHpcsLaVI2eya6rCMqSRE xnRZSupmU2PH47xINL4B9xtaG3kZGnmDJwlGQEZDTHZwQqTgpERBfQkXkwzeHqU4LvBa H1qg== 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 d37-v6si20784421plb.387.2018.10.18.01.53.24; Thu, 18 Oct 2018 01:53:39 -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 S1727965AbeJRQww (ORCPT + 99 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(-) 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) { -- 1.7.9.5