Activate a DS1307 I2C RTC on iMX28

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Activate a DS1307 I2C RTC on iMX28

ソリューションへジャンプ
1,525件の閲覧回数
g__
Contributor II

We cannot use the embedded RTC at the moment. We added a DS1307. 

The driver is compiled in the build. 

ls -la /lib/modules/3.18.5-fslc\+g483412c/kernel/drivers/rtc/
drwxr-xr-x    2 xxx     xxx          4096 May 18  2017 .
drwxr-xr-x    5 xxx     xxx          4096 May 18  2017 ..
-rw-r--r--    1 xxx     xxx        149499 May 18  2017 rtc-ds1307.ko

The DS1307 is detected : 

i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- 32 -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- -- ‍‍‍‍‍‍‍‍‍‍

I tried to activate it : 

echo ds1307 0x32 > /sys/class/i2c-dev/i2c-0/dev
sh: can't create /sys/class/i2c-dev/i2c-0/dev: Permission denied

How can I activate it ? 

Thanks

Best

ラベル(1)
タグ(3)
0 件の賞賛
返信
1 解決策
1,261件の閲覧回数
g__
Contributor II

The filename was incorrect. That's the right one :

echo ds1307 0x32 > /sys/class/i2c-dev/i2c-0/device/new_device

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,262件の閲覧回数
g__
Contributor II

The filename was incorrect. That's the right one :

echo ds1307 0x32 > /sys/class/i2c-dev/i2c-0/device/new_device

0 件の賞賛
返信