Skip to content

add devicetree bindings for rtc-m48t86

Ryan Mallon linux-arm-kernel linux-devicetree 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 of 3 patches 0 repliesNew

1 of 3 patches is in this archive. The cover letter announces 3.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3rtc: rtc-m48t86: add devicetree bindings+0 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] add devicetree bindings for rtc-m48t86
Quoted 17 lines · Ryan Mallon
Quoted 12 lines · Alexander Clouter

Currently there are two users of rtc-m48t86 (mach-ep93xx/ts72xx.c and mach-orion5x/ts78xx-setup.c) and both just use {read,write}b against a memory mapped region. As I am devicetree'ing the TS-7800, this driver needs converting and thats what this patchset does.

The patch does the following:
* remove platform specific ops hooks, moving ioremap'ing and everything into the driver
* utilises named resources to indicate index/data ranges
* moves the RTC detection routine from ts78xx-setup.c into rtc-m48t86.c
* and, of course, enable devicetree hooks and include documentation

Quoted 3 lines

Awkward step, the first patch breaks both boards, the two following patches fix them. Happy to re-work this if folks give me a pointer on how to do this in an acceptable way.

Quoted 8 lines

Sorry, that's no good. It breaks things like git bisect.

Quoted 2 lines

My vote is to break fast, fix fast, spend the time writing other code :)

The patch series will need to be reworked so that there is no build/runtime breakage between any of the patches. I'll have a read through and see if I can suggest something.

So looking through the patches, you are going to need to modify the rtc driver and the platform code in the same patch at least once since you are changing the interface. You could break the patches down like this:

1) Move the rtc detection from the orion5x board to the rtc driver. This adds the detection support for the ep93xx board also.

2) Replace the board read/write ops structure with ioremapped regions.

3) Add the device tree bindings to the rtc driver.

The first two patches could be combined, but will touch both the rtc driver and the platform code, and do the prep work needed for adding the dt bindings. The third patch can then stand on its own, and more clearly just adds the dt bindings.

~Ryan