Update i2c device paths
Update i2c device paths with static bus numbers. Bug: 323447554 Test: Boot to home Change-Id: Id98eda794ef6c14e832dc3b40350f76adcb60ad8
This commit is contained in:
parent
dbd48e97c0
commit
331b140bab
2 changed files with 26 additions and 32 deletions
|
@ -156,15 +156,7 @@ void addGPU(std::shared_ptr<PowerStats> p) {
|
|||
}
|
||||
|
||||
std::string getNfcPath() {
|
||||
struct stat buffer;
|
||||
int size = 128;
|
||||
char path[size];
|
||||
for (int i = 0; i < 10; i++) {
|
||||
std::snprintf(path, size,
|
||||
"/sys/devices/platform/10970000.hsi2c/i2c-%d/i2c-st21nfc/power_stats", i);
|
||||
if (!stat(path, &buffer)) break;
|
||||
}
|
||||
return std::string(path);
|
||||
return std::string("/sys/devices/platform/10970000.hsi2c/i2c-8/8-0008/power_stats");
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue