Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp482909pxx; Wed, 28 Oct 2020 09:20:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPpX/Ee1tPOvcM7eaU+W2AJ4LKUw8K7k/mgO+0FyjJrZMuVcsOjS9WPqDYnB0kFrZVQPNe X-Received: by 2002:a17:906:38d9:: with SMTP id r25mr8648715ejd.8.1603901997235; Wed, 28 Oct 2020 09:19:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603901997; cv=none; d=google.com; s=arc-20160816; b=L7LTRXGxZj4niV4bLGgzNleWqZfm4X/gsI3G3j3CLS2ZtSNSt0P4loulwYY6o9khU6 UyfZBSHaAtirhJk1WMnGNMsNt6WmcxiWRmYqePcDtusKntShPuxyUxPXtENI3wquGcoL R0oUmi9NvmHnCM07fwfugShbjVzpO5y3KvIVxK2UTHHIUvZQZMYvy6btvetIkRaJDt38 PbfjuhfvJuRBGsQKtV3Nw96Aem161zpnSFzh4Tsou/Tay/Zn8X5440rC39Bd77/9aHc2 zZ5KCV91L+RwID0imF2V5QbRehjCRg6wPMOpkjzBJEiyEsYoadZihzbJndwBbRL8IZ+O q7Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mjhPLIv9Qs1fpjE4owwpuVwkTUDPflIM/RILbQcpCUI=; b=pPB3LBHd78+djZMhbhEZsu/rGWeKH3ZyFT1u7F2Cp6bsI3j2TD+DPJEntdWhF2eWLB pe4CZmMAkMXLxn6TnpwCUAbmDHkrou6p7BtUptLAZwLdLjJa0gwnO91y8vrB/C7JT3vM BKoQCN/6dLRUlTtonxMikux0acFRjZ0zOHZkpspSUUl+weH1F4uBFV1fuVU35yxnT7R3 AUFBtAXSO82iOLLMcUH9GdAgXOcwgYlZ8zRMh9SwHvIBxRzHcryQahKs0hms5ELJ0FtI 38Dj5KCdq2wnCROvaN3OSx1Z0/Vs6gmUo6HY8YcBKTU7aftCGA2Xs7JNJPJBVi+WMHID Uriw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EsWkGahy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k6si3756365ejs.0.2020.10.28.09.19.35; Wed, 28 Oct 2020 09:19:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EsWkGahy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1815677AbgJ0REH (ORCPT + 99 others); Tue, 27 Oct 2020 13:04:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:42040 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1793611AbgJ0PH0 (ORCPT ); Tue, 27 Oct 2020 11:07:26 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0C82C206F4; Tue, 27 Oct 2020 15:07:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603811246; bh=g6dP+BPrfb98trzPWGgjmNStse5pQDADMfVlHwEzsko=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EsWkGahyLgSVKT7L4IX/BOuOzquIxGtzbIq+tnjTPx9LawZvtg9xZ8s8oGRuREP6D LV19AGEDZsS2lvOAbheTxW9NG31i/fr5kobLAOYwm99kl4+eSuSXE9j+2vTFgnCLzH ZCWJXBFZHUOZ1/SO7kiA6ICYDHGTaWsPDo3w132s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chris Packham , Alexandre Belloni , Sasha Levin Subject: [PATCH 5.8 426/633] rtc: ds1307: Clear OSF flag on DS1388 when setting time Date: Tue, 27 Oct 2020 14:52:49 +0100 Message-Id: <20201027135542.702283988@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chris Packham [ Upstream commit f471b05f76e4b1b6ba07ebc7681920a5c5b97c5d ] Ensure the OSF flag is cleared on the DS1388 when the clock is set. Fixes: df11b323b16f ("rtc: ds1307: handle oscillator failure flags for ds1388 variant") Signed-off-by: Chris Packham Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200818013543.4283-1-chris.packham@alliedtelesis.co.nz Signed-off-by: Sasha Levin --- drivers/rtc/rtc-ds1307.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index 49702942bb086..70b198423deba 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -352,6 +352,10 @@ static int ds1307_set_time(struct device *dev, struct rtc_time *t) regmap_update_bits(ds1307->regmap, DS1340_REG_FLAG, DS1340_BIT_OSF, 0); break; + case ds_1388: + regmap_update_bits(ds1307->regmap, DS1388_REG_FLAG, + DS1388_BIT_OSF, 0); + break; case mcp794xx: /* * these bits were cleared when preparing the date/time -- 2.25.1