Re: [RFC PATCH v2] rtc: pcf2127: Add PPS capability through Seconds Interrupt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/06/2024 11:16:02+0200, Csókás Bence wrote:
> On 6/12/24 09:50, Miroslav Lichvar wrote:
> > On Tue, Jun 11, 2024 at 10:06:39PM -0700, Richard Cochran wrote:
> > > On Tue, Jun 11, 2024 at 05:04:57PM +0200, Csókás, Bence wrote:
> > > 
> > > > PCF2127/29/31 is capable of generating an interrupt on every
> > > > second (SI) or minute (MI) change. It signals this through
> > > > the Minute/Second Flag (MSF) as well, which needs to be cleared.
> > > 
> > > This is a RFC, and my comment is that a PPS from an RTC is not useful
> > > to the Linux kernel.
> > 
> > I think a TCXO-based RTC can be useful to user space to improve
> > holdover performance with NTP/PTP.
> 
> Exactly.
> 
> > There already is the RTC_UIE_ON
> > ioctl to enable interrupts and receive them in user space.
> > 
> > The advantage of the PPS device over the ioctl would be more accurate
> > timestamping (kernel vs user-space). Should PPS be supported, it would
> > be nice if it worked generally with all drivers that support RTC_UIE_ON.
> 
> As we've discussed in v1, UIE hardware support is being removed from the RTC
> subsystem, which I tried to optionally re-introduce. Since there was no
> response since then, I assumed that there is no willingness to do that, so I
> chose the next best option, the PPS subsystem.

I won't reintroduce UIE but I'm going to fix the issue you see with the
pcf2129.

> 
> On 5/28/24 19:56, Alexandre Belloni wrote:
> > This has been removed from the kernel 13 years ago. What is your use
> > case to reintroduce it?
> 
> I also agree that multiple RTCs would benefit from this feature. However, we
> should only add it to those which *have* hardware support for a "one second
> has elapsed" signal. UIE is currently implemented by setting an alarm to the
> next second, which didn't work well with the PCF2129.

I agree with Miroslav that if done, this should be subsystem wise and
not just for individual drivers.



> 
> Bence
> 

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




[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux