Re: [PATCH v2 7/8] rtc: implement a sysfs interface for clock offset

From: Joshua Clayton
Date: Mon Feb 01 2016 - 15:56:59 EST


On Sun, 31 Jan 2016 12:41:15 +0100
Alexandre Belloni <alexandre.belloni@xxxxxxxxxxxxxxxxxx> wrote:

> Hi,
>
> On 04/01/2016 at 10:31:25 -0800, Joshua Clayton wrote :
> > The file is called "offset", and may be set and read in decimal.
> > For rtcs that do not have read_offset or set_offset implemented,
> > read always returns zero and write will return -EINVAL.
> >
> Can you expand rtc_attr_is_visible() instead of having the offset file
> always present?

Yes, Absolutely.
I wanted to do something like this, but didn't know is_visible
existed... and no wonder. Its in attribute_group

>
> Also, you need to expand Documentation/rtc.txt, section SYSFS
> INTERFACE.
>
OK. Will do.

> I'm fine with having parts per billion as the unit and I hope we won't
> ever need anything more precise :)
>
It is orders of magnitude more than needed at present
...and no will ever need more than 640k of memory... right?