Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1659147imm; Thu, 18 Oct 2018 01:53:35 -0700 (PDT) X-Google-Smtp-Source: ACcGV62g8GboqrNKEFTfRnP3pXKdmA4U/y6CZnK6dAJw+LHVjBREkJPEj/krYxUmLTb5DD8ByqA+ X-Received: by 2002:a63:583:: with SMTP id 125-v6mr5201926pgf.273.1539852815416; Thu, 18 Oct 2018 01:53:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539852815; cv=none; d=google.com; s=arc-20160816; b=TfFCVCJ+GHDNrcTJIPRtOeWw+GzaXGK35JpwxlcJMBk7xATlG0BndEVzDLj+0aR12V kntEkJpJg7mKITj0Y+aEZuEcKxRv3copQTfErYI+oHPxc2i8vqDw9Co6oR4ylJemV55n nv1cCz4/w8Vt/zrJPKW7/TpNsIFARs+vrnCkquPNA2OMxKBBcCFDj0FR9dpp4hsExBwT vAWZYpV4FKy2iqZH+YAQHaU4Q1sEDDhPnGdN8WGawzdDAcmgTjbuJ9k4zFDxd/1tHjBS y54J7uVD33cCVyZotCXyJQPq1Y3E6h6ZuOYHztfq7KWw5QmTbYJitkm1RBDDH1cfNc7F Hf7A== 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 f132-v6si19635837pgc.484.2018.10.18.01.53.19; Thu, 18 Oct 2018 01:53:35 -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 S1727881AbeJRQws (ORCPT + 99 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(-) 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, -- 1.7.9.5