AMLogic RTC series (second round)
Apologies, forgot to put the RTC driver through checkpatch before sending. This gets rid of most of the warnings.
PATCH v2 1/4 rtc: support for amlogic meson rtc
Add support for the AMLogic meson8b/meson6 RTC block.
--- drivers/rtc/Kconfig | 10 ++ drivers/rtc/Makefile | 1 + drivers/rtc/rtc-meson.c | 339 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 350 insertions(+) create mode 100644 drivers/rtc/rtc-meson.c
drivers/rtc/Kconfig +10 -0
@@ -1210,6 +1210,16 @@ config RTC_DRV_IMXDI This driver can also be built as a module, if so, the module will be called "rtc-imxdi". +config RTC_DRV_MESON + tristate "AMLogic Meson Real Time Clock" + depends on ARCH_MESON || COMPILE_TEST + help + Support for AMLogic Meson RTC block. + + This driver can also be built as a module, if so, the module + will be called "rtc-meson". + + config RTC_DRV_OMAP tristate "TI OMAP Real Time Clock" depends on ARCH_OMAP || ARCH_DAVINCI || COMPILE_TEST
drivers/rtc/Makefile +1 -0
@@ -92,6 +92,7 @@ obj-$(CONFIG_RTC_DRV_MAX8997) += rtc-max8997.o obj-$(CONFIG_RTC_DRV_MAX8998) += rtc-max8998.o obj-$(CONFIG_RTC_DRV_MC13XXX) += rtc-mc13xxx.o obj-$(CONFIG_RTC_DRV_MCP795) += rtc-mcp795.o +obj-$(CONFIG_RTC_DRV_MESON) += rtc-meson.o obj-$(CONFIG_RTC_DRV_MOXART) += rtc-moxart.o obj-$(CONFIG_RTC_DRV_MPC5121) += rtc-mpc5121.o obj-$(CONFIG_RTC_DRV_VRTC) += rtc-mrst.o
drivers/rtc/rtc-meson.c new file +339 -0
339 lines not on this page · raw message
Signature · 1 line
2.8.1
PATCH v2 2/4 meson-rtc: add device-tree binding
In reply to Ben DooksAdd documentation for the AMLogic Meson RTC.
--- .../devicetree/bindings/rtc/rtc-amlogic.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/rtc-amlogic.txt
Documentation/devicetree/bindings/rtc/rtc-amlogic.txt new file +21 -0
@@ -0,0 +1,21 @@ +* AMlogic Meson RTC + +Required properties: +- compatible: should be one of the following describing the hardware: + * "amlogic,meson6-rtc" + * "amlogic,meson8-rtc" + * "amlogic,meson8b-rtc" + +- reg: physical register space for the controller's memory mapped registers. + +Optional properties: +- resets: reset controller reference to allow reset of the controller +- interrupts: single interrupt reference if interrupt support needed + +Example: + + rtc: rtc at c8100740 { + compatible = "amlogic,meson6-rtc"; + reg = <0xc8100740 0x14>; + status = "disabled"; + };
Signature · 1 line
2.8.1
PATCH v2 3/4 ARM: dts: amlogic: add rtc node for meson8b
In reply to Ben DooksAdd the DT node for the RTC support.
--- arch/arm/boot/dts/meson8b.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/boot/dts/meson8b.dtsi +7 -0
@@ -149,6 +149,13 @@ status = "disabled"; }; + rtc: rtc at c8100740 { + compatible = "amlogic,meson8b-rtc"; + reg = <0xc8100740 0x14>; + resets = <&reset RESET_RTC>; + status = "disabled"; + }; + clkc: clock-controller at c1104000 { #clock-cells = <1>; compatible = "amlogic,meson8b-clkc";
Signature · 1 line
2.8.1
PATCH v2 4/4 ARM: meson: enable RTC for ODroid-C1
In reply to Ben DooksNow the RTC node has been added, enable it on the ODroid-C1 board. Note, the C1 does not have a battery by default, so the RTC will error out on those boards. The C1+ does have power to the RTC block whilst the external power is applied.
--- arch/arm/boot/dts/meson8b-odroidc1.dts | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/boot/dts/meson8b-odroidc1.dts +5 -0
@@ -76,3 +76,8 @@ pinctrl-0 = <&uart_ao_a_pins>; pinctrl-names = "default"; }; + +&rtc { + status = "okay"; +}; +
Signature · 1 line
2.8.1
Quoted 9 lines · Ben Dooks
Apologies, forgot to put the RTC driver through checkpatch before sending. This gets rid of most of the warnings.
_______________________________________________
linux-amlogic mailing list
linux-amlogic at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
Hi Ben,
The patchset looks good but misses some quick introduction on how the RTC works, it seems to be connected to an internal serial bus, do you have some informations about this ?
Then, the cover letter of your patchset should contain much more informations that "git format-patch --cover-letter" generates.
My personal workflow when I have a set ready is :
* run checkpatch on C files and check my changes
# scripts/checkpatch.pl -f path/to/my/driver.c * I identify the number of patches to include * I generate the patches with cover-letter, signoff and eventually subject-prefix, here for 4 commits # git format-patch --cover-letter -s -4 --subject-prefix "PATCH v2" -o my_drivers_patches_v2 * Then I complete the cover letter in my_drivers_patches_v2/0000-cover-letter * I also reference a small changelog between patchset version and identify the previous cover letter via it's message id Use the http://lkml.kernel.org service to reference a message-id, i.e this email I answer would be referenced by : http://lkml.kernel.org/r/1467045849-495-1-git-send-email-ben.dooks at codethink.co.uk while looking at the email headers at : Message-Id: <[email protected]> * Then I look again all the patches and check all the descriptions * I re-run a checkpatch.pl on all the patches (and ignore errors on the cover letter) # scripts/checkpatch.pl my_drivers_patches_v2/* * I identify all the maintainers and mailing lists # scripts/get_maintainer.pl my_drivers_patches_v2/* * Personally, I fill the CC: and To: in the headers of each patches, only adding the devicetree mailing list on DT related patches * Then I send them via git send-email # git send-email my_drivers_patches_v2/* => here you can also select the recipients => you can also do a dry run or send yourself the patchset to check before final sending
Another rule is time, please wait at least 1 week after the last review before send another run, and give yourself more time to check the integrity of the patchset.
Neil
Quoted 11 lines · Neil Armstrong
Quoted 9 lines · Ben Dooks
Apologies, forgot to put the RTC driver through checkpatch before sending. This gets rid of most of the warnings.
_______________________________________________
linux-amlogic mailing list
linux-amlogic at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
Quoted 5 lines
Hi Ben,
The patchset looks good but misses some quick introduction on how the RTC works, it seems to be connected to an internal serial bus, do you have some informations about this ?
I might add a few lines into the rtc-meson.c driver, but that's all detailed in the datasheet (for once this seems to be documented enough to be able to function)
Quoted 2 lines
Then, the cover letter of your patchset should contain much more informations that "git format-patch --cover-letter" generates.
I may just re-submit once patch to add the RTC and the binding documentation, and then wait until the reset controller bits have landed before submitting the
Quoted 11 lines
My personal workflow when I have a set ready is :
* run checkpatch on C files and check my changes
# scripts/checkpatch.pl -f path/to/my/driver.c * I identify the number of patches to include * I generate the patches with cover-letter, signoff and eventually subject-prefix, here for 4 commits # git format-patch --cover-letter -s -4 --subject-prefix "PATCH v2" -o my_drivers_patches_v2 * Then I complete the cover letter in my_drivers_patches_v2/0000-cover-letter * I also reference a small changelog between patchset version and identify the previous cover letter via it's message id Use the http://lkml.kernel.org service to reference a message-id, i.e this email I answer would be referenced by : http://lkml.kernel.org/r/1467045849-495-1-git-send-email-ben.dooks at codethink.co.uk
I keep a copy of sent email anyway, so can get the message-ids out of it.
Quoted 4 lines
while looking at the email headers at :
Message-Id: <[email protected]>
* Then I look again all the patches and check all the descriptions
* I re-run a checkpatch.pl on all the patches (and ignore errors on the cover letter)
Quoted 8 lines
# scripts/checkpatch.pl my_drivers_patches_v2/* * I identify all the maintainers and mailing lists # scripts/get_maintainer.pl my_drivers_patches_v2/* * Personally, I fill the CC: and To: in the headers of each patches, only adding the devicetree mailing list on DT related patches * Then I send them via git send-email # git send-email my_drivers_patches_v2/* => here you can also select the recipients => you can also do a dry run or send yourself the patchset to check before final sending
I got sparse and checkpatch confused, and only did sparse on the series.
Signature · 2 lines
Ben Dooks http://www.codethink.co.uk/ Senior Engineer Codethink - Providing Genius
Rob Herring
maintainerPATCH v2 2/4 meson-rtc: add device-tree binding
In reply to Ben DooksQuoted 7 lines · Ben Dooks
Add documentation for the AMLogic Meson RTC.
Signed-off-by Ben Dooks <[email protected]>--- .../devicetree/bindings/rtc/rtc-amlogic.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/rtc-amlogic.txt