linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* out of tree rtc driver RX8900CE, has anybody updated it to the new v5 kernel interface?
@ 2021-01-24 14:07  
  2021-06-20 22:08 ` Alexandre Belloni
  0 siblings, 1 reply; 2+ messages in thread
From:   @ 2021-01-24 14:07 UTC (permalink / raw)
  To: linux-rtc

­Hi All,

I have a RX8900CE rtc, connected to the i2c bus of a raspberry pi. I've gotten a kernel module from the manufacturer of the chip [1][2], it's based on the kernel module for the RX-8025 [3]. I've compiled it with this makefile [4]:

This all worked without any problem, in kernel 4.19.76 but in newer kernels the structure of the rtc drivers has changed.

Has anybody already converted the RX8900CE driver to the new kernel interface?
After I update the kernel module, what steps do I have to take so it can be included in the mainline kernel?

Cheers,
Cedric


[1] https://www5.epsondevice.com/en/information/support/linux_rtc/down_load.html
[2] https://www5.epsondevice.com/en/information/support/soft/rx8900_k3.8-v1.0.zip
[3] https://github.com/torvalds/linux/blob/master/drivers/rtc/rtc-rx8025.c
[4] 
RX8900_DIR = $(shell pwd)
KSRC = /lib/modules/$(KVER)/build
KVER = $(shell uname -r)
MODDESTDIR = /lib/modules/$(KVER)/kernel/drivers/rtc

CROSS_COMPILE	=

AS              = $(CROSS_COMPILE)as
LD              = $(CROSS_COMPILE)ld
CC              = $(CROSS_COMPILE)gcc
CPP             = $(CC) -E
AR              = $(CROSS_COMPILE)ar
NM              = $(CROSS_COMPILE)nm
STRIP           = $(CROSS_COMPILE)strip
OBJCOPY         = $(CROSS_COMPILE)objcopy
OBJDUMP         = $(CROSS_COMPILE)objdump
DEPMOD          = /sbin/depmod
INSTALL			= /usr/bin/install
GREP			= /bin/grep

obj-m += rtc-rx8900.o

all:
	modules

modules:
	$(MAKE) -C $(KSRC) M=$(RX8900_DIR) CC=$(CC) modules

install: modules
	@$(GREP) rtc-rx8900.ko /lib/modules/$(shell uname -r)/modules.dep && rm -fr $(MODDESTDIR)/rtc-rx8900.ko || echo "No system rtc-rx8900.ko file found. Install the new rtc-rx8900.ko driver into the system"
	$(INSTALL) -p -m 644 rtc-rx8900.ko $(MODDESTDIR)
	@$(DEPMOD) -a
	
uninstall:
	@$(GREP) rtc-rx8900.ko /lib/modules/$(shell uname -r)/modules.dep && rm -fr $(MODDESTDIR)/rtc-rx8900.ko || echo "Remove the rtc-rx8900.ko driver from the system"
	@$(DEPMOD) -a
	
clean:
	$(MAKE) -C $(KSRC) M=$(RX8900_DIR) CC=$(CC) clean


---

Take your mailboxes with you. Free, fast and secure Mail & Cloud: https://www.eclipso.eu - Time to change!



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

* Re: out of tree rtc driver RX8900CE, has anybody updated it to the new v5 kernel interface?
  2021-01-24 14:07 out of tree rtc driver RX8900CE, has anybody updated it to the new v5 kernel interface?  
@ 2021-06-20 22:08 ` Alexandre Belloni
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2021-06-20 22:08 UTC (permalink / raw)
  To: Cedric.dewijs; +Cc: linux-rtc

Hello,

This is a late reply (I forgot about this email) but have you seen
drivers/rtc/rtc-rv8803.c ?

Regards,

On 24/01/2021 15:07:52+0100,   wrote:
> ­Hi All,
> 
> I have a RX8900CE rtc, connected to the i2c bus of a raspberry pi. I've gotten a kernel module from the manufacturer of the chip [1][2], it's based on the kernel module for the RX-8025 [3]. I've compiled it with this makefile [4]:
> 
> This all worked without any problem, in kernel 4.19.76 but in newer kernels the structure of the rtc drivers has changed.
> 
> Has anybody already converted the RX8900CE driver to the new kernel interface?
> After I update the kernel module, what steps do I have to take so it can be included in the mainline kernel?
> 
> Cheers,
> Cedric
> 
> 
> [1] https://www5.epsondevice.com/en/information/support/linux_rtc/down_load.html
> [2] https://www5.epsondevice.com/en/information/support/soft/rx8900_k3.8-v1.0.zip
> [3] https://github.com/torvalds/linux/blob/master/drivers/rtc/rtc-rx8025.c
> [4] 
> RX8900_DIR = $(shell pwd)
> KSRC = /lib/modules/$(KVER)/build
> KVER = $(shell uname -r)
> MODDESTDIR = /lib/modules/$(KVER)/kernel/drivers/rtc
> 
> CROSS_COMPILE	=
> 
> AS              = $(CROSS_COMPILE)as
> LD              = $(CROSS_COMPILE)ld
> CC              = $(CROSS_COMPILE)gcc
> CPP             = $(CC) -E
> AR              = $(CROSS_COMPILE)ar
> NM              = $(CROSS_COMPILE)nm
> STRIP           = $(CROSS_COMPILE)strip
> OBJCOPY         = $(CROSS_COMPILE)objcopy
> OBJDUMP         = $(CROSS_COMPILE)objdump
> DEPMOD          = /sbin/depmod
> INSTALL			= /usr/bin/install
> GREP			= /bin/grep
> 
> obj-m += rtc-rx8900.o
> 
> all:
> 	modules
> 
> modules:
> 	$(MAKE) -C $(KSRC) M=$(RX8900_DIR) CC=$(CC) modules
> 
> install: modules
> 	@$(GREP) rtc-rx8900.ko /lib/modules/$(shell uname -r)/modules.dep && rm -fr $(MODDESTDIR)/rtc-rx8900.ko || echo "No system rtc-rx8900.ko file found. Install the new rtc-rx8900.ko driver into the system"
> 	$(INSTALL) -p -m 644 rtc-rx8900.ko $(MODDESTDIR)
> 	@$(DEPMOD) -a
> 	
> uninstall:
> 	@$(GREP) rtc-rx8900.ko /lib/modules/$(shell uname -r)/modules.dep && rm -fr $(MODDESTDIR)/rtc-rx8900.ko || echo "Remove the rtc-rx8900.ko driver from the system"
> 	@$(DEPMOD) -a
> 	
> clean:
> 	$(MAKE) -C $(KSRC) M=$(RX8900_DIR) CC=$(CC) clean
> 
> 
> ---
> 
> Take your mailboxes with you. Free, fast and secure Mail & Cloud: https://www.eclipso.eu - Time to change!
> 
> 

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

end of thread, other threads:[~2021-06-20 22:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-24 14:07 out of tree rtc driver RX8900CE, has anybody updated it to the new v5 kernel interface?  
2021-06-20 22:08 ` Alexandre Belloni

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