Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2231669/?format=api
{ "id": 2231669, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2231669/?format=api", "web_url": "http://patchwork.ozlabs.org/project/rtc-linux/patch/20260501044657.1003980-2-ronan.dalton@alliedtelesis.co.nz/", "project": { "id": 9, "url": "http://patchwork.ozlabs.org/api/1.1/projects/9/?format=api", "name": "Linux RTC development", "link_name": "rtc-linux", "list_id": "linux-rtc.vger.kernel.org", "list_email": "linux-rtc@vger.kernel.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20260501044657.1003980-2-ronan.dalton@alliedtelesis.co.nz>", "date": "2026-05-01T04:46:10", "name": "rtc: ds1307: handle oscillator stop flag for ds1337/ds1339/ds3231", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "f05146d874fda640a9938074852da8c87f0db579", "submitter": { "id": 92674, "url": "http://patchwork.ozlabs.org/api/1.1/people/92674/?format=api", "name": "Ronan Dalton", "email": "ronan.dalton@alliedtelesis.co.nz" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/rtc-linux/patch/20260501044657.1003980-2-ronan.dalton@alliedtelesis.co.nz/mbox/", "series": [ { "id": 502422, "url": "http://patchwork.ozlabs.org/api/1.1/series/502422/?format=api", "web_url": "http://patchwork.ozlabs.org/project/rtc-linux/list/?series=502422", "date": "2026-05-01T04:46:10", "name": "rtc: ds1307: handle oscillator stop flag for ds1337/ds1339/ds3231", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/502422/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2231669/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2231669/checks/", "tags": {}, "headers": { "Return-Path": "\n <linux-rtc+bounces-6457-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-rtc@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=alliedtelesis.co.nz header.i=@alliedtelesis.co.nz\n header.a=rsa-sha256 header.s=mail181024 header.b=Mi8G2Amy;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-rtc+bounces-6457-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=alliedtelesis.co.nz\n header.i=@alliedtelesis.co.nz header.b=\"Mi8G2Amy\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=202.36.163.20", "smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=alliedtelesis.co.nz", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=alliedtelesis.co.nz" ], "Received": [ "from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g6JY260f0z1xvV\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 01 May 2026 14:51:50 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id EF4F030185A1\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 1 May 2026 04:51:43 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 88C782FB99D;\n\tFri, 1 May 2026 04:51:40 +0000 (UTC)", "from gate2.alliedtelesis.co.nz (gate2.alliedtelesis.co.nz\n [202.36.163.20])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 13B27233D9E\n\tfor <linux-rtc@vger.kernel.org>; Fri, 1 May 2026 04:51:36 +0000 (UTC)", "from svr-chch-seg1.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n\t(Client did not present a certificate)\n\tby gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 7B8A22C023A;\n\tFri, 1 May 2026 16:51:28 +1200 (NZST)", "from pat.atlnz.lc (Not Verified[10.32.16.33]) by\n svr-chch-seg1.atlnz.lc with Trustwave SEG (v8,2,6,11305)\n\tid <B69f431500000>; Fri, 01 May 2026 16:51:28 +1200", "from ronand-dl.ws.atlnz.lc (ronand-dl.ws.atlnz.lc [10.33.12.18])\n\tby pat.atlnz.lc (Postfix) with ESMTP id 5565C13EC7E;\n\tFri, 1 May 2026 16:51:28 +1200 (NZST)", "by ronand-dl.ws.atlnz.lc (Postfix, from userid 1930)\n\tid 4FE0484004F; Fri, 1 May 2026 16:51:28 +1200 (NZST)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777611100; cv=none;\n b=VIQhID0M97suLyY+dt9g89RmVeklT4Amr6OV8xN9Surzq/gGKRWWlaP60f6bZrGQ37i6dRmulm+kcghpTCQN+VBuFhNZHgVO/f/8awnUCQpSSvY7TcTOU3T56rClyaBEKbsHN35TBU2aU5Ix+T7weMGEOvmSJUbP4z860/mZV+Y=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777611100; c=relaxed/simple;\n\tbh=zgYKV0g8h/sbwHqqHgRPQ20vs2Bs5Np7r5DJDXulGhw=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=unwbTnDqdskLdKqQa43GX5n9gZwoorNfGqItkOwawkYocLx1xv1XPhsxmA2pu4x/7hcZi33Tteq88d4jPNGXDqpZZAcK/H7xMFAUIkWUd6DrmIjc0jVi/YsbBSbBOlDPceDrqInH+naqwKqRWA4r2B/LLpqFSHaInxofM2TWrtk=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=alliedtelesis.co.nz;\n spf=pass smtp.mailfrom=alliedtelesis.co.nz;\n dkim=pass (2048-bit key) header.d=alliedtelesis.co.nz\n header.i=@alliedtelesis.co.nz header.b=Mi8G2Amy;\n arc=none smtp.client-ip=202.36.163.20", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz;\n\ts=mail181024; t=1777611088;\n\tbh=jmTSEhdwhbLZM471o2oxoaWmb7pz1B/7IQxuHd6Pubs=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=Mi8G2Amyw43NH34OqQmWrsjNRf5BFEg/RV3lN4z2B/rGKVXnzhxzqQu3Tg4tbS2/D\n\t LihPvfUijmg6lPhWxQRxZdy4muxjS7ztoQziacZRgw1p4VcZ8d+YSm+tAjWiWyDRuA\n\t sJKAAk7HjzWqEZ7BVab+3xCt0zheGmNubqsVHsXWXlSzneoQ83m1aNqDlhku2MgJFe\n\t 4Iw0RNtW66kdQgPdN+mx3Hanb4uKr3j7odG8m0tZGRS/QljmcTAqtlXCbJTOutbP0L\n\t PnvYGdY2+Rnke97Zj3K/OhiDZubNgz+JMQ61ShHYSeGxyiVMOnd3UNU2VFrRrWkLdk\n\t xtdsuiZYZK9Dw==", "From": "Ronan Dalton <ronan.dalton@alliedtelesis.co.nz>", "To": "alexandre.belloni@bootlin.com", "Cc": "Ronan Dalton <ronan.dalton@alliedtelesis.co.nz>,\n\tlinux-rtc@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tTyler Hicks <code@tyhicks.com>,\n\tSasha Levin <sashal@kernel.org>,\n\tMeagan Lloyd <meaganlloyd@linux.microsoft.com>,\n\tRodolfo Giometti <giometti@enneenne.com>,\n\tChris Packham <chris.packham@alliedtelesis.co.nz>", "Subject": "[PATCH] rtc: ds1307: handle oscillator stop flag for\n ds1337/ds1339/ds3231", "Date": "Fri, 1 May 2026 16:46:10 +1200", "Message-ID": "<20260501044657.1003980-2-ronan.dalton@alliedtelesis.co.nz>", "X-Mailer": "git-send-email 2.53.0", "Precedence": "bulk", "X-Mailing-List": "linux-rtc@vger.kernel.org", "List-Id": "<linux-rtc.vger.kernel.org>", "List-Subscribe": "<mailto:linux-rtc+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-rtc+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "quoted-printable", "X-SEG-SpamProfiler-Analysis": "v=2.4 cv=FPe4xPos c=1 sm=1 tr=0 ts=69f43150\n a=KLBiSEs5mFS1a/PbTCJxuA==:117 a=NGcC8JguVDcA:10 a=VwQbUJbxAAAA:8\n a=P-IC7800AAAA:8 a=FLmnqZ5pAAAA:8 a=yMhMjlubAAAA:8 a=gUfQWItQAAAA:8\n a=vhqSDMIX0PFRHOe_07sA:9 a=3ZKOabzyN94A:10 a=d3PnA9EDa4IxuAV0gXij:22\n a=8DxQ4-P9FUvTN4rw3Xy2:22 a=Xud5aiJGVNusHZ8q4fKI:22", "X-SEG-SpamProfiler-Score": "0", "x-atlnz-ls": "pat" }, "content": "Prior to commit 6cb0d8587b96 (\"rtc: ds1307: remove clear of oscillator\nstop flag (OSF) in probe\"), the oscillator stop flag (OSF) bit was\nchecked during device probe for the ds1337, ds1339, ds1341, and ds3231\nchips; if it was set, it would be cleared and a warning would be logged\nsaying \"SET TIME!\". Since that commit, the OSF bit is no longer cleared,\nbut the warning is still printed.\n\nDirectly following that commit, there was no way to get rid of this\nwarning because nothing cleared the OSF bit on these chips.\n\nThe commit associated with the previous commit, ae03a28e12a7 (\"rtc:\nds1307: handle oscillator stop flag (OSF) for ds1341\"), made proper use\nof the OSF when getting and setting the time in the RTC. However, the\nother RTC variants ds1337, ds1339 and ds3231 didn't have a corresponding\nchange made.\n\nGiven that the OSF bit is no longer cleared at probe time when it is\nset, the remaining three chips should have the same handling as the\nds1341 chip has for the OSF bit.\n\nFix the issue on the ds1337, ds1339 and ds3231 chips by applying the\nsame logic as the ds1341 has to these chips.\n\nNote that any devices brought up between the first referenced commit and\nthis one may begin mistrusting the time reported by the RTC until it is\nset again, if the bit was never explicitly cleared.\n\nNote that only the ds1339 was tested with this change, but the\ndatasheets for the other chips contain essentially identical\ndescriptions of the OSF bit so the same change should work.\n\nAn alternative to this change could be just to revert the referenced two\ncommits and not use the OSF bit at all, apart from logging a warning and\nclearing it on probe.\n\nSigned-off-by: Ronan Dalton <ronan.dalton@alliedtelesis.co.nz>\nCc: linux-rtc@vger.kernel.org\nCc: linux-kernel@vger.kernel.org\nCc: Alexandre Belloni <alexandre.belloni@bootlin.com>\nCc: Tyler Hicks <code@tyhicks.com>\nCc: Sasha Levin <sashal@kernel.org>\nCc: Meagan Lloyd <meaganlloyd@linux.microsoft.com>\nCc: Rodolfo Giometti <giometti@enneenne.com>\nCc: Chris Packham <chris.packham@alliedtelesis.co.nz>\nFixes: 6cb0d8587b96 (\"rtc: ds1307: remove clear of oscillator stop flag (OSF) in probe\")\n---\n drivers/rtc/rtc-ds1307.c | 28 +++++++++++++++++-----------\n 1 file changed, 17 insertions(+), 11 deletions(-)", "diff": "diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c\nindex 7205c59ff729..edf81b975dec 100644\n--- a/drivers/rtc/rtc-ds1307.c\n+++ b/drivers/rtc/rtc-ds1307.c\n@@ -269,6 +269,16 @@ static int ds1307_get_time(struct device *dev, struct rtc_time *t)\n \t\tif (tmp & DS1338_BIT_OSF)\n \t\t\treturn -EINVAL;\n \t\tbreak;\n+\tcase ds_1337:\n+\tcase ds_1339:\n+\tcase ds_1341:\n+\tcase ds_3231:\n+\t\tret = regmap_read(ds1307->regmap, DS1337_REG_STATUS, &tmp);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\t\tif (tmp & DS1337_BIT_OSF)\n+\t\t\treturn -EINVAL;\n+\t\tbreak;\n \tcase ds_1340:\n \t\tif (tmp & DS1340_BIT_nEOSC)\n \t\t\treturn -EINVAL;\n@@ -279,13 +289,6 @@ static int ds1307_get_time(struct device *dev, struct rtc_time *t)\n \t\tif (tmp & DS1340_BIT_OSF)\n \t\t\treturn -EINVAL;\n \t\tbreak;\n-\tcase ds_1341:\n-\t\tret = regmap_read(ds1307->regmap, DS1337_REG_STATUS, &tmp);\n-\t\tif (ret)\n-\t\t\treturn ret;\n-\t\tif (tmp & DS1337_BIT_OSF)\n-\t\t\treturn -EINVAL;\n-\t\tbreak;\n \tcase ds_1388:\n \t\tret = regmap_read(ds1307->regmap, DS1388_REG_FLAG, &tmp);\n \t\tif (ret)\n@@ -380,14 +383,17 @@ static int ds1307_set_time(struct device *dev, struct rtc_time *t)\n \t\tregmap_update_bits(ds1307->regmap, DS1307_REG_CONTROL,\n \t\t\t\t DS1338_BIT_OSF, 0);\n \t\tbreak;\n+\tcase ds_1337:\n+\tcase ds_1339:\n+\tcase ds_1341:\n+\tcase ds_3231:\n+\t\tregmap_update_bits(ds1307->regmap, DS1337_REG_STATUS,\n+\t\t\t\t DS1337_BIT_OSF, 0);\n+\t\tbreak;\n \tcase ds_1340:\n \t\tregmap_update_bits(ds1307->regmap, DS1340_REG_FLAG,\n \t\t\t\t DS1340_BIT_OSF, 0);\n \t\tbreak;\n-\tcase ds_1341:\n-\t\tregmap_update_bits(ds1307->regmap, DS1337_REG_STATUS,\n-\t\t\t\t DS1337_BIT_OSF, 0);\n-\t\tbreak;\n \tcase ds_1388:\n \t\tregmap_update_bits(ds1307->regmap, DS1388_REG_FLAG,\n \t\t\t\t DS1388_BIT_OSF, 0);\n", "prefixes": [] }