linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: linux-rtc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>
Subject: [PATCH 00/11] RTC: rework registration
Date: Thu,  6 Jul 2017 11:41:57 +0200	[thread overview]
Message-ID: <20170706094208.16240-1-alexandre.belloni@free-electrons.com> (raw)

There are multiple race condition issues in the RTC drivers. It is
especially apparent in the IRQ handling and additionnal sysfs attributes
registration.

To solve most of those and allow to extend the framework more easily,
introduce a new registration method that allows to first allocate an
rtc_device and then register it.

Also, introduce a generic way to register nvmem devices so RTCs can
export their non volatile storage.

One of the goal will be to get rid of the IS_ERR_OR_NULL(rtc) check in
rtc_update_irq which makes people assume everything is properly handled
in the core.

Alexandre Belloni (11):
  rtc: class separate device allocation from registration
  rtc: class separate id allocation from registration
  rtc: introduce new registration method
  rtc: at91rm9200: remove race condition
  rtc: add generic nvmem support
  rtc: rv8803: switch to rtc_register_device
  rtc: rv8803: use generic nvmem support
  rtc: rv8803: remove rv8803_remove
  rtc: ds1307: switch to rtc_register_device
  rtc: ds1307: use generic nvmem
  rtc: ds1307: remove ds1307_remove

 Documentation/rtc.txt        |   2 +
 drivers/rtc/Kconfig          |   8 ++
 drivers/rtc/Makefile         |   1 +
 drivers/rtc/class.c          | 195 +++++++++++++++++++++++++++++++++----------
 drivers/rtc/nvmem.c          | 113 +++++++++++++++++++++++++
 drivers/rtc/rtc-at91rm9200.c |  14 ++--
 drivers/rtc/rtc-core.h       |   8 ++
 drivers/rtc/rtc-ds1307.c     | 103 +++++++----------------
 drivers/rtc/rtc-rv8803.c     |  72 +++++++---------
 include/linux/rtc.h          |  14 ++++
 10 files changed, 362 insertions(+), 168 deletions(-)
 create mode 100644 drivers/rtc/nvmem.c

-- 
2.11.0

             reply	other threads:[~2017-07-06  9:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-06  9:41 Alexandre Belloni [this message]
2017-07-06  9:41 ` [PATCH 01/11] rtc: class separate device allocation from registration Alexandre Belloni
2017-07-06  9:41 ` [PATCH 02/11] rtc: class separate id " Alexandre Belloni
2017-07-06  9:42 ` [PATCH 03/11] rtc: introduce new registration method Alexandre Belloni
2017-07-06  9:42 ` [PATCH 04/11] rtc: at91rm9200: remove race condition Alexandre Belloni
2017-07-06  9:42 ` [PATCH 05/11] rtc: add generic nvmem support Alexandre Belloni
2017-07-06  9:42 ` [PATCH 06/11] rtc: rv8803: switch to rtc_register_device Alexandre Belloni
2017-07-06  9:42 ` [PATCH 07/11] rtc: rv8803: use generic nvmem support Alexandre Belloni
2017-07-06  9:42 ` [PATCH 08/11] rtc: rv8803: remove rv8803_remove Alexandre Belloni
2017-07-06  9:42 ` [PATCH 09/11] rtc: ds1307: switch to rtc_register_device Alexandre Belloni
2017-07-06  9:42 ` [PATCH 10/11] rtc: ds1307: use generic nvmem Alexandre Belloni
2017-07-06  9:42 ` [PATCH 11/11] rtc: ds1307: remove ds1307_remove 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=20170706094208.16240-1-alexandre.belloni@free-electrons.com \
    --to=alexandre.belloni@free-electrons.com \
    --cc=linux-kernel@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).