[Query]: Resource cleanup for Alarmtimer

From: Biju Das
Date: Wed Sep 20 2023 - 04:12:18 EST


Hi All,

Currently unbind/bind is not working as expected on rtc-isl1208 driver. The reason is put_device() is not calling rtc_device_release()
as some of the kobjects are not freed during unbind.

The commit c79108bd19a8 "alarmtimer: Make alarmtimer platform device child of RTC device" adds kobjects for alarmtimer device/sysfs, when we call device_init_wakeup() followed by devm_rtc_register_device()from the end point driver during probe().
But these kobjects are never freed when we do unbind on the endpoint driver.

The alarm timer device has alarmtimer_rtc_add_device() but it does not have remove_device() callbacks to free kbjects.

Q1) Has anyone tested unbind/rebind on RTC subsystem with device_init_wakeup() followed by devm_rtc_register_device() in
the probe?

Cheers,
Biju