Linux RTC
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: linux-rtc@vger.kernel.org
Subject: [PATCH 0/5] rtc: ds1307: factor out more stuff from ds1307_probe and improve ds1307_set_time
Date: Fri, 25 Aug 2017 21:30:09 +0200	[thread overview]
Message-ID: <cb381496-4d55-996d-e2ae-18880330e386@gmail.com> (raw)

Final goal of the refactoring is to abstract everything that the chips
have in common and handle it in generic code. Then we can get rid of
all the "switch (chip)" and "if (chip == xxx)" code.

To give one example:
A lot of chips have a bit for setting 12hr / 24hr mode. However some
chips have this config bit in the timekeeping registers, others in
a config register, and on some chips it's inverted.
But the functionality of the bit is always the same.

Ultimately adding support for a chip just requires to add one config
structure member.

The way to reach this goal is a long one and to faciliate reviewing
the patches I'll split them into series of 5 to 10 patches.

Heiner Kallweit (5):
  rtc: ds1307: factor out determining the chip type
  rtc: ds1307: factor out trickle charger initialization
  rtc: ds1307: factor out fixing the weekday
  rtc: ds1307: introduce constants for the timekeeping register masks
  rtc: ds1307: improve ds1307_set_time to respect config flag bits

 drivers/rtc/rtc-ds1307.c | 256 ++++++++++++++++++++++++++---------------------
 1 file changed, 140 insertions(+), 116 deletions(-)

-- 
2.14.1

             reply	other threads:[~2017-08-25 19:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-25 19:30 Heiner Kallweit [this message]
2017-08-25 20:06 ` [PATCH 1/5] rtc: ds1307: factor out determining the chip type Heiner Kallweit
2017-08-25 20:06 ` [PATCH 2/5] rtc: ds1307: factor out trickle charger initialization Heiner Kallweit
2017-08-25 20:06 ` [PATCH 3/5] rtc: ds1307: factor out fixing the weekday Heiner Kallweit
2017-08-25 20:06 ` [PATCH 4/5] rtc: ds1307: introduce constants for the timekeeping register masks Heiner Kallweit
2017-08-25 20:06 ` [PATCH 5/5] rtc: ds1307: improve ds1307_set_time to respect config flag bits Heiner Kallweit
2017-08-26  8:19 ` [PATCH 0/5] rtc: ds1307: factor out more stuff from ds1307_probe and improve ds1307_set_time Alexandre Belloni
2017-08-26 10:16   ` Heiner Kallweit
2017-08-26 10:44     ` Alexandre Belloni
2017-09-05  5:27       ` Heiner Kallweit
2018-01-17 22:14         ` Alexandre Belloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb381496-4d55-996d-e2ae-18880330e386@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=linux-rtc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox