UPSTREAM: PCI: rockchip: Provide captured slot power limit and scale
[firefly-linux-kernel-4.4.55.git] / include / linux / power_supply.h
index ef9f1592185d3189867b564efc4fdb8c151597a7..3241026e49f6863a94e616c84eea431d2c205786 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/leds.h>
 #include <linux/spinlock.h>
 #include <linux/notifier.h>
+#include <linux/types.h>
 
 /*
  * All voltages, currents, charges, energies, time and temperatures in uV,
@@ -148,6 +149,12 @@ enum power_supply_property {
        POWER_SUPPLY_PROP_SCOPE,
        POWER_SUPPLY_PROP_CHARGE_TERM_CURRENT,
        POWER_SUPPLY_PROP_CALIBRATE,
+       /* Local extensions */
+       POWER_SUPPLY_PROP_USB_HC,
+       POWER_SUPPLY_PROP_USB_OTG,
+       POWER_SUPPLY_PROP_CHARGE_ENABLED,
+       /* Local extensions of type int64_t */
+       POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT,
        /* Properties of type `const char *' */
        POWER_SUPPLY_PROP_MODEL_NAME,
        POWER_SUPPLY_PROP_MANUFACTURER,
@@ -163,6 +170,7 @@ enum power_supply_type {
        POWER_SUPPLY_TYPE_USB_DCP,      /* Dedicated Charging Port */
        POWER_SUPPLY_TYPE_USB_CDP,      /* Charging Downstream Port */
        POWER_SUPPLY_TYPE_USB_ACA,      /* Accessory Charger Adapters */
+       POWER_SUPPLY_TYPE_USB_FLOATING, /* DCP without shorting D+/D- */
 };
 
 enum power_supply_notifier_events {
@@ -172,6 +180,7 @@ enum power_supply_notifier_events {
 union power_supply_propval {
        int intval;
        const char *strval;
+       int64_t int64val;
 };
 
 struct device_node;
@@ -245,6 +254,7 @@ struct power_supply {
        struct delayed_work deferred_register_work;
        spinlock_t changed_lock;
        bool changed;
+       bool initialized;
        atomic_t use_cnt;
 #ifdef CONFIG_THERMAL
        struct thermal_zone_device *tzd;