summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/class.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename struct device_d to deviceSascha Hauer2023-01-101-1/+1
| | | | | | | | | | | | | The '_d' suffix was originally introduced in case we want to import Linux struct device as a separate struct into barebox. Over time it became clear that this won't happen, instead barebox struct device_d is basically the same as Linux struct device. Rename the struct name accordingly to make porting Linux code easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: add missing SPDX-License-IdentifierAhmad Fatoum2021-11-011-11/+1
| | | | | | | | | | | | | | | | | | | | This adds the suitable SPDX-License-Identifier to all files in drivers/ that previously lacked one. To aid manual inspection, following heuristics can be used: * No changes outside of comments/whitespace: git show -U0 HEAD | rg -v '^(@@|diff|index)|[-+]([-+]|//|#|[\s/]\*)' * -or-later come in pairs: git show --inter-hunk-context=19 HEAD | \ perl -0777 -F'/^@/gm' -ne 'for (@F) { @m = /later/g; print if @m & 1 }' Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20211030175632.2276077-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: Introduce dev_set_name()Andrey Smirnov2018-10-181-1/+1
| | | | | | | | Introduce dev_set_name() in order to hide implementation details of setting device's name so it'd be easier to change it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rtc: Fill in weekdays before setting timeSascha Hauer2016-01-071-1/+7
| | | | | | | | Some rtcs store the weekday. Make sure it's filled in correctly before passinf the time to the driver. This is easily done by converting it to seconds-since-epoch and back to struct rtc_time. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rtc: Check time for validity before passing it to the rtc driverSascha Hauer2016-01-071-0/+3
| | | | | | So that rtc drivers do not get invalid times. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add a simple rtc frameworkAntony Pavlov2014-07-311-0/+70
This patch adds a simple rtc framework for reading and setting board's RTC time. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>