Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3108334pxb; Mon, 18 Oct 2021 08:22:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycr8nw9sEohoI4po7VdlbpduMIBlPU+A1US/uUYxD+hjZtR+k88wPvYcUPwDUkflOK6qwh X-Received: by 2002:a17:90b:1c92:: with SMTP id oo18mr48083319pjb.56.1634570551375; Mon, 18 Oct 2021 08:22:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634570551; cv=none; d=google.com; s=arc-20160816; b=bcW0XCsVWP3wzzriiqOxHILCRZUMKYu+UMFfvL0ub9BSqqfLaz+PlvEMdWS8jGDzcP x1PGm/gXwbfHCBrSgRlRQIJwZc36RqSE1iWoPEjYqeq2MuFDjd6IWRMZwx0ieMIsTkI+ FbiDtRhjTQ3QxuF4r+Nl/RD/070GMSPrkp+vlhHisNYvpxHA4piC8xx7s7b+fd3jjVDX pc6eTmKJAPt+1KKQXNnfZO2J8Ozc9i55ulYwsXyEEDmzFXlDQaGMF533z5WY3vBOOOoH NQG+C+Qm5ZybD6P7Y14ZZv2NmkZKo7vLKwzQ5j0F2w+dJvLR0S6zWN2rWHg4njPzXeB5 kI7g== 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 :message-id:date:subject:cc:to:from; bh=upppgg/Grt1sI1Cit8qIEAi785Rg6iRL1m8C8oSTvZs=; b=yAEhObbD2bHt35vW+kbbQDLNECVh2hXKEoKypHD4BxFjflVxxfFujRql8FBF7E7SMQ yQP/Y00zEOovGq/m+e9Bu5MzfZFCfYn5s9q7gLuG73Uzz2FrsSdGBxj90/NDl0BaZ+Vi BP48Nmsb3V4d0H7OnZhELu3bALCWyZYgAD83cYARH5JDahpVvmlnNyYBM8HxzMOloS9i c6PpcB35BnK11FTqdXl1g08WSPsL5sQ5fA+6fgaQvfSMp1g5juzOtZ+BsaAIFHbUuMLZ vq7finimOQYwDA5c5fbft0nZOTu2J+NUXXpW0Qk71568PXyXQumfUWsN6qsKQ9UlZv+R deOg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u24si6975417pgk.583.2021.10.18.08.22.18; Mon, 18 Oct 2021 08:22:31 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232953AbhJRPVu (ORCPT + 99 others); Mon, 18 Oct 2021 11:21:50 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:51941 "EHLO relay11.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232852AbhJRPVt (ORCPT ); Mon, 18 Oct 2021 11:21:49 -0400 Received: (Authenticated sender: alexandre.belloni@bootlin.com) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 3878B100004; Mon, 18 Oct 2021 15:19:37 +0000 (UTC) From: Alexandre Belloni To: Alessandro Zummo Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, Alexandre Belloni Subject: [PATCH v2 0/7] rtc: add new ioctl interface and BSM support Date: Mon, 18 Oct 2021 17:19:26 +0200 Message-Id: <20211018151933.76865-1-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This adds a new ioctl interface allowing to get and set extended parameters on RTCs. While its main goal is to support backup switch mode, it also intends to fix a long time issue. Until now, it was not possible to know what features were supported by an RTC before actually trying to make use of it and see that succeed or fail. In order to make tests more reliable and allow userspace to take the correct decision, the features are now exposed. Changes in v2: - Fix rv3032 direct mode value - return earlier once BSM is set Alexandre Belloni (7): rtc: add alarm related features rtc: add parameter ioctl rtc: expose correction feature rtc: add correction parameter rtc: add BSM parameter rtc: rv3028: add BSM support rtc: rv3032: allow setting BSM drivers/rtc/class.c | 3 ++ drivers/rtc/dev.c | 65 ++++++++++++++++++++++++++++++++++ drivers/rtc/rtc-rv3028.c | 74 ++++++++++++++++++++++++++++++++++++++ drivers/rtc/rtc-rv3032.c | 76 ++++++++++++++++++++++++++++++++++++++++ include/linux/rtc.h | 2 ++ include/uapi/linux/rtc.h | 31 +++++++++++++++- 6 files changed, 250 insertions(+), 1 deletion(-) -- 2.31.1