Pull power supply and reset updates from Sebastian Reichel: "Core: - Add over-current health state - Add standard, adaptive and custom charge types - Add new properties for start/end charge threshold New Drivers / Hardware: - UCS1002 Programmable USB Port Power Controller - Ingenic JZ47xx Battery Fuel Gauge - AXP20x USB Power: Add AXP813 support - AT91 poweroff: Add SAM9X60 support - OLPC battery: Add XO-1.5 and XO-1.75 support Misc Changes: - syscon-reboot: support mask property - AXP288 fuel gauge: Blacklist ACEPC T8/T11. Looks like some vendor thought it's a good idea to build a desktop system with a fuel gauge, that slowly "discharges"... - cpcap-battery: Fix calculation errors - misc fixes" * tag 'for-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (54 commits) power: supply: olpc_battery: force the le/be casts power: supply: ucs1002: Fix build error without CONFIG_REGULATOR power: supply: ucs1002: Fix wrong return value checking power: supply: Add driver for Microchip UCS1002 dt-bindings: power: supply: Add bindings for Microchip UCS1002 power: supply: core: Add POWER_SUPPLY_HEALTH_OVERCURRENT constant power: supply: core: fix clang -Wunsequenced power: supply: core: Add missing documentation for CHARGE_CONTROL_* properties power: supply: core: Add CHARGE_CONTROL_{START_THRESHOLD,END_THRESHOLD} properties power: supply: core: Add Standard, Adaptive, and Custom charge types power: supply: axp288_fuel_gauge: Add ACEPC T8 and T11 mini PCs to the blacklist power: supply: bq27xxx_battery: Notify also about status changes power: supply: olpc_battery: Have the framework register sysfs files for us power: supply: olpc_battery: Add OLPC XO 1.75 support power: supply: olpc_battery: Avoid using platform_info power: supply: olpc_battery: Use devm_power_supply_register() power: supply: olpc_battery: Move priv data to a struct power: supply: olpc_battery: Use DT to get battery version x86/platform/olpc: Use a correct version when making up a battery node x86/platform/olpc: Trivial code move in DT fixup ...
Showing the changes to include/linux (2 of 33 files). Show all
Unified · Split
| @@ -290,6 +290,20 @@ int iio_read_max_channel_raw(struct iio_channel *chan, int *val); · 289 unmodified lines | ||
| 290 | 290 | int iio_read_avail_channel_raw(struct iio_channel *chan, |
| 291 | 291 | const int **vals, int *length); |
| 292 | 292 | |
| 293 | +/** | |
| 294 | + * iio_read_avail_channel_attribute() - read available channel attribute values | |
| 295 | + * @chan: The channel being queried. | |
| 296 | + * @vals: Available values read back. | |
| 297 | + * @type: Type of values read back. | |
| 298 | + * @length: Number of entries in vals. | |
| 299 | + * @attribute: info attribute to be read back. | |
| 300 | + * | |
| 301 | + * Returns an error code, IIO_AVAIL_RANGE or IIO_AVAIL_LIST. | |
| 302 | + */ | |
| 303 | +int iio_read_avail_channel_attribute(struct iio_channel *chan, | |
| 304 | + const int **vals, int *type, int *length, | |
| 305 | + enum iio_chan_info_enum attribute); | |
| 306 | + | |
| 293 | 307 | /** |
| 294 | 308 | * iio_get_channel_type() - get the type of a channel |
| 295 | 309 | * @channel: The channel being queried. |
| @@ -40,11 +40,15 @@ enum { · 39 unmodified lines | ||
| 40 | 40 | POWER_SUPPLY_STATUS_FULL, |
| 41 | 41 | }; |
| 42 | 42 | |
| 43 | +/* What algorithm is the charger using? */ | |
| 43 | 44 | enum { |
| 44 | 45 | POWER_SUPPLY_CHARGE_TYPE_UNKNOWN = 0, |
| 45 | 46 | POWER_SUPPLY_CHARGE_TYPE_NONE, |
| 46 | − POWER_SUPPLY_CHARGE_TYPE_TRICKLE, | |
| 47 | − POWER_SUPPLY_CHARGE_TYPE_FAST, | |
| 47 | + POWER_SUPPLY_CHARGE_TYPE_TRICKLE, /* slow speed */ | |
| 48 | + POWER_SUPPLY_CHARGE_TYPE_FAST, /* fast speed */ | |
| 49 | + POWER_SUPPLY_CHARGE_TYPE_STANDARD, /* normal speed */ | |
| 50 | + POWER_SUPPLY_CHARGE_TYPE_ADAPTIVE, /* dynamically adjusted speed */ | |
| 51 | + POWER_SUPPLY_CHARGE_TYPE_CUSTOM, /* use CHARGE_CONTROL_* props */ | |
| 48 | 52 | }; |
| 49 | 53 | |
| 50 | 54 | enum { |
| @@ -57,6 +61,7 @@ enum { · 6 unmodified lines | ||
| 57 | 61 | POWER_SUPPLY_HEALTH_COLD, |
| 58 | 62 | POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE, |
| 59 | 63 | POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE, |
| 64 | + POWER_SUPPLY_HEALTH_OVERCURRENT, | |
| 60 | 65 | }; |
| 61 | 66 | |
| 62 | 67 | enum { |
| @@ -121,6 +126,8 @@ enum power_supply_property { · 58 unmodified lines | ||
| 121 | 126 | POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX, |
| 122 | 127 | POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT, |
| 123 | 128 | POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT_MAX, |
| 129 | + POWER_SUPPLY_PROP_CHARGE_CONTROL_START_THRESHOLD, /* in percents! */ | |
| 130 | + POWER_SUPPLY_PROP_CHARGE_CONTROL_END_THRESHOLD, /* in percents! */ | |
| 124 | 131 | POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT, |
| 125 | 132 | POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN, |
| 126 | 133 | POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN, |