logbuffer: move logbuffer and gvotables to kernel

logbuffers are used from the GBMS and TCPCI code to record internal
state and debug information that don't need (or cannot) be routed
to the standard syslog.

votables are used to arbitrate the access and manage the state of a
shared resource. Also make PMIC voter compat a compile time option

Bug: 166510851
Bug: 166528086
Bug: 164260419
Test: recompile
Signed-off-by: AleX Pelosi <[email protected]>
Change-Id: Idd8752bbd4b5fe7a1145cf2892884050926107dd
diff --git a/max1720x_battery.c b/max1720x_battery.c
index 714f542..ac96358 100644
--- a/max1720x_battery.c
+++ b/max1720x_battery.c
@@ -35,7 +35,7 @@
 
 #include "gbms_power_supply.h"
 #include "google_bms.h"
-#include "logbuffer.h"
+#include <misc/logbuffer.h>
 #include "max1720x_battery.h"
 
 #include <linux/debugfs.h>
@@ -4070,7 +4070,7 @@
 				ret);
 	}
 
-	chip->ce_log = debugfs_logbuffer_register("batt_ce");
+	chip->ce_log = logbuffer_register("batt_ce");
 	if (IS_ERR(chip->ce_log)) {
 		ret = PTR_ERR(chip->ce_log);
 		dev_err(dev, "failed to obtain logbuffer, ret=%d\n", ret);
@@ -4105,7 +4105,7 @@
 	struct max1720x_chip *chip = i2c_get_clientdata(client);
 
 	if (chip->ce_log) {
-		debugfs_logbuffer_unregister(chip->ce_log);
+		logbuffer_unregister(chip->ce_log);
 		chip->ce_log = NULL;
 	}