20 Jan, 2021
2 commits
-
This is the 5.10.6 stable release
* tag 'v5.10.6': (21 commits)
Linux 5.10.6
mwifiex: Fix possible buffer overflows in mwifiex_cmd_802_11_ad_hoc_start
exec: Transform exec_update_mutex into a rw_semaphore
...Signed-off-by: Jason Liu
Conflicts:
drivers/rtc/rtc-pcf2127.c -
This is the 5.10.5 stable release
* tag 'v5.10.5': (63 commits)
Linux 5.10.5
device-dax: Fix range release
ext4: avoid s_mb_prefetch to be zero in individual scenarios
...Signed-off-by: Jason Liu
09 Jan, 2021
2 commits
-
commit 71ac13457d9d1007effde65b54818106b2c2b525 upstream.
Most boards using the pcf2127 chip (in my bubble) don't make use of the
watchdog functionality and the respective output is not connected. The
effect on such a board is that there is a watchdog device provided that
doesn't work.So only register the watchdog if the device tree has a "reset-source"
property.Signed-off-by: Uwe Kleine-König
[RV: s/has-watchdog/reset-source/]
Signed-off-by: Rasmus Villemoes
Signed-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20201218101054.25416-3-rasmus.villemoes@prevas.dk
Signed-off-by: Greg Kroah-Hartman -
commit 5d78533a0c53af9659227c803df944ba27cd56e0 upstream.
The obvious advantages are:
- The linker can drop the watchdog functions if CONFIG_WATCHDOG is off.
- All watchdog stuff grouped together with only a single function call
left in generic code.
- Watchdog register is only read when it is actually used.
- Less #ifdeferySigned-off-by: Uwe Kleine-König
Signed-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20200924105256.18162-2-u.kleine-koenig@pengutronix.de
Cc: Rasmus Villemoes
Signed-off-by: Greg Kroah-Hartman
06 Jan, 2021
2 commits
-
[ Upstream commit 1eab0fea2514b269e384c117f5b5772b882761f0 ]
When devm_rtc_allocate_device is failed in pl031_probe, it should release
mem regions with device.Reported-by: Hulk Robot
Signed-off-by: Zheng Liang
Signed-off-by: Alexandre Belloni
Acked-by: Linus Walleij
Link: https://lore.kernel.org/r/20201112093139.32566-1-zhengliang6@huawei.com
Signed-off-by: Sasha Levin -
[ Upstream commit 28d211919e422f58c1e6c900e5810eee4f1ce4c8 ]
When clk_hw_register_fixed_rate_with_accuracy() fails,
clk_data should be freed. It's the same for the subsequent
two error paths, but we should also unregister the already
registered clocks in them.Signed-off-by: Dinghao Liu
Signed-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20201020061226.6572-1-dinghao.liu@zju.edu.cn
Signed-off-by: Sasha Levin
04 Jan, 2021
1 commit
-
This is the 5.10.4 stable release
* tag 'v5.10.4': (717 commits)
Linux 5.10.4
x86/CPU/AMD: Save AMD NodeId as cpu_die_id
drm/edid: fix objtool warning in drm_cvt_modes()
...Signed-off-by: Jason Liu
Conflicts:
drivers/gpu/drm/imx/dcss/dcss-plane.c
drivers/media/i2c/ov5640.c
30 Dec, 2020
2 commits
-
commit 00c33482bb6110bce8110daa351f9b3baf4df7dc upstream.
Mismatch in probe platform_set_drvdata set's and method's that call
dev_get_platdata will result in "Unable to handle kernel NULL pointer
dereference", let's use according method for getting driver data after
platform_set_drvdata.8] (ep93xx_rtc_read_time) from [] (__rtc_read_time+0x4c/0x8c)
[] (__rtc_read_time) from [] (rtc_read_time+0x2c/0x4c)
[] (rtc_read_time) from [] (__rtc_read_alarm+0x28/0x358)
[] (__rtc_read_alarm) from [] (__rtc_register_device+0x124/0x2ec)
[] (__rtc_register_device) from [] (ep93xx_rtc_probe+0xa4/0xac)
[] (ep93xx_rtc_probe) from [] (platform_drv_probe+0x24/0x5c)
[] (platform_drv_probe) from [] (really_probe+0x218/0x374)
[] (really_probe) from [] (device_driver_attach+0x44/0x60)
[] (device_driver_attach) from [] (__driver_attach+0xb4/0xc0)
[] (__driver_attach) from [] (bus_for_each_dev+0x68/0xac)
[] (bus_for_each_dev) from [] (driver_attach+0x18/0x24)
[] (driver_attach) from [] (bus_add_driver+0x150/0x1b4)
[] (bus_add_driver) from [] (driver_register+0xb0/0xf4)
[] (driver_register) from [] (__platform_driver_register+0x30/0x48)
[] (__platform_driver_register) from [] (ep93xx_rtc_driver_init+0x10/0x1c)
[] (ep93xx_rtc_driver_init) from [] (do_one_initcall+0x7c/0x1c0)
[] (do_one_initcall) from [] (kernel_init_freeable+0x168/0x1ac)
[] (kernel_init_freeable) from [] (kernel_init+0x8/0xf4)
[] (kernel_init) from [] (ret_from_fork+0x14/0x34)
Exception stack(0xc441dfb0 to 0xc441dff8)
dfa0: 00000000 00000000 00000000 00000000
dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
Code: e12fff1e e92d4010 e590303c e1a02001 (e5933000)
---[ end trace c914d6030eaa95c8 ]---Fixes: b809d192eb98 ("rtc: ep93xx: stop setting platform_data")
Signed-off-by: Nikita Shubin
Signed-off-by: Alexandre Belloni
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20201201095507.10317-1-nikita.shubin@maquefel.me
Signed-off-by: Greg Kroah-Hartman -
[ Upstream commit ba1c30bf3f2536f248d262c6f257b5a787305991 ]
These functions should return zero on success. Non-zero returns are
treated as error. On some paths, this doesn't matter but in
nvmem_cell_read() a non-zero return would be passed to ERR_PTR() and
lead to an Oops.Fixes: d6c3029f32f7 ("rtc: pcf2127: add support for accessing internal static RAM")
Signed-off-by: Dan Carpenter
Signed-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20201022070451.GA2817669@mwanda
Signed-off-by: Sasha Levin
18 Dec, 2020
1 commit
-
* wdog/next:
rtc: pcf2127: only use watchdog when explicitly available
rtc: pcf2127: move watchdog initialisation to a separate function
MLK-24824-2 watchdog: imx7ulp: Move suspend/resume to noirq phase
14 Dec, 2020
7 commits
-
Most boards using the pcf2127 chip (in my bubble) don't make use of the
watchdog functionality and the respective output is not connected. The
effect on such a board is that there is a watchdog device provided that
doesn't work.So only register the watchdog if the device tree has a "has-watchdog"
property.Signed-off-by: Uwe Kleine-König
-
The obvious advantages are:
- The linker can drop the watchdog functions if CONFIG_WATCHDOG is off.
- All watchdog stuff grouped together with only a single function call
left in generic code.
- Watchdog register is only read when it is actually used.
- Less #ifdeferySigned-off-by: Uwe Kleine-König
-
RTC read time will be called immediately after RTC device register
finished, RTC rpmsg channel should be ready before registering RTC
device, so let RTC rpmsg channel probe callback to register RTC
platform driver to trigger RTC device probe.The rpmsg driver has a limitation that receiving data should be done
ONLY after all rpmsg channels probe done, so here use late_initcall()
to make RTC the last rpmsg channel probed, this is to support data
receiving in RTC device probe phase.Signed-off-by: Anson Huang
Reviewed-by: Peng Fan -
Call the 64bit versions of rtc_tm time conversion.
The old API was removed since:
6487a8019b3e ("rtc: remove rtc_time_to_tm and rtc_tm_to_time")Signed-off-by: Dong Aisheng
-
67b06ba0 ("PM: QoS: Drop PM_QOS_CPU_DMA_LATENCY and rename related functions")
changed the pm_qos_*() APIs. Updated the IMX usage of them to the new
APIs.Signed-off-by: Li Yang
Signed-off-by: Dong Aisheng -
Add i.MX RPMSG RTC support for i.MX7ULP.
Signed-off-by: Anson Huang
-
Add i.MX8QM RTC support.
Signed-off-by: Anson Huang
22 Oct, 2020
1 commit
-
Pull RTC updates from Alexandre Belloni:
"A new driver this cycle is making the bulk of the changes and the
rx8010 driver has been rework to use the modern APIs.Summary:
Subsystem:
- new generic DT properties: aux-voltage-chargeable,
trickle-voltage-millivoltNew driver:
- Microcrystal RV-3032Drivers:
- ds1307: use aux-voltage-chargeable
- r9701, rx8010: modernization of the driver
- rv3028: fix clock output, trickle resistor values, RAM
configuration registers"* tag 'rtc-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (50 commits)
rtc: r9701: set range
rtc: r9701: convert to devm_rtc_allocate_device
rtc: r9701: stop setting RWKCNT
rtc: r9701: remove useless memset
rtc: r9701: stop setting a default time
rtc: r9701: remove leftover comment
rtc: rv3032: Add a driver for Microcrystal RV-3032
dt-bindings: rtc: rv3032: add RV-3032 bindings
dt-bindings: rtc: add trickle-voltage-millivolt
rtc: rv3028: ensure ram configuration registers are saved
rtc: rv3028: factorize EERD bit handling
rtc: rv3028: fix trickle resistor values
rtc: rv3028: fix clock output support
rtc: mt6397: Remove unused member dev
rtc: rv8803: simplify the return expression of rv8803_nvram_write
rtc: meson: simplify the return expression of meson_vrtc_probe
rtc: rx8010: rename rx8010_init_client() to rx8010_init()
rtc: ds1307: enable rx8130's backup battery, make it chargeable optionally
rtc: ds1307: consider aux-voltage-chargeable
rtc: ds1307: store previous charge default per chip
...
20 Oct, 2020
7 commits
-
Set range and remove the set_time check. This is a classic BCD RTC.
Signed-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20201015191135.471249-6-alexandre.belloni@bootlin.com -
This allows further improvement of the driver.
Signed-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20201015191135.471249-5-alexandre.belloni@bootlin.com -
tm_wday is never checked for validity and it is not read back in
r9701_get_datetime. Avoid setting it to stop tripping static checkers:drivers/rtc/rtc-r9701.c:109 r9701_set_datetime()
error: undefined (user controlled) shift '1 << dt->tm_wday'Reported-by: Dan Carpenter
Signed-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20201015191135.471249-4-alexandre.belloni@bootlin.com -
The RTC core already sets to zero the struct rtc_tie it passes to the
driver, avoid doing it a second time.Signed-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20201015191135.471249-3-alexandre.belloni@bootlin.com -
It doesn't make sense to set the RTC to a default value at probe time. Let
the core handle invalid date and time.Signed-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20201015191135.471249-2-alexandre.belloni@bootlin.com -
Commit 22652ba72453 ("rtc: stop validating rtc_time in .read_time") removed
the code but not the associated comment.Signed-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20201015191135.471249-1-alexandre.belloni@bootlin.com -
New driver for the Microcrystal RV-3032, including support for:
- Date/time
- Alarms
- Low voltage detection
- Trickle charge
- Trimming
- Clkout
- RAM
- EEPROM
- Temperature sensorSigned-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20201013144110.1942218-3-alexandre.belloni@bootlin.com
15 Oct, 2020
5 commits
-
If RV3028_CTRL1_EERD is not set (this is the default), the RTC will refresh
the RAM configuration registers from the EEPROM at midnight. It is
necessary to save the RAM registers back to EEPROM after modifying them.Signed-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20201009153101.721149-4-alexandre.belloni@bootlin.com -
Both rv3028_eeprom_write and rv3028_eeprom_read enable EERD before sending
commands to the EEPROM and restore it afterwards. Factorize this code.Signed-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20201009153101.721149-3-alexandre.belloni@bootlin.com -
Version 1.0 of the application manual had the wrong resistor values. Fix
them according to version 1.1Signed-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20201009153101.721149-2-alexandre.belloni@bootlin.com -
rv3028_clkout_set_rate unconditionally sets RV3028_CLKOUT_CLKOE but
clk_set_rate may be called with the clock disabled. Ensure the clock is
kept disabled if it was not yet enabled.Also, the actual rate was overwritten when enabling the clock, properly
write to the register only once.Signed-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20201009153101.721149-1-alexandre.belloni@bootlin.com -
Removing the struct member "dev" in mt6397 RTC driver because it's not
initialized and the only usage is for one debugging message.Also fixed a typo in the error message.
Signed-off-by: Fei Shao
Signed-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20201008093414.1911699-1-fshao@chromium.org
30 Sep, 2020
3 commits
-
Simplify the return expression.
Signed-off-by: Liu Shixin
Signed-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20200921082449.2591981-1-liushixin2@huawei.com -
Simplify the return expression.
Signed-off-by: Liu Shixin
Signed-off-by: Alexandre Belloni
Acked-by: Kevin Hilman
Link: https://lore.kernel.org/r/20200919100856.1639319-1-liushixin2@huawei.com -
Since the switch to using regmap this function no longer takes the
I2C client struct as argument nor do we even interact with the client
anywhere other than when creating the regmap.Rename it to a less misleading name: "rx8010_init()".
Signed-off-by: Bartosz Golaszewski
Signed-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20200917114656.9036-1-brgl@bgdev.pl
24 Sep, 2020
5 commits
-
The ds1307 charger infrastructure now allows to add a rx8130 charger
setup that..- does not depend on trickle-resistor-ohms
- does not use DS13XX_TRICKLE_CHARGER_MAGIC trickle-charge select (TCS)
bits
- keeps previous no-charge behavior for device trees without
aux-voltage-chargeableMake that happen.
Signed-off-by: Bastian Krause
Signed-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20200917183246.19446-9-bst@pengutronix.de -
Prefer aux-voltage-chargeable over trickle-diode-disable and set diode
accordingly. This is then passed to the chip's appropriate charge setup
function.Signed-off-by: Bastian Krause
Signed-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20200917183246.19446-8-bst@pengutronix.de -
Some RTC's batteries and supercaps were charged by default until now.
In contrast other RTCs allow charging but the driver did not configure
them to do so until now. These must not be charged by default to stay
backwards compatible.In order to do that, store the charge default per chip.
Signed-off-by: Bastian Krause
Signed-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20200917183246.19446-7-bst@pengutronix.de -
Make trickle-resistor-ohms optional for charging setups that do not
require specifying ROUT bits (specifying the resistor value between Vcc
and Vbackup). In order to allow specifying that, introduce
requires_trickle_resistor per chip.Signed-off-by: Bastian Krause
Signed-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20200917183246.19446-6-bst@pengutronix.de -
DS13XX_TRICKLE_CHARGER_MAGIC sets the trickle-charge select (TCS) bits
(7..4). The datasheet of Maxim Integrated's DS1339 [1] for instance
reads:"To prevent accidental enabling, only a pattern on 1010 enables the
trickle charger. All other patterns disable the trickle charger."Since not all RTCs connected to a backup battery or supercap use these
bits DS13XX_TRICKLE_CHARGER_MAGIC should not get applied for all charger
setups unconditionally.
Epson's RX8130 is such an example: Instead of TCS bits "SMPTSEL1",
"SMPTSEL0", "CHGEN" and "INIEN" are expected as bit 7..4.DS1339 and DS1340 are currently the only RTCs in the ds1307 driver that
apply DS13XX_TRICKLE_CHARGER_MAGIC to their setup register value. So
apply DS13XX_TRICKLE_CHARGER_MAGIC in do_trickle_setup_ds1339() which
is used by both RTCs.[1] https://datasheets.maximintegrated.com/en/ds/DS1339-DS1339U.pdf
[2] https://support.epson.biz/td/api/doc_check.php?dl=app_RX8130CESigned-off-by: Bastian Krause
Signed-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20200917183246.19446-5-bst@pengutronix.de
15 Sep, 2020
2 commits
-
Fix a bug when not specify interrupts property in dts
as follows,
rtc-pcf2127-i2c 1-0051: failed to request alarm irq
rtc-pcf2127-i2c: probe of 1-0051 failed with error -22Signed-off-by: Biwen Li
Signed-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20200915073213.12779-1-biwen.li@oss.nxp.com -
ds1685_rtc_begin_data_access() tried to access an extended register before
enabling access to it by switching to bank 1. Depending on content in NVRAM
this could lead to an endless loop. While at it fix also switch back to
bank 0 in ds1685_rtc_end_data_access().Signed-off-by: Thomas Bogendoerfer
Signed-off-by: Alexandre Belloni
Acked-by: Joshua Kinard
Link: https://lore.kernel.org/r/20200910084124.138560-1-tsbogend@alpha.franken.de