Re: [PATCH] Add driver for ARM AMBA PL031 RTC

From: Alessandro Zummo
Date: Tue May 16 2006 - 19:02:34 EST


On Tue, 16 May 2006 14:48:13 -0700
Deepak Saxena <dsaxena@xxxxxxxxxxx> 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@xxxxxxxxxxx>

> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/