<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/rtc/rtc-ds1307.c, branch linux-4.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.16.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2017-10-26T21:00:24Z</updated>
<entry>
<title>rtc: ds1307: add OF and ACPI entries for Epson RX8130</title>
<updated>2017-10-26T21:00:24Z</updated>
<author>
<name>Bastian Stender</name>
<email>bst@pengutronix.de</email>
</author>
<published>2017-10-17T12:46:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=47dd47292828a552d62d0e68b7cd6bdc99d9e0aa'/>
<id>urn:sha1:47dd47292828a552d62d0e68b7cd6bdc99d9e0aa</id>
<content type='text'>
Make Epson RX8130 device tree and ACPI aware.

Fixes: ee0981be7704 ("rtc: ds1307: Add support for Epson RX8130CE")
Signed-off-by: Bastian Stender &lt;bst@pengutronix.de&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: ds1307: improve weekday handling</title>
<updated>2017-10-12T12:16:09Z</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2017-08-29T19:52:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=584ce30c72954e5ec67aaf317d7cbffe6c2c97fa'/>
<id>urn:sha1:584ce30c72954e5ec67aaf317d7cbffe6c2c97fa</id>
<content type='text'>
The current code for checking and fixing the weekday in ds1307_probe
faces some issues:
- This check is applied to all chips even if its applicable (AFAIK)
  to mcp794xx only
- The check uses MCP794XX constants for registers and bits even though
  it's executed also on other chips (ok, this could be fixed easily)
- It relies on tm_wday being properly populated when core calls set_time
  and set_alarm. This is not guaranteed at all.

First two issue we could solve by moving the check to the
mcp794xx-specific initialization (where also VBATEN flag is set).

The proposed alternative is in the set_alarm path for mcp794xx only and
calculates the alarm weekday based on the current weekday in the RTC
timekeeping regs and the difference between alarm date and current date.
So we are fine with any weekday even if it doesn't match the date.

Still there are cases where this could fail, e.g.:
- rtc date/time + weekday have power-on-reset default values
- alarm is set to actual date/time + x
- set_time is called (may change diff between rtc weekday and actual
  weekday)

But similar issues we have with the current code too:
- rtc date/time + weekday have power-on-reset default values
- alarm is set to rtc date/time + x
- set_time is called before the alarm triggers

Using random rtc date/time with relative alarms simply can interfere
with set_time. I'm not totally convinced of either option yet.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'rtc-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux</title>
<updated>2017-09-13T17:56:00Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-09-13T17:56:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=561a8eb3e1d219f415597c76dae44b530b7f961a'/>
<id>urn:sha1:561a8eb3e1d219f415597c76dae44b530b7f961a</id>
<content type='text'>
Pull RTC updates from Alexandre Belloni:
 "Subsystem:
   - remove .open() and .release() RTC ops
   - constify i2c_device_id

  New driver:
   - Realtek RTD1295
   - Android emulator (goldfish) RTC

  Drivers:
   - ds1307: Beginning of a huge cleanup
   - s35390a: handle invalid RTC time
   - sun6i: external oscillator gate support"

* tag 'rtc-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (40 commits)
  rtc: ds1307: use octal permissions
  rtc: ds1307: fix braces
  rtc: ds1307: fix alignments and blank lines
  rtc: ds1307: use BIT
  rtc: ds1307: use u32
  rtc: ds1307: use sizeof
  rtc: ds1307: remove regs member
  rtc: Add Realtek RTD1295
  dt-bindings: rtc: Add Realtek RTD1295
  rtc: sun6i: Add support for the external oscillator gate
  rtc: goldfish: Add RTC driver for Android emulator
  dt-bindings: Add device tree binding for Goldfish RTC driver
  rtc: ds1307: add basic support for ds1341 chip
  rtc: ds1307: remove member nvram_offset from struct ds1307
  rtc: ds1307: factor out offset to struct chip_desc
  rtc: ds1307: factor out rtc_ops to struct chip_desc
  rtc: ds1307: factor out irq_handler to struct chip_desc
  rtc: ds1307: improve irq setup
  rtc: ds1307: constify struct chip_desc variables
  rtc: ds1307: improve trickle charger initialization
  ...
</content>
</entry>
<entry>
<title>rtc: ds1307: use octal permissions</title>
<updated>2017-09-05T07:55:05Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@free-electrons.com</email>
</author>
<published>2017-09-04T20:46:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b4be271cebb6f8b475f8bf2199091be8fe4c4278'/>
<id>urn:sha1:b4be271cebb6f8b475f8bf2199091be8fe4c4278</id>
<content type='text'>
Octal permissions are preferred over symbolic permissions.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: ds1307: fix braces</title>
<updated>2017-09-05T07:55:05Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@free-electrons.com</email>
</author>
<published>2017-09-04T20:46:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e69c056714974733aeb3ff114e9d434ea864d818'/>
<id>urn:sha1:e69c056714974733aeb3ff114e9d434ea864d818</id>
<content type='text'>
Fix unnecessary or unbalanced braces.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: ds1307: fix alignments and blank lines</title>
<updated>2017-09-05T07:55:05Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@free-electrons.com</email>
</author>
<published>2017-09-04T20:46:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4057a66e5333bf487c35a37119e3012a4b318e22'/>
<id>urn:sha1:4057a66e5333bf487c35a37119e3012a4b318e22</id>
<content type='text'>
Alignment should always match open parenthesis.
Also remove two unnecessary blank lines

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: ds1307: use BIT</title>
<updated>2017-09-05T07:55:04Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@free-electrons.com</email>
</author>
<published>2017-09-04T20:46:05Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=eb4fd19005b73be8d7f51b564aa87a59a7fb4328'/>
<id>urn:sha1:eb4fd19005b73be8d7f51b564aa87a59a7fb4328</id>
<content type='text'>
Use the BIT macro were possbiel.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: ds1307: use u32</title>
<updated>2017-09-05T07:55:04Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@free-electrons.com</email>
</author>
<published>2017-09-04T20:46:04Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=57ec2d9580760ce35d7c54b57f8e5f7e98049b8e'/>
<id>urn:sha1:57ec2d9580760ce35d7c54b57f8e5f7e98049b8e</id>
<content type='text'>
u32 should be used instead of uint32_t

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: ds1307: use sizeof</title>
<updated>2017-09-05T07:55:03Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@free-electrons.com</email>
</author>
<published>2017-09-04T20:46:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f2b4801201a46eaa9a00a39a1e2d5aa8c9864991'/>
<id>urn:sha1:f2b4801201a46eaa9a00a39a1e2d5aa8c9864991</id>
<content type='text'>
Use sizeof where possible to ensure we don't read/write more than the
allocated buffer.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: ds1307: remove regs member</title>
<updated>2017-09-05T07:55:03Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@free-electrons.com</email>
</author>
<published>2017-09-04T20:46:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=042fa8c7c04dd43b21be3ec5104681574a4f8f8c'/>
<id>urn:sha1:042fa8c7c04dd43b21be3ec5104681574a4f8f8c</id>
<content type='text'>
ds1307-&gt;regs is never used before being read or initialized locally. There
is no point in keeping a copy in memory.

Also limit the size of the read buffer to what is really used, rename buf
to regs for consistency and use sizeof() where possible.

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