<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/power_supply.h, branch v5.15.162</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.15.162</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.15.162'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2023-06-05T07:21:13Z</updated>
<entry>
<title>power: supply: core: Refactor power_supply_set_input_current_limit_from_supplier()</title>
<updated>2023-06-05T07:21:13Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2022-02-01T13:06:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8c6f881dc13b02c4f5ef09f60c94ba9e1d1b322a'/>
<id>urn:sha1:8c6f881dc13b02c4f5ef09f60c94ba9e1d1b322a</id>
<content type='text'>
[ Upstream commit 2220af8ca61ae67de4ec3deec1c6395a2f65b9fd ]

Some (USB) charger ICs have variants with USB D+ and D- pins to do their
own builtin charger-type detection, like e.g. the bq24190 and bq25890 and
also variants which lack this functionality, e.g. the bq24192 and bq25892.

In case the charger-type; and thus the input-current-limit detection is
done outside the charger IC then we need some way to communicate this to
the charger IC. In the past extcon was used for this, but if the external
detection does e.g. full USB PD negotiation then the extcon cable-types do
not convey enough information.

For these setups it was decided to model the external charging "brick"
and the parameters negotiated with it as a power_supply class-device
itself; and power_supply_set_input_current_limit_from_supplier() was
introduced to allow drivers to get the input-current-limit this way.

But in some cases psy drivers may want to know other properties, e.g. the
bq25892 can do "quick-charge" negotiation by pulsing its current draw,
but this should only be done if the usb_type psy-property of its supplier
is set to DCP (and device-properties indicate the board allows higher
voltages).

Instead of adding extra helper functions for each property which
a psy-driver wants to query from its supplier, refactor
power_supply_set_input_current_limit_from_supplier() into a
more generic power_supply_get_property_from_supplier() function.

Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
Stable-dep-of: 77c2a3097d70 ("power: supply: bq24190: Call power_supply_changed() after updating input current")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>power: supply: core: Parse battery chemistry/technology</title>
<updated>2021-08-14T10:48:07Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2021-08-05T08:58:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4eef766b7d4d88f0b984781bc1bcb574a6eafdc7'/>
<id>urn:sha1:4eef766b7d4d88f0b984781bc1bcb574a6eafdc7</id>
<content type='text'>
This extends the struct power_supply_battery_info with a
"technology" field makes the core DT parser optionally obtain
this from the device tree.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply</title>
<updated>2021-04-28T22:43:58Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2021-04-28T22:43:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5a69e9bce9984806029926f405b4517878e703e2'/>
<id>urn:sha1:5a69e9bce9984806029926f405b4517878e703e2</id>
<content type='text'>
Pull power supply and reset updates from Sebastian Reichel:
 "battery/charger driver changes:
   - core:
      - provide function stubs if CONFIG_POWER_SUPPLY=n
      - reduce loglevel for probe defer info
   - surface:
      - new battery and charger drivers for Surface
   - bq27xxx:
      - add bq78z100 support
      - fix current_now/power_avg for newer chips
   - cw2015:
      - add CHARGE_NOW support
   - ab8500:
      - drop pdata support
   - convert most DT bindings to YAML
   - lots of minor fixes and cleanups

  reset drivers:
   - ltc2952-poweroff:
      - make trigger delay configurable from DT
   - minor fixes and cleanups"

* tag 'for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (97 commits)
  power: supply: cpcap-battery: fix invalid usage of list cursor
  power: supply: bq256xx: add kerneldoc for structure members
  power: supply: act8945a: correct kerneldoc
  power: supply: max17040: remove unneeded double cast
  power: supply: max17040: handle device_property_read_u8_array() failure
  power: supply: max14577: remove unneeded variable initialization
  power: supply: surface-charger: Make symbol 'surface_ac_pm_ops' static
  power: supply: surface-battery: Make some symbols static
  power: reset: restart-poweroff: Add missing MODULE_DEVICE_TABLE
  power: reset: hisi-reboot: add missing MODULE_DEVICE_TABLE
  power: supply: s3c_adc_battery: fix possible use-after-free in s3c_adc_bat_remove()
  power: supply: generic-adc-battery: fix possible use-after-free in gab_remove()
  power: supply: Add AC driver for Surface Aggregator Module
  power: supply: Add battery driver for Surface Aggregator Module
  power: supply: bq25980: Move props from battery node
  power: supply: core: Use true and false for bool variable
  power: supply: goldfish: Remove the GOLDFISH dependency
  power: reset: ltc2952: make trigger delay configurable
  power: supply: cpcap-charger: Simplify bool conversion
  power: supply: cpcap-charger: Add usleep to cpcap charger to avoid usb plug bounce
  ...
</content>
</entry>
<entry>
<title>power: supply: core: Use true and false for bool variable</title>
<updated>2021-04-05T10:12:18Z</updated>
<author>
<name>Jiapeng Chong</name>
<email>jiapeng.chong@linux.alibaba.com</email>
</author>
<published>2021-02-09T09:58:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=25faa935f9e0bd5aba34a820defb982d43bb4a77'/>
<id>urn:sha1:25faa935f9e0bd5aba34a820defb982d43bb4a77</id>
<content type='text'>
Fix the following coccicheck warning:

./include/linux/power_supply.h:507:9-10: WARNING: return of 0/1 in
function 'power_supply_is_watt_property' with return type bool.

./include/linux/power_supply.h:479:9-10: WARNING: return of 0/1 in
function 'power_supply_is_amp_property' with return type bool.

Reported-by: Abaci Robot&lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Jiapeng Chong &lt;jiapeng.chong@linux.alibaba.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
</entry>
<entry>
<title>power: supply: Fix build error when CONFIG_POWER_SUPPLY is not enabled.</title>
<updated>2021-03-28T11:35:54Z</updated>
<author>
<name>Ray Chi</name>
<email>raychi@google.com</email>
</author>
<published>2021-03-27T18:28:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c21161e40ee94486f7db701f9b4d3f9c25763e8c'/>
<id>urn:sha1:c21161e40ee94486f7db701f9b4d3f9c25763e8c</id>
<content type='text'>
The build error happens when CONFIG_POWER_SUPPLY is not enabled.

h8300-linux-ld: drivers/usb/dwc3/gadget.o: in function `.L59':
&gt;&gt; gadget.c:(.text+0x655): undefined reference to `power_supply_set_property'

Fixes: 99288de36020 ("usb: dwc3: add an alternate path in vbus_draw callback")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Ray Chi &lt;raychi@google.com&gt;
Link: https://lore.kernel.org/r/20210327182809.1814480-3-raychi@google.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>power: supply: core: provide function stubs if CONFIG_POWER_SUPPLY=n</title>
<updated>2021-03-09T13:50:51Z</updated>
<author>
<name>Ray Chi</name>
<email>raychi@google.com</email>
</author>
<published>2021-03-08T13:31:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f38a1644832792ece8c63c9a5d9cd7122c62bf64'/>
<id>urn:sha1:f38a1644832792ece8c63c9a5d9cd7122c62bf64</id>
<content type='text'>
Fix build error when CONFIG_POWER_SUPPLY is not enabled.

The build error occurs in mips (cavium_octeon_defconfig).

mips-linux-gnu-ld: drivers/usb/dwc3/core.o: in function `dwc3_remove':
drivers/usb/dwc3/core.c:1657: undefined reference to `power_supply_put'
mips-linux-gnu-ld: drivers/usb/dwc3/core.o: in function `dwc3_get_properties':
drivers/usb/dwc3/core.c:1270: undefined reference to `power_supply_get_by_name'
mips-linux-gnu-ld: drivers/usb/dwc3/core.o: in function `dwc3_probe':
drivers/usb/dwc3/core.c:1632: undefined reference to `power_supply_put'

Fixes: 59fa3def35de ("usb: dwc3: add a power supply for current control")
Reported-by: Naresh Kamboju &lt;naresh.kamboju@linaro.org&gt;
Signed-off-by: Ray Chi &lt;raychi@google.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
</entry>
<entry>
<title>power: supply: add wireless type</title>
<updated>2020-08-26T14:53:26Z</updated>
<author>
<name>Subbaraman Narayanamurthy</name>
<email>subbaram@codeaurora.org</email>
</author>
<published>2020-08-13T18:34:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5ca937fb5d6870735341d8fdacdd2b49618c35dc'/>
<id>urn:sha1:5ca937fb5d6870735341d8fdacdd2b49618c35dc</id>
<content type='text'>
Currently, power_supply framework supports only Battery, UPS,
Mains and USB power_supply_type. Add wireless power_supply_type
so that the drivers which supports wireless can register a power
supply class device with POWER_SUPPLY_TYPE_WIRELESS.

Signed-off-by: Subbaraman Narayanamurthy &lt;subbaram@codeaurora.org&gt;
Signed-off-by: Guru Das Srinagesh &lt;gurus@codeaurora.org&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
</entry>
<entry>
<title>power: supply: Support battery temperature device-tree properties</title>
<updated>2020-08-25T17:24:37Z</updated>
<author>
<name>Dmitry Osipenko</name>
<email>digetx@gmail.com</email>
</author>
<published>2020-08-13T21:34:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=00cda13e339c9f4956a6f036675df2ca5b5a552e'/>
<id>urn:sha1:00cda13e339c9f4956a6f036675df2ca5b5a552e</id>
<content type='text'>
The generic battery temperature properties are already supported by the
power-supply core. Let's support parsing of the common battery temperature
properties from a device-tree.

Signed-off-by: Dmitry Osipenko &lt;digetx@gmail.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
</entry>
<entry>
<title>power: supply: wilco_ec: Add long life charging mode</title>
<updated>2020-07-31T12:33:56Z</updated>
<author>
<name>Crag Wang</name>
<email>crag0715@gmail.com</email>
</author>
<published>2020-07-30T03:26:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=46cbd0b05799e8234b719d18f3a4b27679c4c92e'/>
<id>urn:sha1:46cbd0b05799e8234b719d18f3a4b27679c4c92e</id>
<content type='text'>
This is a long life mode set in the factory for extended warranty
battery, the power charging rate is customized so that battery at
work last longer.

Presently switching to a different battery charging mode is through
EC PID 0x0710 to configure the battery firmware, this operation will
be blocked by EC with failure code 0x01 when PLL mode is already
in use.

Signed-off-by: Crag Wang &lt;crag.wang@dell.com&gt;
Reviewed-by: Mario Limonciello &lt;mario.limonciello@dell.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
</entry>
<entry>
<title>power_supply: Add additional health properties to the header</title>
<updated>2020-07-21T20:19:37Z</updated>
<author>
<name>Dan Murphy</name>
<email>dmurphy@ti.com</email>
</author>
<published>2020-07-20T20:43:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=98cc1b93724aa85bd828269855d48d884c702726'/>
<id>urn:sha1:98cc1b93724aa85bd828269855d48d884c702726</id>
<content type='text'>
Add HEALTH_WARM, HEALTH_COOL and HEALTH_HOT to the health enum.

HEALTH_WARM, HEALTH_COOL, and HEALTH_HOT properties are taken
from JEITA specification JISC8712:2015

Acked-by: Andrew F. Davis &lt;afd@ti.com&gt;
Tested-by: Guru Das Srinagesh &lt;gurus@codeaurora.org&gt;
Signed-off-by: Dan Murphy &lt;dmurphy@ti.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
</entry>
</feed>
