Andy Shevchenko
c8ae2735cb
rtc: isl12022: Drop unneeded OF guards and of_match_ptr()
...
Drop unneeded OF guards and of_match_ptr(). This allows use of
the driver with other types of firmware such as ACPI PRP0001 based
probing.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20230110140806.87432-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-22 21:06:30 +01:00
Andy Shevchenko
93219a4fb8
rtc: isl12022: Explicitly use __le16 type for ISL12022_REG_TEMP_L
...
We are reading 10-bit value in a 16-bit register in LE format.
Make this explicit by using __le16 type for it and corresponding
conversion function.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Acked-by: Rasmus Villemoes <linux@rasmusvillemoes.dk >
Link: https://lore.kernel.org/r/20230110140806.87432-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-22 21:06:30 +01:00
Andy Shevchenko
f525b210e9
rtc: isl12022: Get rid of unneeded private struct isl12022
...
First of all, the struct rtc_device pointer is kept in the managed
resources, no need to keep it outside (no users in the driver).
Second, replace private struct isl12022 with a regmap.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Acked-by: Rasmus Villemoes <linux@rasmusvillemoes.dk >
Link: https://lore.kernel.org/r/20230110140806.87432-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-22 21:06:29 +01:00
Javier Carrasco
fd9a6a1394
rtc: pcf85363: add support for the quartz-load-femtofarads property
...
The quartz oscillator load capacitance of the PCF85263 and PCF85363 can
be adjusted to 6 pF, 7 pF (default) and 12.5 pF with the CL[1:0] bits in
the oscillator control register (address 25h).
Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net >
Link: https://lore.kernel.org/r/20230215081815.3141776-3-javier.carrasco@wolfvision.net
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-22 15:31:01 +01:00
Javier Carrasco
1b2f85a8ba
dt-bindings: rtc: nxp,pcf8563: move pcf85263/pcf85363 to a dedicated binding
...
These Real Time Clocks are managed by the rtc-pcf85363 device driver,
which now supports the quartz-load-femtofarads property.
Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net >
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20230215081815.3141776-2-javier.carrasco@wolfvision.net
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-22 15:31:01 +01:00
Alexandre Belloni
a783c96261
rtc: allow rtc_read_alarm without read_alarm callback
...
.read_alarm is not necessary to read the current alarm because it is
recorded in the aie_timer and so rtc_read_alarm() will never call
rtc_read_alarm_internal() which is the only function calling the callback.
Reported-by: Zhipeng Wang <zhipeng.wang_1@nxp.com >
Reported-by: Marcel Ziswiler <marcel.ziswiler@toradex.com >
Fixes: 7ae41220ef ("rtc: introduce features bitfield")
Tested-by: Philippe Schenker <philippe.schenker@toradex.com >
Link: https://lore.kernel.org/r/20230214222754.582582-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-22 12:32:05 +01:00
Alexandre Belloni
2d433e9c89
rtc: rv3032: add ACPI support
...
The RV-3032 has been assigned the MCRY3032 ACPI ID.
Link: https://lore.kernel.org/r/20230214202716.565749-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-22 12:31:38 +01:00
Alexandre Belloni
b6ef5d4a02
rtc: rv3028: add ACPI support
...
The RV-3028 has been assigned the MCRY3028 ACPI ID.
Link: https://lore.kernel.org/r/20230214202653.565647-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-22 12:31:05 +01:00
Jacky Bai
eb7b85853c
rtc: bbnsm: Add the bbnsm rtc support
...
The BBNSM module includes a real time counter with alarm.
Add a RTC driver for this function.
Signed-off-by: Jacky Bai <ping.bai@nxp.com >
Reviewed-by: Peng Fan <peng.fan@nxp.com >
Link: https://lore.kernel.org/r/20230215024117.3357341-3-ping.bai@nxp.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-22 12:25:32 +01:00
Paul Cercueil
5ddfa148de
rtc: jz4740: Register clock provider for the CLK32K pin
...
On JZ4770 and JZ4780, the CLK32K pin is configurable. By default, it is
configured as a GPIO in input mode, and its value can be read through
GPIO PD14.
With this change, clients can now request the 32 kHz clock on the CLK32K
pin, through Device Tree. This clock is simply a pass-through of the
input oscillator's clock with enable/disable operations.
This will permit the WiFi/Bluetooth chip to work on the MIPS CI20 board,
which does source one of its clocks from the CLK32K pin.
Signed-off-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20230129120442.22858-5-paul@crapouillou.net
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-09 23:38:00 +01:00
Paul Cercueil
ff6fd3770e
rtc: jz4740: Use dev_err_probe()
...
Use dev_err_probe() where it makes sense to simplify a bit the code.
Signed-off-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20230129120442.22858-4-paul@crapouillou.net
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-09 23:38:00 +01:00
Paul Cercueil
d644b133f7
rtc: jz4740: Use readl_poll_timeout
...
Use readl_poll_timeout() from <iopoll.h> instead of using custom poll
loops.
The timeout settings are different, but that shouldn't be much of a
problem. Instead of polling 10000 times in a close loop, it polls for
one millisecond.
Signed-off-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20230129120442.22858-3-paul@crapouillou.net
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-09 23:37:59 +01:00
Paul Cercueil
4737a70352
dt-bindings: rtc: Add #clock-cells property
...
The RTC in the JZ4770 is compatible with the JZ4760, but has an extra
register that permits to configure the behaviour of the CLK32K pin. The
same goes for the RTC in the JZ4780.
With this change, the RTC node is now also a clock provider on these
SoCs, so a #clock-cells property is added.
Signed-off-by: Paul Cercueil <paul@crapouillou.net >
Reviewed-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230129120442.22858-2-paul@crapouillou.net
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-09 23:37:59 +01:00
Dmitry Torokhov
e8c9efd5d5
dt-bindings: rtc: moxart: use proper names for gpio properties
...
MOXA ART RTC driver has been switched to gpiod API and is now using
properly named properties for its gpios (with gpiolib implementing a
quirk to recognize legacy names). Change binding document to use
proper names as well.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
Link: https://lore.kernel.org/r/20230201054815.4112632-2-dmitry.torokhov@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-09 23:31:46 +01:00
Dmitry Torokhov
2985cda83b
rtc: moxart: switch to using gpiod API
...
Switch the driver from legacy gpio API that is deprecated to the newer
gpiod API that respects line polarities described in ACPI/DT.
This makes driver use standard property name for its gpios
("rtc-*-gpios" vs "gpios-rtc-*"), however there is a quirk in gpiolib
to also recognize legacy names and keep compatibility with older DTSes:
eaf1a29665 ("gpiolib: of: add a quirk for legacy names in MOXA ART
RTC").
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
Link: https://lore.kernel.org/r/20230201054815.4112632-1-dmitry.torokhov@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-09 23:31:46 +01:00
Johan Hovold
c94fb939e6
rtc: pm8xxx: drop error messages
...
For consistency with the rest of the driver, drop the last two error
messages for conditions that should only occur during development, if
ever.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20230202155448.6715-16-johan+linaro@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-09 23:23:44 +01:00
Johan Hovold
9e5a799138
rtc: pm8xxx: clean up local declarations
...
Clean up local declarations somewhat by using the reverse xmas style
consistently throughout.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: David Collins <quic_collinsd@quicinc.com >
Link: https://lore.kernel.org/r/20230202155448.6715-15-johan+linaro@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-09 23:23:44 +01:00
Johan Hovold
da862c3df6
rtc: pm8xxx: refactor read_time()
...
In preparation for adding support for setting the time by means of an
externally stored offset, refactor read_time() by adding a new helper
that can be used to retrieve the raw time as stored in the RTC.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20230202155448.6715-14-johan+linaro@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-09 23:23:44 +01:00
Johan Hovold
35d9c47292
rtc: pm8xxx: use u32 for timestamps
...
The PMIC RTC registers are 32-bit so explicitly use u32 rather than
unsigned long for timestamps to reflect the hardware.
This will also help avoid unintentional range extensions when adding
support for managing an external offset.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20230202155448.6715-13-johan+linaro@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-09 23:23:44 +01:00
Johan Hovold
3c3326394b
rtc: pm8xxx: clean up comments
...
Clean up the driver comments somewhat and remove obsolete, incorrect or
redundant ones.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: David Collins <quic_collinsd@quicinc.com >
Link: https://lore.kernel.org/r/20230202155448.6715-12-johan+linaro@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-09 23:23:44 +01:00
Johan Hovold
4727b58fc8
rtc: pm8xxx: rename alarm irq variable
...
Clean up the driver somewhat by renaming the driver-data alarm irq
variable by dropping the redundant "rtc" prefix.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: David Collins <quic_collinsd@quicinc.com >
Link: https://lore.kernel.org/r/20230202155448.6715-11-johan+linaro@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-09 23:23:44 +01:00
Johan Hovold
a375510efe
rtc: pm8xxx: rename struct device pointer
...
Rename the driver-data struct device pointer by dropping the "rtc"
prefix which is both redundant and misleading (as this is a pointer to
the platform device and not the rtc class device).
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: David Collins <quic_collinsd@quicinc.com >
Link: https://lore.kernel.org/r/20230202155448.6715-10-johan+linaro@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-09 23:23:44 +01:00
Johan Hovold
c996956fcc
rtc: pm8xxx: clean up time and alarm debugging
...
Clean up the time and alarm callback debugging by using a consistent and
succinct human-readable (i.e. non-raw) format.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: David Collins <quic_collinsd@quicinc.com >
Link: https://lore.kernel.org/r/20230202155448.6715-9-johan+linaro@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-09 23:23:44 +01:00
Johan Hovold
79dd75661e
rtc: pm8xxx: use unaligned le32 helpers
...
Use the unaligned le32 helpers instead of open coding when accessing the
time and alarm registers.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: David Collins <quic_collinsd@quicinc.com >
Link: https://lore.kernel.org/r/20230202155448.6715-8-johan+linaro@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-09 23:23:44 +01:00
Johan Hovold
f081b74c1c
rtc: pm8xxx: drop unused register defines
...
Drop the original register defines which have been unused since commit
c8d523a4b0 ("drivers/rtc/rtc-pm8xxx.c: rework to support pm8941 rtc").
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: David Collins <quic_collinsd@quicinc.com >
Link: https://lore.kernel.org/r/20230202155448.6715-7-johan+linaro@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-09 23:23:36 +01:00
Johan Hovold
cb9bb7b236
rtc: pm8xxx: return IRQ_NONE on errors
...
In the unlikely event that disabling the alarm and clearing the status
ever fails, return IRQ_NONE instead of IRQ_HANDLED.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20230202155448.6715-6-johan+linaro@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-09 23:17:56 +01:00
Johan Hovold
8d273f33fd
rtc: pm8xxx: drop bogus locking
...
Since commit c8d523a4b0 ("drivers/rtc/rtc-pm8xxx.c: rework to support
pm8941 rtc") which removed the shadow control register there is no need
for a driver lock.
Specifically, the rtc ops are serialised by rtc core and the interrupt
handler only unconditionally disables the alarm using the alarm_ctrl
register.
Note that since only the alarm enable bit of alarm_ctrl is used after
enabling the RTC at probe, the locking was not needed when doing open
coded read-modify-write cycles either.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: David Collins <quic_collinsd@quicinc.com >
Link: https://lore.kernel.org/r/20230202155448.6715-5-johan+linaro@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-09 23:17:56 +01:00
Johan Hovold
182c23bbfe
rtc: pm8xxx: use regmap_update_bits()
...
Switch to using regmap_update_bits() instead of open coding
read-modify-write accesses.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: David Collins <quic_collinsd@quicinc.com >
Link: https://lore.kernel.org/r/20230202155448.6715-4-johan+linaro@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-09 23:17:56 +01:00
Johan Hovold
eb24563183
rtc: pm8xxx: drop spmi error messages
...
Drop the unnecessary error messages after every spmi regmap access,
which are not expected to fail.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20230202155448.6715-3-johan+linaro@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-09 23:17:56 +01:00
Johan Hovold
c88db0eff9
rtc: pm8xxx: fix set-alarm race
...
Make sure to disable the alarm before updating the four alarm time
registers to avoid spurious alarms during the update.
Note that the disable needs to be done outside of the ctrl_reg_lock
section to prevent a racing alarm interrupt from disabling the newly set
alarm when the lock is released.
Fixes: 9a9a54ad7a ("drivers/rtc: add support for Qualcomm PMIC8xxx RTC")
Cc: stable@vger.kernel.org # 3.1
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: David Collins <quic_collinsd@quicinc.com >
Link: https://lore.kernel.org/r/20230202155448.6715-2-johan+linaro@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-09 23:17:56 +01:00
Heiner Kallweit
6a22a5dbc6
dt-bindings: rtc: Convert Amlogic Meson vrtc controller binding
...
Convert Amlogic Meson vrtc controller binding to yaml.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com >
Reviewed-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/d820d54b-d082-589a-621f-2795d885696a@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-09 23:15:04 +01:00
Sascha Hauer
e5c594233f
rtc: rv8803: invalidate date/time if alarm time is invalid
...
RTC core never calls rv8803_set_alarm with an invalid alarm time,
so if an invalid alarm time > 0 is set, external factors must have
corrupted the RTC's alarm time and possibly other registers.
Play it safe by marking the date/time invalid, so all registers are
reinitialized on a ->set_time.
This may cause existing setups to lose time if they so far set only
date/time, but ignored that the alarm registers had an invalid date
value, e.g.:
rtc rtc0: invalid alarm value: 2020-3-27 7:82:0
These systems will have their ->get_time return -EINVAL till
->set_time initializes the alarm value (and sets a new time).
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de >
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de >
Link: https://lore.kernel.org/r/20221123095527.2771434-3-s.hauer@pengutronix.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-09 23:01:49 +01:00
Ahmad Fatoum
1940979657
include/linux/bcd.h: provide bcd_is_valid() helper
...
bcd2bin(0x0A) happily returns 10, despite this being an invalid BCD
value. RTC drivers converting possibly corrupted BCD timestamps might
want to validate their input before calling bcd2bin().
Provide a macro to do so. Unlike bcd2bin and bin2bcd, out-of-line
versions are not implemented. Should the macro experience enough use,
this can be retrofitted.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de >
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de >
Link: https://lore.kernel.org/r/20221123095527.2771434-2-s.hauer@pengutronix.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-09 23:01:49 +01:00
Uwe Kleine-König
04596d4b3e
rtc: max8907: Drop unused i2c include
...
rtc-max8907 is a platform driver that doesn't use any symbol provided in
<linux/i2c.h>. So drop the include.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
Link: https://lore.kernel.org/r/20221219081440.1399791-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-01 09:13:35 +01:00
Alexandre Belloni
4bbdced5db
rtc: rx8010: use IRQ flags obtained from fwnode
...
Allow the IRQ type to be passed from the device tree if available as there
may be components changing the trigger type of the interrupt between the
RTC and the IRQ controller.
Link: https://lore.kernel.org/r/20230123200217.1236011-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-01 09:13:35 +01:00
Alexandre Belloni
11bfd6fceb
rtc: rv8803: use IRQ flags obtained from fwnode
...
Allow the IRQ type to be passed from the device tree if available as there
may be components changing the trigger type of the interrupt between the
RTC and the IRQ controller.
Link: https://lore.kernel.org/r/20230123200217.1236011-12-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-01 09:13:35 +01:00
Alexandre Belloni
c4b12f89f5
rtc: rv3032: use IRQ flags obtained from fwnode
...
Allow the IRQ type to be passed from the device tree if available as there
may be components changing the trigger type of the interrupt between the
RTC and the IRQ controller.
Link: https://lore.kernel.org/r/20230123200217.1236011-11-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-01 09:13:35 +01:00
Alexandre Belloni
bfff849f1d
rtc: rv3029c2: use IRQ flags obtained from fwnode
...
Allow the IRQ type to be passed from the device tree if available as there
may be components changing the trigger type of the interrupt between the
RTC and the IRQ controller.
Link: https://lore.kernel.org/r/20230123200217.1236011-10-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-01 09:13:35 +01:00
Alexandre Belloni
827009a8d3
rtc: pcf8563: use IRQ flags obtained from fwnode
...
Allow the IRQ type to be passed from the device tree if available as there
may be components changing the trigger type of the interrupt between the
RTC and the IRQ controller.
Link: https://lore.kernel.org/r/20230123200217.1236011-9-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-01 09:13:35 +01:00
Alexandre Belloni
dd7166c8ba
rtc: pcf85363: use IRQ flags obtained fromfwnode
...
Allow the IRQ type to be passed from the device tree if available as there
may be components changing the trigger type of the interrupt between the
RTC and the IRQ controller.
Link: https://lore.kernel.org/r/20230123200217.1236011-8-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-01 09:13:35 +01:00
Alexandre Belloni
3542db1d1f
rtc: pcf8523: use IRQ flags obtained from fwnode
...
Allow the IRQ type to be passed from the device tree if available as there
may be components changing the trigger type of the interrupt between the
RTC and the IRQ controller.
Link: https://lore.kernel.org/r/20230123200217.1236011-7-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-01 09:13:35 +01:00
Alexandre Belloni
7e815272c8
rtc: pcf85063: use IRQ flags obtained from fwnode
...
Allow the IRQ type to be passed from the device tree if available as there
may be components changing the trigger type of the interrupt between the
RTC and the IRQ controller.
Link: https://lore.kernel.org/r/20230123200217.1236011-6-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-01 09:13:35 +01:00
Alexandre Belloni
5434a4e472
rtc: pcf2123: use IRQ flags obtained from fwnode
...
Allow the IRQ type to be passed from the device tree if available as there
may be components changing the trigger type of the interrupt between the
RTC and the IRQ controller.
Link: https://lore.kernel.org/r/20230123200217.1236011-5-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-01 09:13:35 +01:00
Alexandre Belloni
f181987ef4
rtc: m41t80: use IRQ flags obtained from fwnode
...
Allow the IRQ type to be passed from the device tree if available as there
may be components changing the trigger type of the interrupt between the
RTC and the IRQ controller.
Link: https://lore.kernel.org/r/20230123200217.1236011-4-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-01 09:13:35 +01:00
Alexandre Belloni
badba1e5b1
rtc: hym8563: use IRQ flags obtained from fwnode
...
Allow the IRQ type to be passed from the device tree if available as there
may be components changing the trigger type of the interrupt between the
RTC and the IRQ controller.
Link: https://lore.kernel.org/r/20230123200217.1236011-3-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-01 09:13:35 +01:00
Alexandre Belloni
37abc36ed2
rtc: ab-eoz9: use IRQ flags obtained from fwnode
...
Allow the IRQ type to be passed from the device tree if available as there
may be components changing the trigger type of the interrupt between the
RTC and the IRQ controller.
Link: https://lore.kernel.org/r/20230123200217.1236011-2-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-02-01 09:13:35 +01:00
Hugo Villeneuve
947e8876c0
dt-bindings: rtc: pcf2127: remove pca/pcf2129 from trivial RTC devices list
...
pca/pcf2129 devices can also have the 'reset-source' property, so
remove them from the trivial RTC devices list.
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com >
Reviewed-by: Bruno Thomsen <bruno.thomsen@gmail.com >
Reviewed-by: Rob Herring <robh@kernel.org >
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20221220152237.1125178-1-hugo@hugovil.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-01-26 00:34:46 +01:00
Doug Berger
24304a8715
rtc: brcmstb-waketimer: allow use as non-wake alarm
...
The wake interrupt only fires when the system is in a suspend
state. Fortunately we have another interrupt that fires in a
non-suspend state at the L2 controller UPG_AUX_AON. Add support
for this interrupt line so we can use the alarm in a non-wake
context.
Signed-off-by: Doug Berger <opendmb@gmail.com >
Acked-by: Florian Fainelli <f.fainelli@gmail.com >
Link: https://lore.kernel.org/r/20230124201430.2502371-3-opendmb@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-01-25 18:54:56 +01:00
Doug Berger
6cc7a8262b
dt-bindings: rtc: brcm,brcmstb-waketimer: add alarm interrupt
...
A second interrupt can optionally be specified for this device
to be used for generating RTC alarm interrupts.
Signed-off-by: Doug Berger <opendmb@gmail.com >
Acked-by: Florian Fainelli <f.fainelli@gmail.com >
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20230124201430.2502371-2-opendmb@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-01-25 18:54:55 +01:00
Samuel Holland
344f4030f6
rtc: sun6i: Always export the internal oscillator
...
On all variants of the hardware, the internal oscillator is one possible
parent for the AR100 clock. It needs to be exported so we can model that
relationship correctly in the devicetree.
Fixes: c56afc1844 ("rtc: sun6i: Expose internal oscillator through device tree")
Signed-off-by: Samuel Holland <samuel@sholland.org >
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com >
Link: https://lore.kernel.org/r/20221229215319.14145-1-samuel@sholland.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2023-01-24 00:46:58 +01:00