History

Merge tag 'for-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply

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 ...

Linus Torvalds committed 7 years ago

Commit 8649efb2 parents 5fd09ba baf596433 files · +1611 −271Browse files

Showing the changes to include/linux (2 of 33 files). Show all

Unified · Split

2 files
  1. include/linux/iio/consumer.h +14 −0
  2. include/linux/power_supply.h +9 −2
include/linux/iio/consumer.h+14−0
@@ -290,6 +290,20 @@ int iio_read_max_channel_raw(struct iio_channel *chan, int *val); · 289 unmodified lines
290290 int iio_read_avail_channel_raw(struct iio_channel *chan,
291291 const int **vals, int *length);
292292
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+
293307 /**
294308 * iio_get_channel_type() - get the type of a channel
295309 * @channel: The channel being queried.
include/linux/power_supply.h+9−2
@@ -40,11 +40,15 @@ enum { · 39 unmodified lines
4040 POWER_SUPPLY_STATUS_FULL,
4141 };
4242
43+/* What algorithm is the charger using? */
4344 enum {
4445 POWER_SUPPLY_CHARGE_TYPE_UNKNOWN = 0,
4546 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 */
4852 };
4953
5054 enum {
@@ -57,6 +61,7 @@ enum { · 6 unmodified lines
5761 POWER_SUPPLY_HEALTH_COLD,
5862 POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE,
5963 POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE,
64+ POWER_SUPPLY_HEALTH_OVERCURRENT,
6065 };
6166
6267 enum {
@@ -121,6 +126,8 @@ enum power_supply_property { · 58 unmodified lines
121126 POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX,
122127 POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT,
123128 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! */
124131 POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT,
125132 POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN,
126133 POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t