Linux RTC
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Michal Simek <monstr@monstr.eu>
Cc: rtc-linux@googlegroups.com
Subject: Re: [rtc-linux] RTC used as a module
Date: Thu, 23 Feb 2017 13:14:26 +0100	[thread overview]
Message-ID: <20170223121426.i24ssrlwitrvb32h@piout.net> (raw)
In-Reply-To: <d55404da-fe29-675d-1f3b-008145a6c87b@monstr.eu>

Hi Michal,

I've been thinking about this issue (and meaning to actually test).

On 08/12/2016 at 14:02:36 +0100, Michal Simek wrote:
> Hi guys,
> 
> I am trying to find out reason for this behavior. If rtc-zynqmp is used
> as module for the first time it is correctly probed based on aliases
> setting. (rtc5 for log below). But then driver is removed and add again
> rtc5 is still not freed. rtc_device_release() is not called that's why
> rtc->id can't be used again.
> 
> sh-4.3# modprobe rtc-zynqmp
> [   42.468565] rtc_zynqmp ffa60000.rtc: rtc core: registered
> ffa60000.rtc as rtc5
> sh-4.3# rmmod rtc-zynqmp
> sh-4.3# modprobe rtc-zynqmp
> [   48.648222] rtc_zynqmp ffa60000.rtc: /aliases ID 5 not available
> [   48.654280] rtc_zynqmp ffa60000.rtc: rtc core: registered
> ffa60000.rtc as rtc0
> 
> 
> I didn't try different rtc drivers but it looks like that someone keeps
> reference that's why release function is not called.
> 
> Can someone check this with different RTC module?

I'll do that soon.

> Or is this expected behavior?
> 

I don't think so :)

Can you clarify a few things:
 - is this the only rtc with a driver on your system ?
 - is it selected as the RTC_SYSTOHC_DEVICE or RTC_HCTOSYS_DEVICE. I've
   checked the code and I don't think this is the issue but it is worth
testing.

Thanks,

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2017-02-23 12:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-08 13:02 [rtc-linux] RTC used as a module Michal Simek
2017-02-23 12:14 ` Alexandre Belloni [this message]
2017-03-03  9:41   ` Michal Simek
2017-03-03 14:46     ` Michal Simek
2017-03-03 15:09       ` Alexandre Belloni
2017-03-03 19:55         ` Michal Simek
2017-03-03 20:04       ` John Stultz
2017-03-06 14:56         ` Michal Simek
2017-03-16 15:35           ` Michal Simek
2017-04-07  7:12             ` Michal Simek
2017-06-29  7:34               ` Michal Simek
2017-08-20 22:03                 ` Alexandre Belloni
2017-08-21 10:50                   ` Michal Simek
2017-08-21 12:13                     ` Alexandre Belloni
2017-08-21 12:19                       ` Michal Simek
2017-08-21 12:47                         ` Alexandre Belloni
2017-08-21 12:50                           ` Michal Simek
2017-08-21 12:53                           ` Alexandre Belloni
2017-08-21 13:00                             ` Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170223121426.i24ssrlwitrvb32h@piout.net \
    --to=alexandre.belloni@free-electrons.com \
    --cc=monstr@monstr.eu \
    --cc=rtc-linux@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox