The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [RFC] RTC subsystem, interrupt handling
@ 2005-12-28  1:01 Alessandro Zummo
  0 siblings, 0 replies; only message in thread
From: Alessandro Zummo @ 2005-12-28  1:01 UTC (permalink / raw)
  To: linux-kernel



 No patches this time :)

 just a few questions... the original RTC driver
 supports user programmable interrupts
 via rtc_register/rtc_control/rtc_unregister.

 The only user in the kernel is the sound core.

 My RTC subsystem doesn't support this behaviour yet,
 so I was thinking about the best way to add it.

 Current code assumes there's only one rtc in the system
 while the new one must have a way to find a specific one.

 Would something like that be acceptable:

struct class_device *rtc_open(char *name)
{
        struct class_device *class_dev = NULL,
                                *class_dev_tmp;

        down(&rtc_class->sem);
        list_for_each_entry(class_dev_tmp, &rtc_class->children, node) {
                if (strncmp(class_dev_tmp->class_id, name, BUS_ID_SIZE) == 0) {
                        class_dev = class_dev_tmp;
                        break;
                }
        }
        up(&rtc_class->sem);

        return class_dev;
}

?

-- 

 Best regards,

 Alessandro Zummo,
  Tower Technologies - Turin, Italy

  http://www.towertech.it


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-12-28  1:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-28  1:01 [RFC] RTC subsystem, interrupt handling Alessandro Zummo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox