linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] RTC changes for 5.15
@ 2021-09-11 15:59 Alexandre Belloni
  2021-09-11 17:05 ` Linus Torvalds
  2021-09-11 17:30 ` pr-tracker-bot
  0 siblings, 2 replies; 4+ messages in thread
From: Alexandre Belloni @ 2021-09-11 15:59 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-rtc, linux-kernel

Hello Linus,

Here is the RTC subsystem pull request for v5.15 which is very late.
I'll try to not make that a habit. The broken down time conversion is
similar to what is done in the time subsystem since v5.14. The rest is
fairly straightforward.

The following changes since commit e73f0f0ee7541171d89f2e2491130c7771ba58d3:

  Linux 5.14-rc1 (2021-07-11 15:07:40 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git tags/rtc-5.15

for you to fetch changes up to 0c45d3e24ef3d3d87c5e0077b8f38d1372af7176:

  rtc: rx8010: select REGMAP_I2C (2021-09-09 10:18:40 +0200)

----------------------------------------------------------------
RTC for 5.15

Subsystem:
 - Switch to Neri and Schneider time conversion algorithm

Drivers:
 - rx8025: add rx8035 support
 - s5m: modernize driver and set range

----------------------------------------------------------------
Alexandre Belloni (6):
      rtc: s5m: switch to devm_rtc_allocate_device
      rtc: s5m: signal the core when alarm are not available
      rtc: s5m: enable wakeup only when available
      rtc: s5m: set range
      rtc: lib_test: add MODULE_LICENSE
      rtc: move RTC_LIB_KUNIT_TEST to proper location

Cassio Neri (1):
      rtc: Improve performance of rtc_time64_to_tm(). Add tests.

Dmitry Osipenko (1):
      rtc: tps65910: Correct driver module alias

Mateusz Jończyk (1):
      rtc: cmos: remove stale REVISIT comments

Mathew McBride (2):
      rtc: rx8025: implement RX-8035 support
      dt-bindings: rtc: add Epson RX-8025 and RX-8035

Yu-Tung Chang (1):
      rtc: rx8010: select REGMAP_I2C

 .../devicetree/bindings/rtc/trivial-rtc.yaml       |   3 +
 drivers/rtc/Kconfig                                |  10 ++
 drivers/rtc/Makefile                               |   2 +
 drivers/rtc/lib.c                                  | 107 +++++++++++++++------
 drivers/rtc/lib_test.c                             |  81 ++++++++++++++++
 drivers/rtc/rtc-cmos.c                             |   8 +-
 drivers/rtc/rtc-rx8025.c                           |  46 ++++++++-
 drivers/rtc/rtc-s5m.c                              |  48 ++++-----
 drivers/rtc/rtc-tps65910.c                         |   2 +-
 9 files changed, 243 insertions(+), 64 deletions(-)
 create mode 100644 drivers/rtc/lib_test.c

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] RTC changes for 5.15
  2021-09-11 15:59 [GIT PULL] RTC changes for 5.15 Alexandre Belloni
@ 2021-09-11 17:05 ` Linus Torvalds
  2021-09-11 19:46   ` Alexandre Belloni
  2021-09-11 17:30 ` pr-tracker-bot
  1 sibling, 1 reply; 4+ messages in thread
From: Linus Torvalds @ 2021-09-11 17:05 UTC (permalink / raw)
  To: Alexandre Belloni; +Cc: linux-rtc, Linux Kernel Mailing List

On Sat, Sep 11, 2021 at 8:59 AM Alexandre Belloni
<alexandre.belloni@bootlin.com> wrote:
>
> The broken down time conversion is similar to what is done
> in the time subsystem since v5.14.

By "similar" you mean "identical", no?

Why is the rtc subsystem not just using the generic time64_to_tm()?

Yes, yes, I realize that due to historical mistakes, there's a
duplicate 'struct rtc_time' struct, but it turns out that that is
_identical_ to 'struct tm' except it also has a 'int tm_isdst' at the
end.

So you could literally make a union of the two, pass the 'struct tm'
part down to the generic code, and just do

     rtc_tm->tm_isdst = 0;

at the end.

Rather than have a duplicate copy of that admittedly clever Neri and
Schneider algorithm.

Hmm?

             Linus

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] RTC changes for 5.15
  2021-09-11 15:59 [GIT PULL] RTC changes for 5.15 Alexandre Belloni
  2021-09-11 17:05 ` Linus Torvalds
@ 2021-09-11 17:30 ` pr-tracker-bot
  1 sibling, 0 replies; 4+ messages in thread
From: pr-tracker-bot @ 2021-09-11 17:30 UTC (permalink / raw)
  To: Alexandre Belloni; +Cc: Linus Torvalds, linux-rtc, linux-kernel

The pull request you sent on Sat, 11 Sep 2021 17:59:18 +0200:

> git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git tags/rtc-5.15

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/107ccc45bb25c7fdc7a744496caa4d8a52af4812

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] RTC changes for 5.15
  2021-09-11 17:05 ` Linus Torvalds
@ 2021-09-11 19:46   ` Alexandre Belloni
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Belloni @ 2021-09-11 19:46 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-rtc, Linux Kernel Mailing List

On 11/09/2021 10:05:02-0700, Linus Torvalds wrote:
> On Sat, Sep 11, 2021 at 8:59 AM Alexandre Belloni
> <alexandre.belloni@bootlin.com> wrote:
> >
> > The broken down time conversion is similar to what is done
> > in the time subsystem since v5.14.
> 
> By "similar" you mean "identical", no?
> 
> Why is the rtc subsystem not just using the generic time64_to_tm()?
> 
> Yes, yes, I realize that due to historical mistakes, there's a
> duplicate 'struct rtc_time' struct, but it turns out that that is
> _identical_ to 'struct tm' except it also has a 'int tm_isdst' at the
> end.
> 
> So you could literally make a union of the two, pass the 'struct tm'
> part down to the generic code, and just do
> 
>      rtc_tm->tm_isdst = 0;
> 
> at the end.
> 
> Rather than have a duplicate copy of that admittedly clever Neri and
> Schneider algorithm.
> 
> Hmm?
> 

Yes, most of it is historical, I did have a look at removing the copy
but at the time, rtc_time64_to_tm was slightly more efficient because
it knew the time was positive.

The other issue is that struct rtc_time is exposed to userspace while
the kernel struct tm is not and this would tie both struct and if you
look close enough, struct tm has long tm_year and struct rtc_time has
int tm_year which on 32-bit ARM has a different size.

I've been reluctant to change struct tm because I didn't take the time
to check the impact on all the users (IIRC, mainly in filesystems).

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-11 19:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-11 15:59 [GIT PULL] RTC changes for 5.15 Alexandre Belloni
2021-09-11 17:05 ` Linus Torvalds
2021-09-11 19:46   ` Alexandre Belloni
2021-09-11 17:30 ` pr-tracker-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).