branch for merging into other sub-systems.
Note this is based on v5.12-rc2.
-----BEGIN PGP SIGNATURE-----
iQFHBAABCAAyFiEEuvA7XScYQRpenhd+kuxHeUQDJ9wFAmBTJ8AUHGhkZWdvZWRl
QHJlZGhhdC5jb20ACgkQkuxHeUQDJ9x6VAf1FezXZZrwXBvOUP2BvjBBumy0iWrX
vxC/eQzCq0eenMumlu+GmmAOeU2PI0D+d7VzAwArJcYVb/XDDL2xCG6+iHGJK8kF
aral0g6V0YqmMpc6Nc0PRxW5fgbwnPni+FJJQTFCyW5HMao8aSy8tSON0ZKj04Lm
4i0MwSz5FRFhogAG4tXCpAiI4sXPNuL+uAP2m1BY7Gm+IkgoCBKZWGQWApkP7lWL
cpj3QIQtxWuFUSLvwMRFykUMeTogiI16q6uQbcnE9QFuKV9UJqEDZf7hmAuxHFsQ
YA7JUb9AHfvUBlRmHWsAZ6ylDagTWXTDBI088+NqtPc0etm/26yebqpt
=ALC9
-----END PGP SIGNATURE-----
Merge tag 'tags/platform-drivers-x86-surface-aggregator-v5.13-1' into psy-next
Signed tag for the immutable platform-surface-aggregator-registry
branch for merging into other sub-systems.
Note this is based on v5.12-rc2.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Currently POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT and
POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE are exposed on
the battery node and this is incorrect.
This patch exposes both of them on the charger node rather
than the battery node.
Fixes: 5069185fc1 ("power: supply: bq25980: Add support for the BQ259xx family")
Signed-off-by: Ricardo Rivera-Matos <r-rivera-matos@ti.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmBZrSsACgkQUa+KL4f8
d2EyiA/9GRBj8piXoHnlqA4lkExInTddmts2r7aDtmPa1iCUT5XeyIoiSWdnFz++
fr9ion87/T89zVJWLMGHi5HRlOEQwR0eG8VUF7rAp8qV9ANOOB8sYi0KC4k1ADet
+SNTqUYIbA3xrlH+DSPBRmyWMJ6EHkrtmzBCO4PUyxEexFFGSGz3BuEkCdhKMsUb
/t/AqxLEs9v8dHOIWHTlKK9M1divTdBkqN8mwUfGMDqvtCpFXIuSZ3koTnK9wJyd
Pqw+5XAoL8cMfSkQrwIpZGRdzyCa9f0iOJz8gdYYKxq1575zGxUTM53z3MYb+ujX
ei3oO99bCNLezcWozBNEJIlk4LK2FdzWFrlimsxE+2IStH9p1TE3voWFUJh+tL3f
mbYHNJr35pBNRXA07iQccA9V2zCFAeN4GaeRrY59blcfw8fvOGcWwni8YDbWmmGz
E/xYv7WeNtrzrELNDMpGJ4w909EItfXEsWyzItJBhI5ThsRPOpET7uBolkEfbd5M
jjGM2pGeLq++Zd1c2kBzc3a2gW60iGNI6dMBpZWCwCCPe1Vz7okiu1hVULMYYXgZ
B7F8xzM60phdlMUrFu/tFyYPOs8/0w8tk5QjGiD7/FkLsFhD6UdJsD0r02PCtqN+
4BRGwOmZWED83XVDTkwVR61GWPP7mWl5AUywe2XdPBo6/jhWTBY=
=+5eM
-----END PGP SIGNATURE-----
Merge tag 'ib-mfd-power-v5.13' into psy-next
Immutable branch between MFD and Power due for the v5.13 merge window.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
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<abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This will allow to use the BATTERY_GOLDFISH driver
without enabling GOLDFISH.
Signed-off-by: Roman Kiryanov <rkir@google.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Make trigger delay configurable through device tree with
trigger-delay-ms property.
Trigger delay is the time to wait before starting shutdown
sequence after trigger line assertion.
Trigger delay must take into account the OFFT time configured
with the capacitor connected to OFFT pin of the LTC2952 chip.
Basically, the higher the capacitance connected to OFFT pin,
the larger trigger delay must be.
Signed-off-by: Marek Czerski <ma.czerski@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Fix the following coccicheck warning:
./drivers/power/supply/cpcap-charger.c:416:31-36: WARNING: conversion to
bool not needed here
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Adds 80000 us sleep when the usb cable is plugged in to hopefully avoid
bouncing contacts.
Upon pluging in the usb cable vbus will bounce for some time, causing cpcap to
dissconnect charging due to detecting an undervoltage condition. This is a
scope of vbus on xt894 while quickly inserting the usb cable with firm force,
probed at the far side of the usb socket and vbus loaded with approx 1k:
http://uvos.xyz/maserati/usbplug.jpg.
As can clearly be seen, vbus is all over the place for the first 15 ms or so
with a small blip at ~40 ms this causes the cpcap to trip up and disable
charging again.
The delay helps cpcap_usb_detect avoid the worst of this. It is, however, still
not ideal as strong vibrations can cause the issue to reapear any time during
charging. I have however not been able to cause the device to stop charging due
to this in practice as it is hard to vibrate the device such that the vbus pins
start bouncing again but cpcap_usb_detect is not called again due to a detected
disconnect/reconnect event.
Signed-off-by: Carl Philipp Klemm <philipp@uvos.xyz>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Carl Philipp Klemm <philipp@uvos.xyz>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Avoid logging probe defer information for default loglevel
configurations. This is only required for debugging probe
defer issues, which requires enabling debug messages for
other subsystems.
This dev_info() message predates having deferred devices
information available in /sys/kernel/debug/devices_deferred,
which is generally more useful.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
sbs-manager implements a GPIO chip, so include the proper
gpio driver include instead of the legacy gpio.h.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Introduce usage of dev_err_probe in probe routine, which
makes the code slightly more readable and removes some
lines of code. It also removes PROBE_DEFER errors being
logged by default.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Introduce usage of dev_err_probe in probe routine, which
makes the code slightly more readable and removes some
lines of code. It also removes PROBE_DEFER errors being
logged by default.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Introduce usage of dev_err_probe in probe routine, which
makes the code slightly more readable and removes some
lines of code. It also removes PROBE_DEFER errors being
logged by default, which are common when the battery is
waiting for the charger driver to be registered.
This also cleans up a useless goto and instead returns
directly.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Change 'long long int' to 'long long' because the int is unnecessary,
as suggested by checkpatch.pl.
Signed-off-by: Milan Djurovic <mdjurovic@zohomail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Get regulator from parent device's node and extcon by name.
Signed-off-by: Timon Baetz <timon.baetz@protonmail.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
s/Hisilicon/HiSilicon/g.
It should use capital S, according to
https://www.hisilicon.com/en/terms-of-use.
Signed-off-by: Hao Fang <fanghao11@huawei.com>
Acked-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Use devm_of_iomap() to map resources. This will avoid the necessity to
track the mapped resources and free them on failure path or on remove.
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Suggested-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Normal parentheses should be used when referring to config variables
in Makefile. Replace the accidentally introduced curly brackets by
regular parentheses.
Fixes: a7f79f9954 ("power: reset: add driver for LinkStation power off")
Acked-by: Daniel González Cabanelas <dgcbueu@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
The file has been replaced by power-supply.yaml and all links
have been updated to the new file.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Existing in-tree users make use of '"ti,bq20z45", "sbs,sbs-battery"', so
add it to the list of known compatible strings.
Also add missing support for the generic 'power-supplies' property by
importing power-supply.yaml and setting unevaluatedProperties instead
of additionalProperties.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Convert the binding to DT schema format.
Note: The battery node does not have a compatible value and needs
to be described from the binding file for the PMIC. That has not
yet been converted, so I kept the information in plaintext for now.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Convert the binding to DT schema format.
Cc: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Convert the binding to DT schema format.
Cc: David Lechner <david@lechnology.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: David Lechner <david@lechnology.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Convert the binding to DT schema format.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Rejected-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>