AnsweredAssumed Answered

Trouble Accessing NVRAM in ds1307 RTC

Question asked by ShutEyeThinkin on Mar 5, 2013
Latest reply on Mar 7, 2013 by ShutEyeThinkin

I am working with uclinux-dist-2011R3.

 

I have no trouble executing calls, via my app's ioctl() calls, to rtc_dev_ioctl()

(in rtc-dev.c) to execute RTC_RD_TIME and RTC_SET_TIME for the DS1307 real-time clock.

 

I want to access the DS1307's NVRAM (RD and WR) by having rtc_dev_ioctl() execute

ops->ioctl(rtc-dev.parent,cmd,arg). The initial check, 'if (ops-ioctl)', returns 0.

 

Previously, working with uclinux-dist-2009R1, I was able to access the NVRAM

by allowing rtc_dev_ioctl() to execute ops->ioctl(rtc-dev.parent,cmd,arg), with

the cmd = my own custom cmds, RTC_RD_NVRAM and RTC_WR_NVRAM, and these were

executed in ds1307_ioctl() in rtc-ds1307.c, successfully transferring NVRAM data.

 

In dist-2011R3, it's not clear to me what I need to do to properly access the funcs,

ds1307_nvram_read() and ds1307_nvram_write() in rtc-ds1307.c

Outcomes