Re: [rtc-linux] Re: [PATCH v2] RTC: Selectively enable PIE-Hrtimeremulation.

From: Mark Brown
Date: Fri Mar 25 2011 - 08:00:16 EST


On Thu, Mar 24, 2011 at 02:18:18PM -0700, John Stultz wrote:
> On Thu, 2011-03-24 at 14:28 +0900, MyungJoo Ham wrote:

> > b. there could be multiple rtc devices in a system and we may need to
> > setup them anyway without any s/w interrupt handlers. (RTC PIEs
> > directly signalling some other H/W pieces?)

> Maybe I'm misunderstanding, but this sounds like an abuse of the RTC
> interface. If you're using the RTC interface to enable some sort of
> inter-hardware signaling, where the kernel itself wouldn't be handling
> the irq, you probably really want to use a different driver
> all-together. But again, I might just not understand what you're
> meaning.

This sort of thing is fairly common for embedded RTCs. Usually there's
no fixed connection, it's just that the RTC outputs a signal which can
be wired to anything the system integrator feels like. It does seem to
make sense for the RTC driver to export this functionality to the rest
of the world.

> The benefit here is that since the kernel manages all of this, it will
> then work on any RTC hardware that supports alarms, and doesn't need
> some hardware-specific PIE mode support. Even better, since the kernel
> can allow for multiplexing of events, userland can still set AIE mode
> alarms using the legacy interface without affecting your periodic
> rtc_timer.

This only works if you're not generating a hardware signal from the RTC
- if it's a hardware signal you may not be able to do it from software
at all. This may not be relevant for the particular application,
though.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/