Thu, 16 Apr 2009, Akram wrote:
> Have managed to get things working with this RTC.
> Am attaching small patch text to show what has been done as far as
> code changes to board-omap3beagle.c
I made the same change for the DS1338. The only difference is that I
didn't remove the twl4030 rtc. I did change the default device for
the rtc from /dev/rtc0 to /dev/rtc (as configured in Angstrom.) /dev/
rtc is a symbolic link, and I set it to point to the device node where
the DS1338 ended up, which in my case was /dev/rtc0.
I.e. I changed
via make menuconfig
Thank you for sharing this information. I was just about to add an RTC chip to
my Beagle expansion board and this will definitely ease my work.
One thing still troubles me for which I haven't yet found an answer. I'm
currently usingI2C2bus in userspace on Beagle with open(), read(), write()
and some ioctl(). I have several devices attached to that bus. Now if I
connect an RTC (DS1338C) to the same I2C bus and enable it, will some driver
reserve that bus for itself or can I still use the same bus from userspace?
For the DS1338C, enable I2C2_OMAP_BEAGLE and RTC_DRV_DS1307 in your
The code for the driver is in drivers/rtc/rtc-ds1307.c
And in Akram's patch replace this
When I get time, I will integrate my changes with Akram's and post a
I will note the DS1307/1338 driver does support the nvram on the part,
but I have not tried that out yet.
On your concern about using the bus from user space. I have not used
my own code to access I2C2, but I am using i2c_tools, and what I see
is that I am able to access I2C2, but I could no longer access the RTC
address (0x68) from user space once I integrated the DS1338 into the
kernel. I now get
root@beagleboard:~# i2cdump -y -r 0-7 2 0x68 b
Error: Could not set address to 0x68: Device or resource busy
root@beagleboard:~# i2cdump -y -r 0-7 2 0x55 b
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: XX XX XX XX XX XX XX XX
I do not have another device on the I2C2 bus, so accessing 0x55 times