lkml.org 
[lkml]   [2006]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Add driver for ARM AMBA PL031 RTC
On Tue, 16 May 2006 14:48:13 -0700
Deepak Saxena <dsaxena@plexity.net> wrote:

>
> This patch adds a driver for the ARM PL031 RTC found on some ARM SOCs.
> The driver is fairly trivial as the RTC only provides a read/write and
> alarm capability.
>
> Signed-off-by: Deepak <dsaxena@plexity.net>

> Alessandro: What userland tool do I use to test alarm capability?

There's the source code of a test program in Documentation/rtc.txt .
I'm not so sure the alarm capability is used nowadays.


you can avoid including this one if it is a no-op:

> +static int pl031_read_callback(struct device *dev, int data)
> +{
> + return data;
> +}



> +static int pl031_ioctl(struct device *dev, unsigned int cmd, unsigned long arg)
> +{
> + struct pl031_local *ldata = dev_get_drvdata(dev);
> +
> + switch (cmd) {
> + case RTC_AIE_OFF:
> + __raw_writel(1, ldata->base + RTC_MIS);
> + return 0;
> + case RTC_AIE_ON:
> + __raw_writel(0, ldata->base + RTC_MIS);
> + return 0;
> + }
> +
> + return -EINVAL;
> +}

pleasew return -ENOIOCTLCMD instead of -EINVAL . I know, I will have
to fix the other drivers to do the same.


no op:

> +static int pl031_proc(struct device *dev, struct seq_file *seq)
> +{
> + return 0;
> +}
> +



--

Best regards,

Alessandro Zummo,
Tower Technologies - Turin, Italy

http://www.towertech.it

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-05-17 01:05    [from the cache]
©2003-2011 Jasper Spaans