Update i2c device paths
Update i2c device paths with static bus numbers. Also remove some redundant paths. Bug: 323447554 Test: Boot to home Change-Id: Ibe1f5060daa45a7d19be08bd60c3f3a615427632 Signed-off-by: Jacky Liu <qsliu@google.com>
This commit is contained in:
parent
9787c36565
commit
78c26013fa
6 changed files with 8 additions and 46 deletions
|
@ -70,18 +70,8 @@ int main() {
|
|||
|
||||
addGs101CommonDataProviders(p);
|
||||
addDisplay(p);
|
||||
if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-3/i2c-st21nfc/power_stats", &buffer)) {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-3/i2c-st21nfc/power_stats");
|
||||
} else if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-4/i2c-st21nfc/power_stats", &buffer)) {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-4/i2c-st21nfc/power_stats");
|
||||
} else if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-5/i2c-st21nfc/power_stats", &buffer)) {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-5/i2c-st21nfc/power_stats");
|
||||
} else if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-6/i2c-st21nfc/power_stats", &buffer)) {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-6/i2c-st21nfc/power_stats");
|
||||
} else if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-7/i2c-st21nfc/power_stats", &buffer)) {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-7/i2c-st21nfc/power_stats");
|
||||
} else {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-8/i2c-st21nfc/power_stats");
|
||||
if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-7/7-0008/power_stats", &buffer)) {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-7/7-0008/power_stats");
|
||||
}
|
||||
const std::string instance = std::string() + PowerStats::descriptor + "/default";
|
||||
binder_status_t status = AServiceManager_addService(p->asBinder().get(), instance.c_str());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue