linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC V1 0/3]  da9062: Add DA9062 RTC support using the existing DA9063 RTC driver
@ 2015-07-09  7:45 S Twiss
  2015-07-09  7:45 ` [PATCH RFC V1 2/3] rtc: da9063: Add DA9062 RTC capability to " S Twiss
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: S Twiss @ 2015-07-09  7:45 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni, DEVICETREE, Ian Campbell,
	Kumar Gala, LINUXINPUT, LINUXKERNEL, Lee Jones, Mark Rutland,
	Pawel Moll, RTCLINUX, Rob Herring, S Twiss, Samuel Ortiz
  Cc: David Dajun Chen, Support Opensource

From: S Twiss <stwiss.opensource@diasemi.com>

This patch set adds RTC support for the Dialog DA9062 Power Management IC.
Changes are made to the existing DA9063 RTC component so that functionality
in this device driver can be re-used to support the DA9062 RTC.

This following patch set is the proposed method for re-using existing kernel
RTC drivers for chips whose RTC blocks are functionally similar to the
DA9063 RTC.

There is already a precedence for reuse of this type in the kernel, see
linux-mainline/v4.1 drivers/rtc/rtc-pm8xxx.c +34
This patch set will follow that example.

The main points for the MFD core and device tree changes are as follows.

- Alteration of the DA9063 RTC Kconfig needs to be updated to depend on
  both MFD_DA9063 "or" MFD_DA9062. There is no explicit DA9062 RTC Kconfig.
- The DA9062 MFD core should add a new RTC resource as usual and an entry
  in the mfd_cell to support a component name and of_compatible for
  "da9062-rtc" and "dlg,da9062-rtc".
- The device tree binding support should include a compatible string for
  "dlg,da9062-rtc"

The main points for the RTC changes are as follows:

A generic structure is used (called da9063_compatible_rtc_regmap) to hold
all generic registers and bitmasks for use with this type of RTC component.

Functions in the DA9063 RTC will be refactored to use this compatibility
struct and all accesses to generic registers/masks will be made through
this table look-up instead of using defines from the register header files
directly

Linkage between the DA9062 MFD and the DA9063 RTC driver is created through
the use of an of_match_table entry in the platform_driver structure.
A re-work of da9063_rtc_probe() is necessary to use the of_match_node() and
dev_get_regmap() functions: this will provide initialisation of the generic
registers and masks and allow access to the regmap according to the correct
device tree specification.

The addition of a of_device_id table for DA9063 and DA9062 default data
is created. This method of initialisation for the DA9063 RTC component
works well for different chip types, and is only slightly complicated when
distinguishing the difference between support for DA9063-AD and DA9063-BB.

In this patch set the following is provided:
 - [PATCH V1 1/3]: MFD changes in DA9062 to support RTC
 - [PATCH V1 2/3]: Update existing DA9063 RTC to add DA9062 support
 - [PATCH V1 3/3]: Device tree bindings for DA9062 RTC component

This patch applies against linux-next and next-20150708 

Thank you,
Steve Twiss, Dialog Semiconductor Ltd.

S Twiss (3):
  mfd: da9062: Support for the DA9063 RTC in the DA9062 core
  rtc: da9063: Add DA9062 RTC capability to DA9063 RTC driver
  devicetree: da9062: Add device tree bindings for DA9062 RTC

 Documentation/devicetree/bindings/mfd/da9062.txt |   9 +
 drivers/mfd/da9062-core.c                        |  11 +
 drivers/rtc/Kconfig                              |   6 +-
 drivers/rtc/rtc-da9063.c                         | 435 ++++++++++++++++-------
 4 files changed, 330 insertions(+), 131 deletions(-)

-- 
end-of-patch for PATCH RFC V1


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

end of thread, other threads:[~2015-07-21  8:39 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-09  7:45 [PATCH RFC V1 0/3] da9062: Add DA9062 RTC support using the existing DA9063 RTC driver S Twiss
2015-07-09  7:45 ` [PATCH RFC V1 2/3] rtc: da9063: Add DA9062 RTC capability to " S Twiss
2015-07-17 23:45   ` Alexandre Belloni
2015-07-20 17:57     ` Opensource [Steve Twiss]
2015-07-20 21:50       ` Alexandre Belloni
2015-07-21  8:05         ` Opensource [Steve Twiss]
2015-07-21  8:39           ` Alexandre Belloni
2015-07-09  7:45 ` [PATCH RFC V1 1/3] mfd: da9062: Support for the DA9063 RTC in the DA9062 core S Twiss
2015-07-09  7:45 ` [PATCH RFC V1 3/3] devicetree: da9062: Add device tree bindings for DA9062 RTC S Twiss
2015-07-17 23:47   ` Alexandre Belloni
2015-07-20 17:08     ` Opensource [Steve Twiss]
2015-07-20 21:07       ` Alexandre Belloni
2015-07-09  8:01 ` [PATCH RFC V1 0/3] da9062: Add DA9062 RTC support using the existing DA9063 RTC driver Geert Uytterhoeven
     [not found]   ` <CAMuHMdU_AUZ9nxo25NeaFq1MeeSDZErqkNnDtXsdr7=jLm1kTw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-09  8:42     ` Opensource [Steve Twiss]
     [not found]       ` <6ED8E3B22081A4459DAC7699F3695FB7014B23FDDA-68WUHU125fLzLL1Oxlh9IgLouzNaz+3S@public.gmane.org>
2015-07-09  9:06         ` Geert Uytterhoeven

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).