25 Jun, 2015
21 commits
-
isl1208_i2c_set_alarm() uses deprecated rtc_tm_to_time(),
which will overflow in year 2106 on 32-bit machines.This patch solves this by:
- Replacing rtc_tm_to_time() with rtc_tm_sub()Cc: Herbert Valerio Riedel
Signed-off-by: Xunlei Pang
Signed-off-by: Alexandre Belloni -
There're many sites need comparing the two rtc_time variants for many
rtc drivers, especially in the instances of rtc_class_ops::set_alarm().So add this common helper function to make things easy.
Suggested-by: Arnd Bergmann
Signed-off-by: Xunlei Pang
Signed-off-by: Alexandre Belloni -
pcf8563_rtc_set_alarm() uses deprecated rtc_tm_to_time()
and rtc_time_to_tm(), which will overflow in year 2106
on 32-bit machines.This patch solves this by:
- Replacing rtc_time_to_tm() with rtc_time64_to_tm()
- Replacing rtc_tm_to_time() with rtc_tm_to_time64()Acked-by: Arnd Bergmann
Signed-off-by: Xunlei Pang
Signed-off-by: Alexandre Belloni -
Initialise the variable high_bb_charging before using it to avoid
configuring wrong value and fix following compilation warning:/*
rtc-palmas.c: In function ‘palmas_rtc_probe’:
rtc-palmas.c:242:7: warning: ‘high_bb_charging’ may be used
uninitialized in this function
*/Signed-off-by: Laxman Dewangan
Signed-off-by: Alexandre Belloni -
Remove unneeded error handling on the result of a call to
platform_get_resource when the value is passed to devm_ioremap_resource.Move the call to platform_get_resource adjacent to the call to
devm_ioremap_resource to make the connection between them more clear.A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)//
@@
expression pdev,res,n,e,e1;
expression ret != 0;
identifier l;
@@- res = platform_get_resource(pdev, IORESOURCE_MEM, n);
... when != res
- if (res == NULL) { ... \(goto l;\|return ret;\) }
... when != res
+ res = platform_get_resource(pdev, IORESOURCE_MEM, n);
e = devm_ioremap_resource(e1, res);
//Signed-off-by: Julia Lawall
[viresh.kumar@linaro.org: acked rtc-spear]
Acked-by: Viresh Kumar
Signed-off-by: Alexandre Belloni -
Return -EINVAL if the voltage low bit is set to avoid getting a bogus
time at boot.
There was a comment stating that util-linux hwclock refuses to set a
new time if we return an error code on read, but at least the current
version do set the time as expected. Remove the comment and the check
for valid time, and let the rtc core check it for us.Signed-off-by: Jan Kardell
Signed-off-by: Alexandre Belloni -
Driver for the on chip RTC found on Cortina's SoC Gemini.
Signed-off-by: Hans Ulli Kroll
[alexandre.belloni@free-electrons.com: use devm_request_irq() and remove
useless goto]
Signed-off-by: Alexandre Belloni -
rtc-stmp3xxx depends on lib/stmp_device, select it.
Signed-off-by: Alexandre Belloni
-
When entering suspend while an wakeup alarm is set, enable_set_wake
should make sure that the RTC interrupt keep being enabled and the
.irq_set_wake for the RTC interrupt get called. However, since the
driver uses the suspend_noirq callback, the call to enable_irq_wake
has been made after disabling the interrupts. While .irq_set_wake
has been called properly, the interrupt remained disabled.Use the suspend callback to call enable_irq_wake early enough to
ensure the RTC interrupt remains enabled.Fixes: 7654e9d4fd8f ("drivers/rtc/rtc-snvs: fix suspend/resume")
Cc: # 3.19
Signed-off-by: Stefan Agner
Signed-off-by: Alexandre Belloni -
Using gpio_request_array()/gpio_free_array() can make the code
simpler because it can set the direction and initial value
in one shot and the for loop is unnecessary.Also, struct v3020_gpio is removed, because the struct v3020_gpio
is replaced with struct gpio.Signed-off-by: Jingoo Han
Signed-off-by: Alexandre Belloni -
Drivers should not be using the __raw_* io accessors.
Signed-off-by: H Hartley Sweeten
Cc: Alessandro Zummo
Signed-off-by: Alexandre Belloni -
If the rtc-max77802 driver is built as a module, modalias information is
not filled so the module is not autoloaded. Use the MODULE_DEVICE_TABLE()
macro to export the platform ID table so the module contains that data.Signed-off-by: Javier Martinez Canillas
Reviewed-by: Krzysztof Kozlowski
Signed-off-by: Alexandre Belloni -
If the rtc-max77686 driver is built as a module, modalias information is
not filled so the module is not autoloaded. Use the MODULE_DEVICE_TABLE()
macro to export the platform ID table so the module contains that data.Signed-off-by: Javier Martinez Canillas
Reviewed-by: Krzysztof Kozlowski
Signed-off-by: Alexandre Belloni -
The device table is required to load modules based on modaliases.
After adding MODULE_DEVICE_TABLE, below entries will be added to
modules.alias:alias i2c:ds1672 rtc_ds1672
alias i2c:max6900 rtc_max6900
alias platform:lp3974-rtc rtc_max8998
alias platform:max8998-rtc rtc_max8998Signed-off-by: Axel Lin
Cc: Alessandro Zummo
Cc: Dale Farnsworth
Cc: Minkyu Kang
Cc: Joonyoung Shim
Signed-off-by: Alexandre Belloni -
On some !ARM 32bits platforms, the following compilation error happens
because of the division on a 64bits value in mtk_rtc_read_time():drivers/built-in.o: In function `mtk_rtc_read_time':
rtc-mt6397.c:(.text+0x265d13f): undefined reference to `__divdi3'
rtc-mt6397.c:(.text+0x265d150): undefined reference to `__moddi3'Use div_s64() as done in rtc_time64_to_tm() to solve that.
Reported-by: kbuild test robot
Acked-by: Eddie Huang
Signed-off-by: Alexandre Belloni -
According to C99, %2.s means 'print two spaces' (a precision of
. without following digits or * means 0). The kernel's printf
implementation, however, treats that case as if no precision was
given, but relying on that quirk is rather silly. Also, since no -
(aka left-justify) flag is given, the field with of 2 would then cause
the alarm->enabled case to come out as "o n". Deobfuscate it.Signed-off-by: Rasmus Villemoes
Signed-off-by: Alexandre Belloni -
Add Mediatek RTC driver to maintainer entry.
Signed-off-by: Eddie Huang
Signed-off-by: Alexandre Belloni -
Add Mediatek MT6397 RTC driver
Signed-off-by: Tianping Fang
Signed-off-by: Eddie Huang
Signed-off-by: Alexandre Belloni -
Provide MT6397 RTC interrupt, base address, and register in
MT6397 MFD.Signed-off-by: Eddie Huang
Acked-by: Lee Jones
Signed-off-by: Alexandre Belloni -
The rtc-xgene driver is only useful on X-Gene SoC.
Signed-off-by: Jean Delvare
Cc: Alessandro Zummo
Cc: Alexandre Belloni
Cc: Iyappan Subramanian
Cc: Keyur Chudgar
Signed-off-by: Alexandre Belloni -
This patch updates the email address of the rtc-at32ap700x driver supported by
me to an email account I will use on a more regular basis in the future.Signed-off-by: Hans-Christian Egtvedt
Signed-off-by: Alexandre Belloni
20 Jun, 2015
12 commits
-
If the DryICE unit is locked it is impossible to set the time. Provide an
error message for this case.Signed-off-by: Juergen Borleis
Signed-off-by: Robert Schwebel
[rsc: got NDA clearance from Freescale]
Signed-off-by: Alexandre Belloni -
Maybe the unit enters the hardware related state at runtime and not at
system boot time (after a power cycle).Signed-off-by: Juergen Borleis
Signed-off-by: Robert Schwebel
[rsc: got NDA clearance from Freescale]
Signed-off-by: Alexandre Belloni -
This code is required to recover the unit from a security violation.
Hopefully this code can recover the unit from a hardware related invalid
state as well.Signed-off-by: Juergen Borleis
Signed-off-by: Robert Schwebel
[rsc: got NDA clearance from Freescale]
Signed-off-by: Alexandre Belloni -
Document the i.MX DryIce machine states.
Signed-off-by: Juergen Borleis
Signed-off-by: Robert Schwebel
[rsc: got NDA clearance from Freescale]
Signed-off-by: Alexandre Belloni -
Be independent of the endianness of the kernel.
Signed-off-by: Juergen Borleis
Signed-off-by: Alexandre Belloni -
There are now no differences between RTC on Exynos3250 and S3C6410.
Merge everything into one so duplicated code could be removed.Signed-off-by: Krzysztof Kozlowski
Reviewed-by: Chanwoo Choi
Acked-by: Alexandre Belloni
Reviewed-by: Javier Martinez Canillas
Signed-off-by: Krzysztof Kozlowski
Signed-off-by: Alexandre Belloni -
The rtc_timer_cancel() always returns 0 and cannot fail (calls only
other void-returning functions).Signed-off-by: Krzysztof Kozlowski
Signed-off-by: Alexandre Belloni -
Fix issues reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
ERROR: "foo* bar" should be "foo *bar"
Additionally adjust alignment of wrapped function arguments.Signed-off-by: Krzysztof Kozlowski
Signed-off-by: Alexandre Belloni -
The platform_device_id is not modified by the driver and core uses it as
const.Signed-off-by: Krzysztof Kozlowski
Signed-off-by: Alexandre Belloni -
The platform_device_id is not modified by the driver and core uses it as
const.Signed-off-by: Krzysztof Kozlowski
Signed-off-by: Alexandre Belloni -
The platform_device_id is not modified by the driver and core uses it as
const.Signed-off-by: Krzysztof Kozlowski
Signed-off-by: Alexandre Belloni -
I'm no longer employed by HP.
Signed-off-by: dann frazier
Signed-off-by: Alexandre Belloni
15 Jun, 2015
7 commits
-
Pull dmaengine fixes from Vinod Koul:
"Here are hopefully last set of fixes for 4.1. This time we have:- fixing pause capability reporting on both dmaengine pause & resume
support by Krzysztof- locking fix fir at_xdmac by Ludovic
- slave configuration fix for at_xdmac by Ludovic"
* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
dmaengine: Fix choppy sound because of unimplemented resume
dmaengine: at_xdmac: rework slave configuration part
dmaengine: at_xdmac: lock fixes -
Pull NTB fixes from Jon Mason:
"I apologize for the tardiness of this request. Here are a couple of
last minute NTB bug fixes for v4.1:NTB bug fixes to address issues in unmapping the MW reg base and
vbase, and an uninitialized variable on Atom platforms"* tag 'ntb-4.1' of git://github.com/jonmason/ntb:
ntb: initialize max_mw for Atom before using it
ntb: iounmap MW reg and vbase in error path -
Pull more MIPS fixes from Ralf Baechle:
"Another round of 4.1 MIPS fixes, one fix to a MIPS-specific #if
condition in lib/mpi, one fix to the MIPS GIC irqchip driver and one
SSB fix.Details:
- fix handling of clock in chipco SSB driver.
- fix two MIPS-specific #if conditions to correctly work for GCC 5.1.
- fix damage to R6 pgtable bits done by XPA support.
- fix possible crash due to unloading modules that contain statically
defined platform devices.
- fix disabling of the MSA ASE on context switch to also work
correctly when a new thread/process has the CPU for the very first
time.This is part of linux-next and has been beaten to death on
Imagination's test farm.While things are not looking too grim this pull request also means the
rate of fixes for 4.1 remains nearly constant so I'd not be unhappy if
you'd delay the release"* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
MPI: MIPS: Fix compilation error with GCC 5.1
IRQCHIP: mips-gic: Don't nest calls to do_IRQ()
MIPS: MSA: bugfix - disable MSA correctly for new threads/processes.
MIPS: Loongson: Do not register 8250 platform device from module.
MIPS: Cobalt: Do not build MTD platform device registration code as module.
SSB: Fix handling of ssb_pmu_get_alp_clock()
MIPS: pgtable-bits: Fix XPA damage to R6 definitions. -
Pull irqchip fix from Thomas Gleixner:
"A single fix for an off by one bug in the sunxi irqchip driver"* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
irqchip: sunxi-nmi: Fix off-by-one error in irq iterator -
Pull lockdep fix from Ingo Molnar:
"A lockdep/modules unload race fix that can oops"* 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
lockdep: Fix a race between /proc/lock_stat and module unload -
Pull perf fixes from Ingo Molnar:
"A regression fix for a crash, and a Intel HSW uncore PMU driver fix"* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
Revert "perf/x86/intel/uncore: Move uncore_box_init() out of driver initialization"
perf/x86/intel/uncore: Fix CBOX bit wide and UBOX reg on Haswell-EP