Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp940007rwd; Thu, 15 Jun 2023 04:23:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Py/NKGzH3QQikO/rIC8qd+jmgLzdOFj5iCi68CZbtydpJvkzEqBgrt57KLJ2sZqVTQ8mr X-Received: by 2002:a17:907:70a:b0:96f:a935:8997 with SMTP id xb10-20020a170907070a00b0096fa9358997mr19750580ejb.12.1686828227395; Thu, 15 Jun 2023 04:23:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686828227; cv=none; d=google.com; s=arc-20160816; b=gNg5+XU8iN4N1Idj3hnlS9x0T5bY2plONoU2zRZx8hK/SBjgM1B/fieQpYtbuS+gAT 1rTQOhNTo4KB5r3/qkKswPFaM1fu6JyFxHZBB6VveygC2iR+rvCnsg3jF0R+zdVKdKLW da015VXG9YvbwcmBX9a9Nruo5DSkKxuJCGP2Anj35fBuLHxpnytvZVcNKYv+MugMPyoq RGXUKFrTs65uM2yp0+hbBDsXfDh40agoerEFAzDuGDCoR7TEyUopjbCrqs7/y3I8TRkP AKWqSOr5glg/4DHEyHk91AhcvejFvkvVyI8hBEEwTgAqrzhJhNrc8ar4l/UlgzFheorN wy5A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JeevWcsSXn1CFxZQsMjVguw/C1vstGsj3+NDcrpF2Zk=; b=aCvSensNdKmuwY3rZTYcuE+f5sQyaaPtoqR+57tHfzDJMd1GU85/8rZvXbilfZSeOG 1XUXVlnnpnYGK75mpvLaNLifbMZhXUnFR1DrBg8KZvHTODMUniAODLSvYTTY1c1pxwP0 9m5MyXoKx1NWGUskfLfRZeEt0IDo/WlDHr45M41pekDOwQz/H5Gh5fILhb+FU0gAtgKA M4i7k6O1Lt8JynPfXmaKzIQvn80GV9Ob/Ek74AQZlLpoPiMo/GEZUf2IigQUZ5wIrPgQ PwPeKiqI9XaduVy34l5/bAv02JLIouH98eaKDvz0d7+qXj5ObZ/e8VrTvdlwNjzNrtXQ 1DBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=U7twVLe8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kg12-20020a17090776ec00b009788d85f570si9906667ejc.631.2023.06.15.04.23.22; Thu, 15 Jun 2023 04:23:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=U7twVLe8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245607AbjFOK6g (ORCPT + 99 others); Thu, 15 Jun 2023 06:58:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343692AbjFOK6d (ORCPT ); Thu, 15 Jun 2023 06:58:33 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 824852721 for ; Thu, 15 Jun 2023 03:58:32 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-4f76a4c211dso2130193e87.3 for ; Thu, 15 Jun 2023 03:58:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; t=1686826710; x=1689418710; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JeevWcsSXn1CFxZQsMjVguw/C1vstGsj3+NDcrpF2Zk=; b=U7twVLe8SYHDAxvYUBWTfZuehTCtUiQG/9WHCrwVRdOwslE5ZuCSc7VA9iMSRP1eHK dgJUbAFyr1ylgdobeRTMvFgPDYCNqCqgRLIfr7/gKm1GZLSm71v+C69hTpLVNGOO0Uil rLv+B3hc9H6aqTkDT5AZIUIhVjmLcXIMJ9V3Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686826710; x=1689418710; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JeevWcsSXn1CFxZQsMjVguw/C1vstGsj3+NDcrpF2Zk=; b=ckjPXRDDeoXjXmbZUa83r4g+f9OwPFhlEsuTep3cj7vix5Ie7nPVbJRcC244H6e+lU PPIxPFHmkLrD6qI2X66JM44tVWmG5+tp4cTyKzEYj4QSdpOSDixM1T0wFRET+rbMuOQD rGzsoN+/W/I/8hUOrzyExmzsohZWK4fvnWsp5/hNoRZ7aFXy4IFJl119P05teqRdX3Bp e63kl1vmH5lBJR0t+DV3fI1AISg2EcwRK9UghpgOHTuBrZk/NK5LGmravmPVkS14q0p/ ums4DcihCt+9fqajT6Se9aEVLiI6pkN7QviWSiBopLX6jUtzuhveyT9eouPpgfrO8zXw rHYw== X-Gm-Message-State: AC+VfDxlHhVt21UEeETBaCYdj9px3mGLZPuBT9do2GR8D8oIoZYHIvST LvtDQpaetVQjtA34jFDHS2LHyA== X-Received: by 2002:a19:f20e:0:b0:4f6:54f1:ea36 with SMTP id q14-20020a19f20e000000b004f654f1ea36mr9743158lfh.43.1686826710616; Thu, 15 Jun 2023 03:58:30 -0700 (PDT) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id h7-20020ac25967000000b004f13f4ec267sm165364lfp.186.2023.06.15.03.58.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jun 2023 03:58:30 -0700 (PDT) From: Rasmus Villemoes To: Alessandro Zummo , Alexandre Belloni Cc: Andy Shevchenko , devicetree@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-rtc@vger.kernel.org, Rasmus Villemoes , linux-kernel@vger.kernel.org Subject: [PATCH v3 0/8] rtc: isl12022: battery backup voltage and clock support Date: Thu, 15 Jun 2023 12:58:18 +0200 Message-Id: <20230615105826.411953-1-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230612113059.247275-1-linux@rasmusvillemoes.dk> References: <20230612113059.247275-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The current handling of the low-battery bits in the status register is wrong. The first six patches fix that and implement proper support for RTC_VL_READ. The last two patches allow describing the isl12022 as a clock provider, for now just as a fixed 32kHz clock. They are also tangentially related to the backup battery, in that when the isl12022 is not used as a clock source, one can save some power consumption in battery mode by setting the FOx bits to 0. v3 changes: Patch 2: move the allOf block further down, add R-b [Krzysztof] Patch 3: change to a single property with two values [Krzysztof] Patch 4: adjust implementation accordingly Patch 5: move initialization of 'user' variable inside switch case, use 'if (ret)' instead of 'if (ret < 0)' for consistency within the driver [Andy] Patch 7: semantically identical to v2, just context changes due to changes in 2/8 and 3/8 Patch 8: only do the clock registration when CONFIG_COMMON_CLK [kernel test robot] v2: https://lore.kernel.org/lkml/20230613130011.305589-1-linux@rasmusvillemoes.dk/ v1: https://lore.kernel.org/lkml/20230612113059.247275-1-linux@rasmusvillemoes.dk/ Rasmus Villemoes (8): rtc: isl12022: remove wrong warning for low battery level dt-bindings: rtc: Move isil,isl12022 from trivial-rtc.yaml into own schema file dt-bindings: rtc: isl12022: add bindings for battery alarm trip levels rtc: isl12022: add support for trip level DT binding rtc: isl12022: implement RTC_VL_READ ioctl rtc: isl12022: trigger battery level detection during probe dt-bindings: rtc: isl12022: add #clock-cells property rtc: isl12022: implement support for the #clock-cells DT property .../bindings/rtc/intersil,isl12022.yaml | 64 +++++++++ .../devicetree/bindings/rtc/trivial-rtc.yaml | 2 - drivers/rtc/rtc-isl12022.c | 126 +++++++++++++++++- 3 files changed, 184 insertions(+), 8 deletions(-) create mode 100644 Documentation/devicetree/bindings/rtc/intersil,isl12022.yaml -- 2.37.2