OMAP 3730 を使用した組み込み Linux プロジェクトに取り組んでいます。カーネルのバージョン 3.2.23 を使用しています。I2C は正常に動作し、バス #2 のボードからさまざまなセンサーを確認できます。I2C バス #3 にはスマート バッテリーのみが接続されており、電源コードを取り外すことができ、バッテリーはボードの動作を維持します。問題は、スマート バッテリーを検出またはスキャンできないことです。i2ctools でさまざまなプログラムを試してみましたが、うまくいきませんでした。ボードをスコープに接続すると、バス #3 のアクティビティを確認できます。また、[デバイス ドライバー] > [カーネルの I2C サポート] の下にあるすべての関連オプションを有効にしました。
i2c バスでスマートバッテリーを表示するにはどうすればよいですか? カーネルで何か他のものを有効にする必要がありますか?
Standard SMBus slave address assignments for SBS devices include:
0x10 -- SMBus System Host
0x12 -- Smart Battery Charger
0x14 -- Smart Battery Selector
0x16 -- Smart Battery
# ls /dev/i2c-?
/dev/i2c-1 /dev/i2c-2 /dev/i2c-3
# i2cget -y 3 0x10 0x00 w p
Error: Read failed
#
# i2cget -y 3 0x0b 0x00 w p
Error: Read failed
# i2cdetect -r 3
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-3 using read byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
# i2cdetect -F 3
Functionalities implemented by /dev/i2c-3:
I2C yes
SMBus Quick Command no
SMBus Send Byte yes
SMBus Receive Byte yes
SMBus Write Byte yes
SMBus Read Byte yes
SMBus Write Word yes
SMBus Read Word yes
SMBus Process Call yes
SMBus Block Write yes
SMBus Block Read no
SMBus Block Process Call no
SMBus PEC yes
I2C Block Write yes
I2C Block Read yes
# i2cdetect -l
i2c-1 i2c OMAP I2C adapter I2C adapter
i2c-2 i2c OMAP I2C adapter I2C adapter
i2c-3 i2c OMAP I2C adapter I2C adapter