[v3,0/8] rtc: isl12022: battery backup voltage and clock support

Message ID 20230615105826.411953-1-linux@rasmusvillemoes.dk
Headers
Series rtc: isl12022: battery backup voltage and clock support |

Message

Rasmus Villemoes June 15, 2023, 10:58 a.m. UTC
  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
  

Comments

Rasmus Villemoes July 28, 2023, 2:31 p.m. UTC | #1
On 15/06/2023 12.58, Rasmus Villemoes wrote:
> 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.

Ping. Any chance these could be picked up so they make it for v6.6?

Rasmus
  
Rasmus Villemoes Aug. 3, 2023, 6:45 a.m. UTC | #2
On 28/07/2023 16.31, Rasmus Villemoes wrote:
> On 15/06/2023 12.58, Rasmus Villemoes wrote:
>> 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.
> 
> Ping. Any chance these could be picked up so they make it for v6.6?

Ping^2.

Rasmus
  
Rasmus Villemoes Aug. 9, 2023, 12:28 p.m. UTC | #3
On 03/08/2023 08.45, Rasmus Villemoes wrote:
> On 28/07/2023 16.31, Rasmus Villemoes wrote:
>> On 15/06/2023 12.58, Rasmus Villemoes wrote:
>>> 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.
>>
>> Ping. Any chance these could be picked up so they make it for v6.6?
> 
> Ping^2.

Ping^3.

Rasmus
  
Alexandre Belloni Aug. 15, 2023, 11:28 p.m. UTC | #4
On Thu, 15 Jun 2023 12:58:18 +0200, Rasmus Villemoes wrote:
> 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.
> 
> [...]

Applied, thanks!

[1/8] rtc: isl12022: remove wrong warning for low battery level
      commit: 4d6af37cafad69ff93f62db80d5a3daa9ac3223f
[2/8] dt-bindings: rtc: Move isil,isl12022 from trivial-rtc.yaml into own schema file
      commit: ffc005280a47030d16cbbf3105c75d3562dba5a8
[3/8] dt-bindings: rtc: isl12022: add bindings for battery alarm trip levels
      commit: 69b569c124ffa698de25d039018fe86313c46c84
[4/8] rtc: isl12022: add support for trip level DT binding
      commit: 2caeb566baabb65add7d99ca6d8bfd566fe91582
[5/8] rtc: isl12022: implement RTC_VL_READ ioctl
      commit: eccebd813874b748ac4e79a9fe4c7290117ad3be
[6/8] rtc: isl12022: trigger battery level detection during probe
      commit: a11b6c460620f7fb5fae4c3aee5a5ba2e1e1129b
[7/8] dt-bindings: rtc: isl12022: add #clock-cells property
      commit: ab246c897be0bdf981f776399ca62b5ec4b8138f
[8/8] rtc: isl12022: implement support for the #clock-cells DT property
      commit: d57d12db774820819d0e591548a56b5cfc95f82a

Best regards,