google_dc_pps: initial support for non-tcpm pps ports
Add initial support for non TCPM type PPS ports.
Bug: 177471684
Test: start DC charging, check logs
Signed-off-by: AleX Pelosi <[email protected]>
Change-Id: I4e68cf95a470bab920a96c1c1fd05c0d6f27540a
diff --git a/google_dc_pps.h b/google_dc_pps.h
index dfb5b82..384d1e2 100644
--- a/google_dc_pps.h
+++ b/google_dc_pps.h
@@ -28,7 +28,7 @@
#define CHG_PPS_VOTER "pps_chg"
enum pd_pps_stage {
- PPS_NOTSUPP = -1, /* tried and failed */
+ PPS_NOTSUPP = -1, /* tried and failed or disconnected */
PPS_DISABLED = 0, /* default state, never tried */
PPS_NONE, /* try to enable */
PPS_AVAILABLE,
@@ -45,6 +45,9 @@
};
struct pd_pps_data {
+ struct power_supply *pps_psy;
+ void *port_data;
+
struct wakeup_source *pps_ws;
bool stay_awake;
@@ -113,6 +116,8 @@
int pps_get_src_cap(struct pd_pps_data *pps, struct power_supply *tcpm_psy);
+int pps_register_logbuffer(struct pd_pps_data *pps_data, const char *name);
+
void pps_log(struct pd_pps_data *pps, const char *fmt, ...);
/* probe */