Skip to content

Commit

Permalink
Merge tag 'rtc-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/abelloni/linux

Pull RTC updates from Alexandre Belloni:
 "Mostly documentation/comment changes and non urgent fixes.

   - add or fix SPDX identifiers

   - NXP pcf*: fix datasheet URLs

   - imxdi: add wakeup support

   - pcf2127: handle timestamp interrupts, this fixes a possible
     interrupt storm

   - bd70528: Drop BD70528 support"

* tag 'rtc-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (33 commits)
  rtc: pcf8523: rename register and bit defines
  rtc: pcf2127: handle timestamp interrupts
  rtc: at91sam9: Remove unnecessary offset variable checks
  rtc: s5m: Check return value of s5m_check_peding_alarm_interrupt()
  rtc: spear: convert to SPDX identifier
  rtc: tps6586x: convert to SPDX identifier
  rtc: tps80031: convert to SPDX identifier
  rtc: rtd119x: Fix format of SPDX identifier
  rtc: sc27xx: Fix format of SPDX identifier
  rtc: palmas: convert to SPDX identifier
  rtc: max6900: convert to SPDX identifier
  rtc: ds1374: convert to SPDX identifier
  rtc: au1xxx: convert to SPDX identifier
  rtc: pcf85063: Update the PCF85063A datasheet revision
  dt-bindings: rtc: ti,bq32k: take maintainership
  rtc: pcf8563: Fix the datasheet URL
  rtc: pcf85063: Fix the datasheet URL
  rtc: pcf2127: Fix the datasheet URL
  dt-bindings: rtc: ti,bq32k: Convert to json-schema
  dt-bindings: rtc: rx8900: Convert to YAML schema
  ...
  • Loading branch information
Linus Torvalds committed Jul 10, 2021
2 parents 6bce244 + 4aa90c0 commit de55409
Show file tree
Hide file tree
Showing 33 changed files with 440 additions and 601 deletions.
22 changes: 0 additions & 22 deletions Documentation/devicetree/bindings/rtc/epson,rx8900.txt

This file was deleted.

49 changes: 49 additions & 0 deletions Documentation/devicetree/bindings/rtc/epson,rx8900.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtc/epson,rx8900.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: EPSON RX8900 / Microcrystal RV8803 Real-Time Clock DT bindings

maintainers:
- Marek Vasut <marex@denx.de>

allOf:
- $ref: rtc.yaml#

properties:
compatible:
enum:
- epson,rx8900
- microcrystal,rv8803

reg:
maxItems: 1

epson,vdet-disable:
type: boolean
description: |
Disable voltage detector. Should be set if no backup battery is used.
trickle-diode-disable: true

required:
- compatible
- reg

additionalProperties: false

examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
rtc@32 {
compatible = "epson,rx8900";
reg = <0x32>;
epson,vdet-disable;
trickle-diode-disable;
};
};
28 changes: 0 additions & 28 deletions Documentation/devicetree/bindings/rtc/faraday,ftrtc010.txt

This file was deleted.

59 changes: 59 additions & 0 deletions Documentation/devicetree/bindings/rtc/faraday,ftrtc010.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtc/faraday,ftrtc010.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Faraday Technology FTRTC010 Real Time Clock

maintainers:
- Linus Walleij <linus.walleij@linaro.org>

description: |
This RTC appears in for example the Storlink Gemini family of SoCs.
properties:
compatible:
oneOf:
- const: faraday,ftrtc010
- items:
- const: cortina,gemini-rtc
- const: faraday,ftrtc010

resets:
maxItems: 1

reg:
maxItems: 1

interrupts:
maxItems: 1

clocks:
minItems: 2
items:
- description: PCLK clocks
- description: EXTCLK clocks. Faraday calls it CLK1HZ and says the clock
should be 1 Hz, but implementers actually seem to choose different
clocks here, like Cortina who chose 32768 Hz (a typical low-power clock).

clock-names:
items:
- const: "PCLK"
- const: "EXTCLK"

required:
- compatible

additionalProperties: false

examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
rtc@45000000 {
compatible = "cortina,gemini-rtc", "faraday,ftrtc010";
reg = <0x45000000 0x100>;
interrupts = <17 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&foo 0>, <&foo 1>;
clock-names = "PCLK", "EXTCLK";
};
9 changes: 9 additions & 0 deletions Documentation/devicetree/bindings/rtc/rtc-m41t80.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,19 @@ Optional properties:
clock name
- wakeup-source: Enables wake up of host system on alarm

Optional child node:
- clock: Provide this if the square wave pin is used as boot-enabled fixed clock.

Example:
rtc@68 {
compatible = "st,m41t80";
reg = <0x68>;
interrupt-parent = <&UIC0>;
interrupts = <0x9 0x8>;

clock {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <32768>;
};
};
49 changes: 49 additions & 0 deletions Documentation/devicetree/bindings/rtc/ti,bq32000.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtc/ti,bq32000.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: TI BQ32000 I2C Serial Real-Time Clock

maintainers:
- Alexandre Belloni <alexandre.belloni@bootlin.com>

allOf:
- $ref: rtc.yaml#

properties:
compatible:
const: ti,bq32000

reg:
const: 0x68

interrupts:
maxItems: 1

start-year: true

trickle-resistor-ohms:
enum: [ 1120, 20180 ]

trickle-diode-disable: true

required:
- compatible
- reg

additionalProperties: false

examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
bq32000: rtc@68 {
compatible = "ti,bq32000";
reg = <0x68>;
trickle-resistor-ohms = <1120>;
};
};
18 changes: 0 additions & 18 deletions Documentation/devicetree/bindings/rtc/ti,bq32k.txt

This file was deleted.

6 changes: 3 additions & 3 deletions drivers/rtc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -501,11 +501,11 @@ config RTC_DRV_M41T80_WDT
watchdog timer in the ST M41T60 and M41T80 RTC chips series.

config RTC_DRV_BD70528
tristate "ROHM BD70528, BD71815 and BD71828 PMIC RTC"
depends on MFD_ROHM_BD71828 || MFD_ROHM_BD70528 && (BD70528_WATCHDOG || !BD70528_WATCHDOG)
tristate "ROHM BD71815 and BD71828 PMIC RTC"
depends on MFD_ROHM_BD71828
help
If you say Y here you will get support for the RTC
block on ROHM BD70528, BD71815 and BD71828 Power Management IC.
block on ROHM BD71815 and BD71828 Power Management IC.

This driver can also be built as a module. If so, the module
will be called rtc-bd70528.
Expand Down
4 changes: 2 additions & 2 deletions drivers/rtc/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ static bool is_rtc_hctosys(struct rtc_device *rtc)
int size;
char name[NAME_SIZE];

size = scnprintf(name, NAME_SIZE, "rtc%d", rtc->id);
if (size > NAME_SIZE)
size = snprintf(name, NAME_SIZE, "rtc%d", rtc->id);
if (size >= NAME_SIZE)
return false;

return !strncmp(name, CONFIG_RTC_HCTOSYS_DEVICE, NAME_SIZE);
Expand Down
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-at91sam9.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ static int at91_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm)
return -EILSEQ;

memset(alrm, 0, sizeof(*alrm));
if (alarm != ALARM_DISABLED && offset != 0) {
if (alarm != ALARM_DISABLED) {
rtc_time64_to_tm(offset + alarm, tm);

dev_dbg(dev, "%s: %ptR\n", __func__, tm);
Expand Down
5 changes: 1 addition & 4 deletions drivers/rtc/rtc-au1xxx.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Au1xxx counter0 (aka Time-Of-Year counter) RTC interface driver.
*
* Copyright (C) 2008 Manuel Lauss <mano@roarinelk.homelinux.net>
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*/

/* All current Au1xxx SoCs have 2 counters fed by an external 32.768 kHz
Expand Down
Loading

0 comments on commit de55409

Please sign in to comment.