On 02/23/2013 06:11 PM, Alessandro Zummo wrote:On 22/feb/2013, at 22:05, John Stultz <john.stultz@xxxxxxxxxx> wrote:Sorry John, I misunderstood your question.
On 02/22/2013 12:55 PM, Prarit Bhargava wrote:On 02/22/2013 03:43 PM, John Stultz wrote:Right, but what benefit does that provide?On 02/14/2013 09:02 AM, Prarit Bhargava wrote:John,/sys/class/rtc/rtcX/date and /sys/class/rtc/rtcX/time currently haveWhy do we want to add a new interface here?
read-only access. This patch introduces write functionality which will
set the rtc time.
Usage: echo YYYY-MM-DD > /sys/class/rtc/rtcX/date
echo HH:MM:SS > /sys/class/rtc/rtcX/time
I'm not adding a new interface. The current date/time interface only handles
read and I'm introducing write.
(I'm not saying there isn't any, its just not clear from your patch why this is a good thing.)
AFAICT there is no way for me to "test" or use the write from userspace.Also CC'ing Alessandro for his input.I'd like to keep the interfaces as simple as possible but I'm open to improvements if there are good use cases.
hwclock uses the SET_TIME ioctl, which is a different code path AFAICT.