From patchwork Thu Oct 18 08:52:27 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: 149103 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1699099lji; Thu, 18 Oct 2018 01:52:52 -0700 (PDT) X-Google-Smtp-Source: ACcGV61Nn3cbD2ubk8mQIX5HyJ3usfhoLxHGCv/DLWyopHRzFTdc+ySAvhBsFIzvO18GZ0j1Ky92 X-Received: by 2002:a62:8708:: with SMTP id i8-v6mr29763739pfe.150.1539852772660; Thu, 18 Oct 2018 01:52:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539852772; cv=none; d=google.com; s=arc-20160816; b=KVCtakaO1ZztvqbTbg+kyYOrXEMsUxI7v5CXPzCVzSSweFE+QYZLzGb4u/Oe+FIsW3 NqmbCduDNMj1En83Wv3JztQ4R/p92bVeMGw329j+Xvoub0u2XTgDt3ko9Vkmx8F1Y8VX +IE6b8Rj/ukBvgWDPG+o/2KFK87uI2V4bL7PWOblNgvzWaIKsIbXhmzzukWHrB6XQoBO OLXDGBBKmWJlUBG9rOrDZhmu1SR/eD/mZeXL/Vp7fgCWyzr4C5aScCswxPqF4czqFT1v /Ma8e4/EJ0LKfoo9BA3GaxrrvAUGt+v1xhNkwcZpVQmjZUTCcocFUTxLSlbvL0vfrhnS yYKQ== 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=7f3p8DaD+OJHNqlVoz6G4mjpM3q6Pg5QN2ip5mfsPB0=; b=MP0F27zeVt0PVHu9PHTomoeYmFHMPlcrnEjiCrq/tBarx6BrzRA+wbQNDzWBCok696 +70X7yzo4CMKxINdQq2bFA12bKPVLjz0RjNkSD9odoVhODjjwbObtWeOHs6PIelopev+ uO+aQb7iYOWdeB3BxFOnBqTl9H3kErdD7LPyFEhO29rLdhCtU20/I3uoIUwEV0nOfnIK nzUY54h2I801ydYAWJzncQZcdcR1e33kAfX9IIbisGlIuAyg8C/xIerirNkcJZxLQBvx qdP5589vQkBe4vigAEtlv1RE85g+M49aQaG7Ie3m6Hd1GepLTENywQu2BHNIcI+u7aHC tOfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F0npjnwn; 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 h17-v6si18410168pfi.84.2018.10.18.01.52.52; Thu, 18 Oct 2018 01:52:52 -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=F0npjnwn; 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 S1727946AbeJRQws (ORCPT + 32 others); Thu, 18 Oct 2018 12:52:48 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:36078 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727813AbeJRQwr (ORCPT ); Thu, 18 Oct 2018 12:52:47 -0400 Received: by mail-pl1-f194.google.com with SMTP id y11-v6so14015877plt.3 for ; Thu, 18 Oct 2018 01:52:49 -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=7f3p8DaD+OJHNqlVoz6G4mjpM3q6Pg5QN2ip5mfsPB0=; b=F0npjnwn8iNGfJ7j+3osZduTcfk1BvnsV0b5S1jvevzglGfqx11GYx2jkrUFjOFfBk aC5Tz0xe7fxBPWueVQa+pgp9OkIOiG4o9pVk1VFXjmpulESXea/fV6+AouxON2Jq6uRd 7pRn+6LdZE0J3wFoUxbAH+Uqd/oPozsF+NYTM= 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=7f3p8DaD+OJHNqlVoz6G4mjpM3q6Pg5QN2ip5mfsPB0=; b=FtU8RjL+3maqGxe1o/J9fF0RC8PPU0Ijv+q/BJIn9LLqlzzseOoRgw/sc4/m8Vm43g a8Z77pSfcc/CMe4VPYgtt4DcqrIVA/fm7FzZ2XqGmfvQfNhU+wabWff+YmQRY4zuBnBp idw+w3MT71jXTEsjcwqDknDZ/+CInw++UJw0Y4v9GIbfkFcv8JUDTSY/jC1PRBMzAtw8 ecO7/Wu/QxgXseHpwYqeKZ3qXcdXlqPi8py++E+OcWbIu2Y8G16O65Ra2b0iLiDwsnbD +5FDzbJjNm2Pa85H1hylVlF1pIysd5nkYiNDbWnStyHbbnWrFdrRGo3v5uiMowrjF0B5 G1LA== X-Gm-Message-State: ABuFfojYsbr9EJ9DxU9rke84g3i6KXhS7nMVD3TuGIgAw640jqhyqa6H Vf0dtx0ElLO8h2GYCTnyimxCfvdHIrmFMw== X-Received: by 2002:a17:902:74c9:: with SMTP id f9-v6mr662553plt.99.1539852769501; Thu, 18 Oct 2018 01:52:49 -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.46 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Oct 2018 01:52:48 -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 2/5] rtc: sc27xx: Clear SPG value update interrupt status Date: Thu, 18 Oct 2018 16:52:27 +0800 Message-Id: <43a12635d57b134fc55d664af8f715b31bbc5f3b.1539851865.git.baolin.wang@linaro.org> 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 We should clear the SPG value update interrupt status once the SPG value is updated successfully, in case incorrect status validation for next time. Signed-off-by: Baolin Wang --- drivers/rtc/rtc-sc27xx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 1.7.9.5 diff --git a/drivers/rtc/rtc-sc27xx.c b/drivers/rtc/rtc-sc27xx.c index 8afba12..6ac5653 100644 --- a/drivers/rtc/rtc-sc27xx.c +++ b/drivers/rtc/rtc-sc27xx.c @@ -172,7 +172,8 @@ static int sprd_rtc_lock_alarm(struct sprd_rtc *rtc, bool lock) return ret; } - return 0; + return regmap_write(rtc->regmap, rtc->base + SPRD_RTC_INT_CLR, + SPRD_RTC_SPG_UPD_EN); } static int sprd_rtc_get_secs(struct sprd_rtc *rtc, enum sprd_rtc_reg_types type,