<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/rtc, branch v4.9.5</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.5</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.5'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2016-11-04T22:11:39Z</updated>
<entry>
<title>rtc: omap: prevent disabling of clock/module during suspend</title>
<updated>2016-11-04T22:11:39Z</updated>
<author>
<name>Tero Kristo</name>
<email>t-kristo@ti.com</email>
</author>
<published>2016-10-27T05:57:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=efce21fc43e00a76aee7b0a1eda73730ed2d5d3a'/>
<id>urn:sha1:efce21fc43e00a76aee7b0a1eda73730ed2d5d3a</id>
<content type='text'>
If RTC is running from an internal clock source, the RTC module can't
be disabled; otherwise it stops ticking completely. Current suspend
handler implementation disables the clock/module unconditionally,
instead fix this by disabling the clock only if we are running on
external clock source, which is not affected by suspend.

The prevention of disabling the clock must be done via implementing
the runtime_pm handlers for the device, and returning an error code
from the runtime suspend handler; otherwise OMAP core PM will disable
the clocks for the driver.

Signed-off-by: Tero Kristo &lt;t-kristo@ti.com&gt;
Signed-off-by: Keerthy &lt;j-keerthy@ti.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: omap: Fix selecting external osc</title>
<updated>2016-11-04T22:11:37Z</updated>
<author>
<name>Lokesh Vutla</name>
<email>lokeshvutla@ti.com</email>
</author>
<published>2016-10-27T05:57:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3984903a2e3906d3def220e688040ce93368200a'/>
<id>urn:sha1:3984903a2e3906d3def220e688040ce93368200a</id>
<content type='text'>
RTC can be clocked from an external 32KHz oscillator, or from the
Peripheral PLL. The RTC has an internal oscillator buffer to support
direct operation with a crystal.

            ----------------------------------------
            |       Device          ---------       |
            |                       |       |       |
            |                       | RTCSS |       |
            |       ---------       |       |       |
    OSC     |&lt;------| RTC   |       |       |       |
            |------&gt;| OSC   |---    |       |       |
            |       --------   |    |       |       |
            |                   ----|clk    |       |
            |       --------   |    |       |       |
            |       | PRCM  |---    |       |       |
            |       --------        --------        |
            ----------------------------------------

The RTC functional clock is sourced by default from the clock derived
from the Peripheral PLL. In order to select source as external osc clk
the following changes needs to be done:
- Enable the RTC OSC (RTC_OSC_REG[4]OSC32K_GZ = 0)
- Enable the clock mux(RTC_OSC_REG[6]K32CLK_EN = 1)
- Select the external clock source (RTC_OSC_REG[3]32KCLK_SEL = 1)

Fixes: 399cf0f63f6f2 ("rtc: omap: Add external clock enabling support")
Signed-off-by: Keerthy &lt;j-keerthy@ti.com&gt;
Signed-off-by: Lokesh Vutla &lt;lokeshvutla@ti.com&gt;
Signed-off-by: Dave Gerlach &lt;d-gerlach@ti.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: cmos: Don't enable interrupts in the middle of the interrupt handler</title>
<updated>2016-10-20T15:40:06Z</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2016-10-19T18:02:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=368e21aebe9535c1643b272aaa9819298a6bc3e5'/>
<id>urn:sha1:368e21aebe9535c1643b272aaa9819298a6bc3e5</id>
<content type='text'>
Using spin_lock_irq()/spin_unlock_irq() from within the interrupt
handler is a no-no. Let's save/restore the flags to avoid turning on
interrupts prematurely.

We hit this in a bunch of our CI systems, but for whatever reason I
wasn't able to reproduce on my own machine, so this fix is just
based on the backtrace.

[  202.634918] WARNING: CPU: 0 PID: 0 at kernel/locking/lockdep.c:2729 trace_hardirqs_on_caller+0x113/0x1b0
[  202.634919] DEBUG_LOCKS_WARN_ON(current-&gt;hardirq_context)
[  202.634929] Modules linked in: snd_hda_intel i915 x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel lpc_ich snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec_hdmi snd_hda_codec snd_hwdep i2c_designware_platform i2c_designware_core snd_hda_core mei_me mei snd_pcm r8169 mii sdhci_acpi sdhci mmc_core i2c_hid [last unloaded: i915]
[  202.634930] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G     U          4.9.0-rc1-CI-CI_DRM_1734+ #1
[  202.634931] Hardware name: GIGABYTE M4HM87P-00/M4HM87P-00, BIOS F6 12/10/2014
[  202.634933]  ffff88011ea03d68 ffffffff8142dce5 ffff88011ea03db8 0000000000000000
[  202.634934]  ffff88011ea03da8 ffffffff8107e496 00000aa900000002 ffffffff81e249a0
[  202.634935]  ffffffff81815637 ffffffff82e7c280 0000000000000000 0000000000000004
[  202.634936] Call Trace:
[  202.634939]  &lt;IRQ&gt;
[  202.634939]  [&lt;ffffffff8142dce5&gt;] dump_stack+0x67/0x92
[  202.634941]  [&lt;ffffffff8107e496&gt;] __warn+0xc6/0xe0
[  202.634944]  [&lt;ffffffff81815637&gt;] ? _raw_spin_unlock_irq+0x27/0x50
[  202.634945]  [&lt;ffffffff8107e4fa&gt;] warn_slowpath_fmt+0x4a/0x50
[  202.634946]  [&lt;ffffffff810d6d83&gt;] trace_hardirqs_on_caller+0x113/0x1b0
[  202.634948]  [&lt;ffffffff810d6e2d&gt;] trace_hardirqs_on+0xd/0x10
[  202.634949]  [&lt;ffffffff81815637&gt;] _raw_spin_unlock_irq+0x27/0x50
[  202.634951]  [&lt;ffffffff81672042&gt;] rtc_handler+0x32/0xa0
[  202.634954]  [&lt;ffffffff814c08a3&gt;] acpi_ev_fixed_event_detect+0xd4/0xfb
[  202.634956]  [&lt;ffffffff814c2ccb&gt;] acpi_ev_sci_xrupt_handler+0xf/0x2d
[  202.634957]  [&lt;ffffffff814ab3ee&gt;] acpi_irq+0x11/0x2c
[  202.634960]  [&lt;ffffffff810e5288&gt;] __handle_irq_event_percpu+0x58/0x370
[  202.634961]  [&lt;ffffffff810e55be&gt;] handle_irq_event_percpu+0x1e/0x50
[  202.634962]  [&lt;ffffffff810e5624&gt;] handle_irq_event+0x34/0x60
[  202.634963]  [&lt;ffffffff810e8906&gt;] handle_fasteoi_irq+0xa6/0x170
[  202.634966]  [&lt;ffffffff8101eef5&gt;] handle_irq+0x15/0x20
[  202.634967]  [&lt;ffffffff8101e548&gt;] do_IRQ+0x68/0x130
[  202.634968]  [&lt;ffffffff81816789&gt;] common_interrupt+0x89/0x89
[  202.634970]  &lt;EOI&gt;
[  202.634970]  [&lt;ffffffff81814c73&gt;] ? mwait_idle+0x93/0x210
[  202.634971]  [&lt;ffffffff81814c6a&gt;] ? mwait_idle+0x8a/0x210
[  202.634972]  [&lt;ffffffff81026b0a&gt;] arch_cpu_idle+0xa/0x10
[  202.634973]  [&lt;ffffffff8181509e&gt;] default_idle_call+0x1e/0x30
[  202.634974]  [&lt;ffffffff810cbf6c&gt;] cpu_startup_entry+0x17c/0x1f0
[  202.634976]  [&lt;ffffffff8180ca87&gt;] rest_init+0x127/0x130
[  202.634978]  [&lt;ffffffff81f77f08&gt;] start_kernel+0x3f6/0x403
[  202.634980]  [&lt;ffffffff81f7728f&gt;] x86_64_start_reservations+0x2a/0x2c
[  202.634981]  [&lt;ffffffff81f77404&gt;] x86_64_start_kernel+0x173/0x186
[  202.634982] ---[ end trace 293c99618fa08d34 ]---

Cc: Gabriele Mazzotta &lt;gabriele.mzt@gmail.com&gt;
Cc: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Fixes: 983bf1256edb ("rtc: cmos: Clear ACPI-driven alarms upon resume")
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: cmos: remove all __exit_p annotations</title>
<updated>2016-10-19T06:45:50Z</updated>
<author>
<name>LABBE Corentin</name>
<email>clabbe.montjoie@gmail.com</email>
</author>
<published>2016-10-18T14:39:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a3a0673b9db6fad2a3f7874c34e4b5cbc5fa01c6'/>
<id>urn:sha1:a3a0673b9db6fad2a3f7874c34e4b5cbc5fa01c6</id>
<content type='text'>
I got the following stack trace under qemu:
[    7.575243] BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
[    7.596098] IP: [&lt;ffffffff814f5b08&gt;] cmos_set_alarm+0x38/0x280
[    7.615699] PGD 3ccbe067
[    7.615923] PUD 3daf2067
[    7.635156] PMD 0
[    7.654358] Oops: 0000 [#1] SMP
[    7.673869] Modules linked in:
[    7.693235] CPU: 0 PID: 1701 Comm: hwclock Tainted: G        W       4.9.0-rc1+ #24
[    7.712455] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.3-0-ge2fc41e-prebuilt.qemu-project.org 04/01/2014
[    7.753569] task: ffff88003d88dc40 task.stack: ffffc90000224000
[    7.773743] RIP: 0010:[&lt;ffffffff814f5b08&gt;]  [&lt;ffffffff814f5b08&gt;] cmos_set_alarm+0x38/0x280
[    7.794893] RSP: 0018:ffffc90000227c10  EFLAGS: 00010296
[    7.815890] RAX: 000000000000001d RBX: ffffc90000227d28 RCX: ffffffff8182be78
[    7.836057] RDX: 0000000000000001 RSI: 0000000000000202 RDI: 0000000000000202
[    7.856612] RBP: ffffc90000227c48 R08: 0000000000000000 R09: 0000000000000001
[    7.877561] R10: 00000000000001c0 R11: 00000000000001c0 R12: 0000000000000000
[    7.897072] R13: ffff88003d96f400 R14: ffff88003dac6410 R15: ffff88003dac6420
[    7.917403] FS:  00007f77f42d9700(0000) GS:ffff88003fc00000(0000) knlGS:0000000000000000
[    7.938293] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    7.958364] CR2: 0000000000000010 CR3: 000000003ccbb000 CR4: 00000000000006f0
[    7.978028] Stack:
[    7.997120]  ffff88003dac6000 ffff88003dac6410 0000000058049d01 ffffc90000227d28
[    8.016993]  ffff88003dac6000 ffff88003dac6410 ffff88003dac6420 ffffc90000227c98
[    8.039505]  ffffffff814f225d 0000001800227c98 000000090000002a 0000000900000011
[    8.059985] Call Trace:
[    8.080110]  [&lt;ffffffff814f225d&gt;] __rtc_set_alarm+0x8d/0xa0
[    8.099421]  [&lt;ffffffff814f2389&gt;] rtc_timer_enqueue+0x119/0x190
[    8.119925]  [&lt;ffffffff814f2e6e&gt;] rtc_update_irq_enable+0xbe/0x100
[    8.140583]  [&lt;ffffffff814f3bb0&gt;] rtc_dev_ioctl+0x3c0/0x480
[    8.161162]  [&lt;ffffffff81146b6a&gt;] ? user_path_at_empty+0x3a/0x50
[    8.182717]  [&lt;ffffffff8114aa36&gt;] do_vfs_ioctl+0x96/0x5c0
[    8.204624]  [&lt;ffffffff8113e066&gt;] ? vfs_stat+0x16/0x20
[    8.225994]  [&lt;ffffffff8113e135&gt;] ? SyS_newstat+0x15/0x30
[    8.247043]  [&lt;ffffffff8114afa7&gt;] SyS_ioctl+0x47/0x80
[    8.267191]  [&lt;ffffffff815f5c77&gt;] entry_SYSCALL_64_fastpath+0x1a/0xa9
[    8.288719] Code: 6a 81 48 89 e5 41 57 41 56 41 55 49 89 fd 41 54 53 48 89 f3 48 c7 c6 20 c4 78 81 48 83 ec 10 e8 8f 00 ef ff 4d 8b a5 a0 00 00 00 &lt;41&gt; 8b 44 24 10 85 c0 0f 8e 2b 02 00 00 4c 89 ef 31 c0 b9 53 01
[    8.335233] RIP  [&lt;ffffffff814f5b08&gt;] cmos_set_alarm+0x38/0x280
[    8.357096]  RSP &lt;ffffc90000227c10&gt;
[    8.379051] CR2: 0000000000000010
[    8.401736] ---[ end trace 5cbcd83a1f225ed3 ]---

This occur only when CONFIG_DEBUG_TEST_DRIVER_REMOVE is enabled and
CONFIG_RTC_DRV_CMOS builtin.

When cmos_set_alarm() is called dev is NULL and so trigger the deref via
cmos-&gt;irq

The problem comes from that the device is removed but no remove function
are called due to _exit_p().

This patch remove all _exit_p() annotation.

Signed-off-by: Corentin Labbe &lt;clabbe.montjoie@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: asm9260: fix module autoload</title>
<updated>2016-10-19T06:45:48Z</updated>
<author>
<name>Javier Martinez Canillas</name>
<email>javier@osg.samsung.com</email>
</author>
<published>2016-10-14T13:15:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=aa156c8aee22a24865bf94d0c4a5f604f687fa7d'/>
<id>urn:sha1:aa156c8aee22a24865bf94d0c4a5f604f687fa7d</id>
<content type='text'>
If the driver is built as a module, autoload won't work because the module
alias information is not filled so user-space can't match the registered
device with the corresponding module.

Export the module alias information using the MODULE_DEVICE_TABLE() macro.

Before this patch:

$ modinfo drivers/rtc/rtc-asm9260.ko | grep alias
$

After this patch:

$ modinfo drivers/rtc/rtc-asm9260.ko | grep alias
alias:          of:N*T*Calphascale,asm9260-rtcC*
alias:          of:N*T*Calphascale,asm9260-rtc

Signed-off-by: Javier Martinez Canillas &lt;javier@osg.samsung.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'rtc-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux</title>
<updated>2016-10-14T20:13:44Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-10-14T20:13:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8b70f716174d6a46787fcf72f8c569ef3efd9c27'/>
<id>urn:sha1:8b70f716174d6a46787fcf72f8c569ef3efd9c27</id>
<content type='text'>
Pull RTC updates from Alexandre Belloni:
 "RTC for 4.9

  Subsystem:
   - delete owner assignment in multiple drivers
   - constify rtc_class_ops structures

  Drivers:
   - ac100: support clock-output-names
   - cmos: properly handle ACPI alarms and quirky BIOSes and other fixes
   - ds1307: fix century bit support while staying comaptible with
     previous behaviour by default
   - ds1347: switch to regmap
   - isl12057 is now handled by ds1307
   - omap: support external wakeup
   - rv8803: allow to disable voltage drop detection"

* tag 'rtc-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (25 commits)
  rtc: rv8803: set VDETOFF and SWOFF via device tree
  dt/bindings: Add bindings for Micro Crystal rv8803
  devicetree: Add Micro Crystal AG vendor id
  rtc: cmos: avoid unused function warning
  rtc: ac100: Add NULL checking for devm_kzalloc call
  rtc: ds1347: changed raw spi calls to register map calls
  rtc: cmos: Restore alarm after resume
  rtc: cmos: Clear ACPI-driven alarms upon resume
  rtc: omap: Support ext_wakeup configuration
  rtc: cmos: Initialize hpet timer before irq is registered
  rtc: asm9260: rework locking
  rtc: asm9260: allow COMPILE_TEST
  rtc: constify rtc_class_ops structures
  rtc: ac100: support clock-output-names in device tree binding
  rtc: rx6110: remove owner assignment
  rtc: pic32: Delete owner assignment
  rtc: bq32k: Fix handling of oscillator failure flag
  rtc: bq32k: Use correct mask name for 'minutes' register.
  rtc: sysfs: fix a cast removing the const attribute
  Documentation: dt: Intersil isl12057 is not a trivial device
  ...
</content>
</entry>
<entry>
<title>rtc: rv8803: set VDETOFF and SWOFF via device tree</title>
<updated>2016-10-12T11:24:39Z</updated>
<author>
<name>Oleksij Rempel</name>
<email>fixed-term.Oleksij.Rempel@de.bosch.com</email>
</author>
<published>2016-06-29T14:40:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1cd713762e4cd5378a488fd6eaa7507bf030a832'/>
<id>urn:sha1:1cd713762e4cd5378a488fd6eaa7507bf030a832</id>
<content type='text'>
There might be designs where the power supply circuit is designed
in a way that VDETOFF and SWOFF is required to be set. Otherwise the
RTC detects a power loss. Add a device tree interface for this.

Signed-off-by: Carsten Resch &lt;Carsten.Resch@de.bosch.com&gt;
Signed-off-by: Dirk Behme &lt;dirk.behme@de.bosch.com&gt;
Signed-off-by: Oleksij Rempel &lt;fixed-term.Oleksij.Rempel@de.bosch.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>Merge branches 'ib-mfd-gpio-4.9', 'ib-mfd-gpio-regulator-4.9', 'ib-mfd-input-4.9', 'ib-mfd-regulator-4.9', 'ib-mfd-regulator-4.9.1', 'ib-mfd-regulator-rtc-4.9', 'ib-mfd-regulator-rtc-4.9-1' and 'ib-mfd-rtc-4.9' into ibs-for-mfd-merged</title>
<updated>2016-10-04T14:47:01Z</updated>
<author>
<name>Lee Jones</name>
<email>lee.jones@linaro.org</email>
</author>
<published>2016-10-04T14:47:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b304746c2a71fb0c001b5db93ea677d32f95b95f'/>
<id>urn:sha1:b304746c2a71fb0c001b5db93ea677d32f95b95f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rtc: cmos: avoid unused function warning</title>
<updated>2016-09-22T12:23:29Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2016-09-22T09:48:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=00f7f90c51dfc2403257e2c7410d453e72bf6a41'/>
<id>urn:sha1:00f7f90c51dfc2403257e2c7410d453e72bf6a41</id>
<content type='text'>
A bug fix for the ACPI side of this driver caused a harmless
build warning:

drivers/rtc/rtc-cmos.c:1115:13: error: 'cmos_check_acpi_rtc_status' defined but not used [-Werror=unused-function]
 static void cmos_check_acpi_rtc_status(struct device *dev,

We can avoid the warning and simplify the driver at the same time
by removing the #ifdef for CONFIG_PM and rely on the SIMPLE_DEV_PM_OPS()
to set everything up correctly. cmos_resume() has to get marked
as __maybe_unused so we don't introduce another warning, and
the two variants of cmos_poweroff() can get merged into one using
an IS_ENABLED() check.

Fixes: 983bf1256edb ("rtc: cmos: Clear ACPI-driven alarms upon resume")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: ac100: Add NULL checking for devm_kzalloc call</title>
<updated>2016-09-21T22:14:41Z</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2016-09-09T10:03:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=473195f80f3940afc8a1461831d74f9a44bba538'/>
<id>urn:sha1:473195f80f3940afc8a1461831d74f9a44bba538</id>
<content type='text'>
devm_kzalloc can return NULL, add NULL checking to prevent NULL pointer
dereference.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
</feed>
