Chuhong Yuan
94303f8930
rtc: brcmstb-waketimer: add missed clk_disable_unprepare
...
This driver forgets to disable and unprepare clock when remove.
Add a call to clk_disable_unprepare to fix it.
Fixes: c4f07ecee2
("rtc: brcmstb-waketimer: Add Broadcom STB wake-timer")
Signed-off-by: Chuhong Yuan <hslester96@gmail.com >
Acked-by: Florian Fainelli <f.fainelli@gmail.com >
Link: https://lore.kernel.org/r/20191105160043.20018-1-hslester96@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-11-08 16:14:09 +01:00
Alexandre Belloni
0e8431379e
rtc: cros-ec: let the core handle rtc range
...
Let the rtc core check the date/time against the RTC range.
Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Link: https://lore.kernel.org/r/20191016201414.30934-2-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-11-08 16:14:09 +01:00
Alexandre Belloni
4fc0d13f80
rtc: cros-ec: remove superfluous error message
...
The RTC core now has error messages in case of registration failure, there
is no need to have other messages in the drivers.
Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Link: https://lore.kernel.org/r/20191016201414.30934-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-11-08 16:14:09 +01:00
Alexandre Belloni
d5e6dd9f5c
rtc: sirfsoc: remove .remove
...
dpm_sysfs_remove() and device_pm_remove() are already called by
device_del() on device removal so there is no need to call
device_init_wakeup(dev, false) from the driver and it allows to remove the
.remove callback.
Link: https://lore.kernel.org/r/20191021155806.3625-3-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-11-08 16:14:09 +01:00
Alexandre Belloni
c202ec09ce
rtc: sc27xx: remove .remove
...
dpm_sysfs_remove() and device_pm_remove() are already called by
device_del() on device removal so there is no need to call
device_init_wakeup(dev, false) from the driver and it allows to remove the
.remove callback.
Link: https://lore.kernel.org/r/20191021155806.3625-4-alexandre.belloni@bootlin.com
Reviewed-by: Baolin Wang <baolin.wang@linaro.org >
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-11-08 16:14:09 +01:00
Alexandre Belloni
aef069a277
rtc: lpc32xx: remove .remove
...
dpm_sysfs_remove() and device_pm_remove() are already called by
device_del() on device removal so there is no need to call
device_init_wakeup(dev, false) from the driver and it allows to remove the
.remove callback.
Link: https://lore.kernel.org/r/20191021155806.3625-2-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-11-08 16:14:09 +01:00
Alexandre Belloni
daa2695fcf
rtc: ab-b5ze-s3: remove .remove
...
dpm_sysfs_remove() and device_pm_remove() are already called by
device_del() on device removal so there is no need to call
device_init_wakeup(dev, false) from the driver and it allows to remove the
.remove callback.
Link: https://lore.kernel.org/r/20191021155806.3625-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-11-08 16:14:09 +01:00
Alexandre Belloni
3e74ddaa7c
rtc: disallow update interrupts when time is invalid
...
Never enable update interrupts when the time set on the rtc is invalid.
In that case, also avoid enabling the emulation because it will fail for
the same reason.
Link: https://lore.kernel.org/r/20191021155631.3342-2-alexandre.belloni@bootlin.com
Link: https://lore.kernel.org/r/CA+ASDXMarBG5C1Kz42B9i_iVZ1=i6GgH9Yja2cdmSueKD_As_g@mail.gmail.com
Reported-by: Jeffy Chen <jeffy.chen@rock-chips.com >
Reported-by: Brian Norris <briannorris@chromium.org >
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-11-08 16:14:09 +01:00
Alexandre Belloni
7e7c005b4b
rtc: disable uie before setting time and enable after
...
When setting the time in the future with the uie timer enabled,
rtc_timer_do_work will loop for a while because the expiration of the uie
timer was way before the current RTC time and a new timer will be enqueued
until the current rtc time is reached.
If the uie timer is enabled, disable it before setting the time and enable
it after expiring current timers (which may actually be an alarm).
This is the safest thing to do to ensure the uie timer is still
synchronized with the RTC, especially in the UIE emulation case.
Reported-by: syzbot+08116743f8ad6f9a6de7@syzkaller.appspotmail.com
Fixes: 6610e0893b
("RTC: Rework RTC code to use timerqueue for events")
Link: https://lore.kernel.org/r/20191020231320.8191-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-11-08 16:14:09 +01:00
Alexandre Belloni
bb451661db
rtc: fsl-ftm-alarm: avoid struct rtc_time conversions
...
Directly call ktime_get_real_seconds instead of converting the result to a
struct rtc_time and then back to a time64_t.
Link: https://lore.kernel.org/r/20191016201223.30568-4-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-11-08 16:14:09 +01:00
Alexandre Belloni
9323e9631c
rtc: fsl-ftm-alarm: switch to rtc_time64_to_tm/rtc_tm_to_time64
...
Call the 64bit versions of rtc_tm time conversion to avoid the y2038 issue.
Link: https://lore.kernel.org/r/20191016201223.30568-3-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-11-08 16:14:08 +01:00
Alexandre Belloni
db2a4af115
rtc: fsl-ftm-alarm: switch to ktime_get_real_seconds
...
The driver drops the nanoseconds part of the timespec64, there is no need
to call ktime_get_real_ts64.
Link: https://lore.kernel.org/r/20191016201223.30568-2-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-11-08 16:14:08 +01:00
Josef Friedl
47e568129b
rtc: mt6397: add compatible for mt6323
...
use mt6397 rtc driver also for mt6323 but with different
base/size see "mfd: mt6323: add mt6323 rtc+pwrc"
Signed-off-by: Josef Friedl <josef.friedl@speed.at >
Signed-off-by: Frank Wunderlich <frank-w@public-files.de >
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Signed-off-by: Lee Jones <lee.jones@linaro.org >
2019-10-24 09:03:53 +01:00
Josef Friedl
851b87148a
rtc: mt6397: improvements of rtc driver
...
- use regmap_read_poll_timeout to drop while-loop
- use devm-api to drop remove-callback
Suggested-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Signed-off-by: Josef Friedl <josef.friedl@speed.at >
Signed-off-by: Frank Wunderlich <frank-w@public-files.de >
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Signed-off-by: Lee Jones <lee.jones@linaro.org >
2019-10-24 09:03:49 +01:00
Josef Friedl
c512995ce9
rtc: mt6397: move some common definitions into rtc.h
...
move code to separate header-file to reuse definitions later
in poweroff-driver (drivers/power/reset/mt6323-poweroff.c)
Suggested-by: Frank Wunderlich <frank-w@public-files.de >
Signed-off-by: Josef Friedl <josef.friedl@speed.at >
Signed-off-by: Frank Wunderlich <frank-w@public-files.de >
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Signed-off-by: Lee Jones <lee.jones@linaro.org >
2019-10-24 09:03:43 +01:00
Arnd Bergmann
b6dfb2477f
compat_ioctl: move WDIOC handling into wdt drivers
...
All watchdog drivers implement the same set of ioctl commands, and
fortunately all of them are compatible between 32-bit and 64-bit
architectures.
Modern drivers always go through drivers/watchdog/wdt.c as an abstraction
layer, but older ones implement their own file_operations on a character
device for this.
Move the handling from fs/compat_ioctl.c into the individual drivers.
Note that most of the legacy drivers will never be used on 64-bit
hardware, because they are for an old 32-bit SoC implementation, but
doing them all at once is safer than trying to guess which ones do
or do not need the compat_ioctl handling.
Reviewed-by: Guenter Roeck <linux@roeck-us.net >
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
2019-10-23 17:23:46 +02:00
Arnd Bergmann
076ff65862
compat_ioctl: move rtc handling into drivers/rtc/dev.c
...
We no longer need the rtc compat handling to be in common code, now that
all drivers are either moved to the rtc-class framework, or (rarely)
exist in drivers/char for architectures without compat mode (m68k,
alpha and ia64, respectively).
I checked the list of ioctl commands in drivers, and the ones that are
not already handled are all compatible, again with the one exception of
m68k driver, which implements RTC_PLL_GET and RTC_PLL_SET, but has no
compat mode.
Unlike earlier versions of this patch, I'm now adding a separate
compat_ioctl handler that takes care of RTC_IRQP_READ32/RTC_IRQP_SET32
and treats all other commands as compatible, leaving the native
behavior unchanged.
The old conversion handler also deals with RTC_EPOCH_READ and
RTC_EPOCH_SET, which are not handled in rtc-dev.c but only in a single
device driver (rtc-vr41xx), so I'm adding the compat version in the same
place. I don't expect other drivers to need those commands in the future.
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Reviewed-by: Ben Hutchings <ben.hutchings@codethink.co.uk >
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
---
v4: handle RTC_EPOCH_SET32 in rtc_dev_compat_ioctl
v3: handle RTC_IRQP_READ32/RTC_IRQP_SET32 in rtc_dev_compat_ioctl
v2: merge compat handler into ioctl function to avoid the
compat_alloc_user_space() roundtrip, based on feedback
from Al Viro.
2019-10-23 17:23:43 +02:00
Martin Hundebøll
62409933b8
rtc: pcf2127: handle boot-enabled watchdog feature
...
Linux should handle when the pcf2127 watchdog feature is enabled by the
bootloader. This is done by checking the watchdog timer value during
init, and set the WDOG_HW_RUNNING flag if the value differs from zero.
Signed-off-by: Martin Hundebøll <martin@geanix.com >
Acked-by: Guenter Roeck <linux@roeck-us.net >
Link: https://lore.kernel.org/r/20191021080838.2789-1-martin@geanix.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-21 10:24:18 +02:00
Parthiban Nallathambi
f583c341a5
rtc: rv3028: add clkout support
...
rv3028 provides clkout (enabled by default). Add clkout
to clock framework source and control from device tree for
variable frequency with enable and disable functionality.
Signed-off-by: Parthiban Nallathambi <pn@denx.de >
Link: https://lore.kernel.org/r/20191018100425.1687979-1-pn@denx.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-19 23:16:57 +02:00
Alexandre Belloni
05df557285
rtc: ds1343: cleanup .remove
...
It is not necessary to call device_init_wakeup(dev, false) in .remove as
device_del will take care of that. It is also not necessary to
devm_free_irq. Finally, dev_pm_clear_wake_irq can be called
unconditionally.
Link: https://lore.kernel.org/r/20191019204941.6203-9-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-19 22:56:11 +02:00
Alexandre Belloni
0680a6cdab
rtc: ds1343: rework interrupt handling
...
Rework the interrupt handling to avoid caching the values as the core is
already doing that. The core also always ensures the rtc_time passed for
the alarm is fully populated.
The only trick is in read_alarm where status needs to be read before the
alarm registers to ensure the potential irq is not cleared.
Link: https://lore.kernel.org/r/20191019204941.6203-8-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-19 22:56:09 +02:00
Alexandre Belloni
a986429095
rtc: ds1343: remove unnecessary mutex
...
Use rtc_lock and rtc_unlock to lock the rtc from the interrupt handler.
This removes the need for a driver specific lock.
Link: https://lore.kernel.org/r/20191019204941.6203-7-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-19 22:56:07 +02:00
Alexandre Belloni
ce0fd9db65
rtc: ds1343: check regmap_read return value
...
Check whether regmap_read fails before continuing in the sysfs .show
callbacks.
Link: https://lore.kernel.org/r/20191019204941.6203-6-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-19 22:56:05 +02:00
Alexandre Belloni
ac08888b25
rtc: ds1343: use regmap_update_bits for glitch filter
...
Use regmap_update_bits to update DS1343_CONTROL_REG in a race free manner
when setting the glitch filter.
Link: https://lore.kernel.org/r/20191019204941.6203-5-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-19 22:56:03 +02:00
Alexandre Belloni
580daaf43a
rtc: ds1343: use rtc_add_group
...
Use rtc_add_group to add the sysfs group in a race free manner.
This has the side effect of moving the files to their proper location.
Link: https://lore.kernel.org/r/20191019204941.6203-4-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-19 22:56:01 +02:00
Alexandre Belloni
f308b68202
rtc: ds1343: use burst write to set time
...
To avoid possible race condition, use regmap_bulk_write to write all the
date/time registers at once instead of sequentially.
Link: https://lore.kernel.org/r/20191019204941.6203-3-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-19 22:56:00 +02:00
Alexandre Belloni
8c9a88fae2
rtc: ds1343: remove dead code
...
RTC_SET_CHARGE doesn't exist, the ioctl code is never used.
Link: https://lore.kernel.org/r/20191019204941.6203-2-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-19 22:55:58 +02:00
Alexandre Belloni
21783322fe
rtc: ds1343: set range
...
This is a standard BCD rtc with a useless century bit (no leap year
correction after 2099).
Link: https://lore.kernel.org/r/20191019204941.6203-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-19 22:55:56 +02:00
Alexandre Belloni
1a064850b5
rtc: vt8500: let the core handle rtc range
...
Let the rtc core check the date/time against the RTC range.
Link: https://lore.kernel.org/r/20191016201626.31309-5-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-19 22:33:15 +02:00
Alexandre Belloni
d8bced4b72
rtc: vt8500: convert to devm_rtc_allocate_device
...
This allows further improvement of the driver.
Link: https://lore.kernel.org/r/20191016201626.31309-4-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-19 22:33:13 +02:00
Alexandre Belloni
3e7d639720
rtc: vt8500: remove superfluous error message
...
The RTC core now has error messages in case of registration failure, there
is no need to have other messages in the drivers.
Link: https://lore.kernel.org/r/20191016201626.31309-3-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-19 22:33:11 +02:00
Alexandre Belloni
e979d0490a
rtc: vt8500: remove useless label
...
err_return doesn't do anything special, simply return instead of goto.
Link: https://lore.kernel.org/r/20191016201626.31309-2-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-19 22:33:09 +02:00
Alexandre Belloni
9e8a968fe3
rtc: s35390a: set range
...
This is a standard BCD RTC that will fail in 2100.
Link: https://lore.kernel.org/r/20191016200848.30246-2-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-19 22:33:05 +02:00
Alexandre Belloni
ed6c6dfdbe
rtc: s35390a: convert to devm_rtc_allocate_device
...
This allows further improvement of the driver and removes the need to
forward declare s35390a_driver.
Link: https://lore.kernel.org/r/20191016200848.30246-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-19 22:33:03 +02:00
Alexandre Belloni
cb0b97d682
rtc: meson-vrtc: move config option to proper location
...
The correct location for this option is under platform driver, not i2c
drivers.
Link: https://lore.kernel.org/r/20191014155840.22554-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-16 10:39:00 +02:00
Thomas Bogendoerfer
299b610117
rtc: ds1685: add indirect access method and remove plat_read/plat_write
...
SGI Octane (IP30) doesn't have RTC register directly mapped into CPU
address space, but accesses RTC registers with an address and data
register. This is now supported by additional access functions, which
are selected by a new field in platform data. Removed plat_read/plat_write
since there is no user and their usage could introduce lifetime issue,
when functions are placed in different modules.
Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de >
Acked-by: Joshua Kinard <kumba@gentoo.org >
Reviewed-by: Joshua Kinard <kumba@gentoo.org >
Link: https://lore.kernel.org/r/20191014214621.25257-1-tbogendoerfer@suse.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-16 10:39:00 +02:00
Thomas Bogendoerfer
af818031f4
rtc: ds1685: use devm_platform_ioremap_resource helper
...
Simplify ioremapping of registers by using devm_platform_ioremap_resource.
Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de >
Acked-by: Joshua Kinard <kumba@gentoo.org >
Link: https://lore.kernel.org/r/20191011150546.9186-2-tbogendoerfer@suse.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-14 17:49:22 +02:00
Thomas Bogendoerfer
9e420d7f12
rts: ds1685: remove not needed fields from private struct
...
A few of the fields in struct ds1685_priv aren't needed at all,
so we can remove it.
Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de >
Acked-by: Joshua Kinard <kumba@gentoo.org >
Link: https://lore.kernel.org/r/20191011150546.9186-1-tbogendoerfer@suse.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-14 17:49:21 +02:00
Srinivas Goud
d53bf24db3
rtc: xilinx: Fix calibval variable type
...
This patch fixes the warnings reported by static code analysis.
Updated calibval variable type to unsigned type from signed.
Signed-off-by: Srinivas Goud <srinivas.goud@xilinx.com >
Signed-off-by: Michal Simek <michal.simek@xilinx.com >
Link: https://lore.kernel.org/r/20765c4c27aa92c75426b82fd2815ebef6471492.1570544738.git.michal.simek@xilinx.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-14 17:49:19 +02:00
Nick Crews
9aa0d0be38
rtc: wilco-ec: Handle reading invalid times
...
If the RTC HW returns an invalid time, the rtc_year_days()
call would crash. This patch adds error logging in this
situation, and removes the tm_yday and tm_wday calculations.
These fields should not be relied upon by userspace
according to man rtc, and thus we don't need to calculate
them.
Signed-off-by: Nick Crews <ncrews@chromium.org >
Reviewed-by: Daniel Campello <campello@chromium.org >
Link: https://lore.kernel.org/r/20191004142608.170159-1-ncrews@chromium.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-14 17:49:17 +02:00
Alexandre Belloni
147dae76db
rtc: ds1347: handle century register
...
The DS1347 can handle years from 0 to 9999, add century register support.
Link: https://lore.kernel.org/r/20191007134724.15505-10-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-07 15:49:38 +02:00
Alexandre Belloni
860c45b56d
rtc: ds1347: use regmap_update_bits
...
Use regmap_update_bits instead of open coding. Also add proper error
handling.
Link: https://lore.kernel.org/r/20191007134724.15505-9-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-07 15:49:36 +02:00
Alexandre Belloni
d9dcfa5f70
rtc: ds1347: properly handle oscillator failures
...
The comment in the probe function stating that it disables oscillator stop
detection and glitch filtering is incorrect as it sets bits 3 and 4 while
it should be setting 5 and 6 to achieve that. Then, it is safe to assume
that the oscillator failure detection is actually enabled.
Properly handle oscillator failures by returning -EINVAL when the time and
date are know to be incorrect and reset the flag when the time is set.
Link: https://lore.kernel.org/r/20191007134724.15505-8-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-07 15:49:35 +02:00
Alexandre Belloni
3ce20a23e2
rtc: ds1347: set range
...
The DS1347 handle dates from year 0000 to 9999. Leap years are claimed to
be handled correctly in the datasheet.
Link: https://lore.kernel.org/r/20191007134724.15505-7-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-07 15:49:33 +02:00
Alexandre Belloni
554692d56d
rtc: ds1347: convert to devm_rtc_allocate_device
...
This allows further improvement of the driver.
Link: https://lore.kernel.org/r/20191007134724.15505-6-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-07 15:49:31 +02:00
Alexandre Belloni
088443c79c
rtc: ds1347: mask ALM OUT when reading time
...
Bit 7 of the minutes registers is ALM OUT. It indicates an alarm fired.
Mask it out when reading the time.
Link: https://lore.kernel.org/r/20191007134724.15505-5-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-07 15:49:29 +02:00
Alexandre Belloni
ff7f9e0533
rtc: ds1347: simplify getting .driver_data
...
Get 'driver_data' from 'struct device' directly. Going via spi_device is an
unnecessary step.
Link: https://lore.kernel.org/r/20191007134724.15505-4-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-07 15:49:28 +02:00
Alexandre Belloni
1d84eca6d5
rtc: ds1347: remove useless read
...
DS1347_SECONDS_REG is read at probe time but the value is simply discarded.
Remove that useless read.
Link: https://lore.kernel.org/r/20191007134724.15505-3-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-07 15:49:26 +02:00
Alexandre Belloni
590062f479
rtc: ds1347: remove verbose messages
...
Printing debugging (and opaque) information is not useful and only clutters
the boot log. Remove those messages.
Link: https://lore.kernel.org/r/20191007134724.15505-2-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-07 15:49:24 +02:00
Stephen Boyd
cd7629b27b
rtc: armada38x: Use of_device_get_match_data()
...
Use the more modern API to get the match data out of the of match table.
This saves some code, lines, and nicely avoids referencing the match
table when it is undefined with configurations where CONFIG_OF=n.
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Geert Uytterhoeven <geert@linux-m68k.org >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: Andrew Lunn <andrew@lunn.ch >
Cc: Gregory Clement <gregory.clement@bootlin.com >
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com >
Cc: Alessandro Zummo <a.zummo@towertech.it >
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com >
Cc: Rob Herring <robh+dt@kernel.org >
Cc: Frank Rowand <frowand.list@gmail.com >
Cc: <linux-rtc@vger.kernel.org >
Signed-off-by: Stephen Boyd <swboyd@chromium.org >
Link: https://lore.kernel.org/r/20191004214334.149976-4-swboyd@chromium.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
2019-10-07 15:49:20 +02:00