BPI-R2 already has an on-board RTC

(Frank W.) #21

thanks, like my fix :wink:

(Frank W.) #22


it seems that poweroff from 4.19-rc1 is not compatible with 4.19 final. i have added 2 includes to get it compilable, but board does not poweroff completely

power consumption is 1 W instead of 0.2W and all leds are going in a darker mode, but lit all, also network-leds stay on

also in this strange mode reset-switch does not work

i also changed this because i load kernel from tftp


can help here again? it seems that the main files (drivers/mfd/mt6397-core.c, drivers/rtc/rtc-mt6397.c) are not changed in last time

https://patchwork.kernel.org/patch/10593453/ seems not to be merged…that was my first thought

@moore @linkerosa @Jackzeng can you help here? Something seems to be changed between rc1 and final (or rc7…had same behaviour while testing hdmi)

edit: mhm, it seems that tjis issue depends on any module…if i boot from sd-card with modules poweroff works like expected…if i boot kernel from tftp (only uImage) it does not working


Hello Frank,

So I have now tested 4.19. With me everything is as it should be at boot by sd. With tftp I have not tested, but are you sure that the kernel synonymous to the modules fits. “uname -a” and module-path.


(Frank W.) #24

On tftp i have no modules (load only uimage) so i guess i need any module for this to work…this i want to make builtin. But i don’t know which module it is…the rtc and power are already builtin. Keyboard-pmic should be module for users who have soldered power-switch

(Frank W.) #25

@jofri can you try to make your Patch included in mainline?



do you mean in your master branch?

(Frank W.) #27

i mean making it ready to post to linux-mediatek :wink:

like i did for dsa-patches and will do for fbdev if i get answer from CK Hu :slight_smile:

make a git format-patch and then a scripts/checkpatch.pl


this removes some code and i don’t know why…you have to describe it and maybe split into multiple parts. but when it is in mainline it will be maintained.


Hello Frank,

I inserted poweroff in your branch ‘origin / 4.20-rc’

(last commit 7dfcda746c0d50aae40839327753eda165320f9d)

and tested it with checkpatch.pl without error.

The compiler runs without errors. Unfortunately I can not check the kernel myself, because my R2 is in use elsewhere.

0001-add-doc-and-MAINTAINERS-for-poweroff.patch (4,4 KB) 0002-add-dts-for-poweroff.patch (1,1 KB) 0003-add-driver-and-MAINTAINERS-for-poweroff.patch (15,3 KB)

(Frank W.) #29

Thank you,i test it as far as i can

btw. For multi-patch you need also cover-letter (description what series do) its a textfile beginning with 0000- (patch 0/x) created by format-patch --cover-letter

Is it necessary to remove rtc for poweroff?


Thanks, I’ve learned a lot here. A year ago, I did not start to mess with git. Also docuwiki arouses my interest.At the moment I am dealing with the BPI-W2. This is a big construction site.


(Frank W.) #31

a sorry, you move the code (to rtc.h) not remove it…

btw. i also started with git here with my first kernel (while getting 4.14 running (sd-card issue) )

you should drop my defconfig in your Patch because this does not exist on mainline (and brings warning because i’ve already set option while copy from 4.19)

will now compile and test it…

nano /etc/acpi/events/power



service acpid restart

rebased my 4.20-poweroff to avoid the warning (maybe will cause problems if i want to merge…but will not do this on rc)

(Frank W.) #32

@jofri have you tried to send it to mainline? Any problems? Have you created cover-letter?