Age | Commit message (Collapse) | Author | Files | Lines |
|
The local 'current_bits' variable does not have to be initialized
because all cases in following switch() either return or initialize it.
Addresses-Coverity: Unused value
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
The sparse tool complains as follows:
drivers/power/supply/surface_charger.c:229:1: warning:
symbol 'surface_ac_pm_ops' was not declared. Should it be static?
This symbol is not used outside of surface_charger.c, so this
commit marks it static.
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Qiheng Lin <[email protected]>
Acked-by: Maximilian Luz <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
The sparse tool complains as follows:
drivers/power/supply/surface_battery.c:700:1: warning:
symbol 'dev_attr_alarm' was not declared. Should it be static?
drivers/power/supply/surface_battery.c:805:1: warning:
symbol 'surface_battery_pm_ops' was not declared. Should it be static?
This symbol is not used outside of surface_battery.c, so this
commit marks it static.
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Qiheng Lin <[email protected]>
Acked-by: Maximilian Luz <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
This patch adds missing MODULE_DEVICE_TABLE definition which generates
correct modalias for automatic loading of this driver when it is built
as an external module.
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Bixuan Cui <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
This patch adds missing MODULE_DEVICE_TABLE definition which generates
correct modalias for automatic loading of this driver when it is built
as an external module.
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Chen Lifu <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
s3c_adc_bat_remove()
This driver's remove path calls cancel_delayed_work(). However, that
function does not wait until the work function finishes. This means
that the callback function may still be running after the driver's
remove function has finished, which would result in a use-after-free.
Fix by calling cancel_delayed_work_sync(), which ensures that
the work is properly cancelled, no longer running, and unable
to re-schedule itself.
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Yang Yingliang <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
This driver's remove path calls cancel_delayed_work(). However, that
function does not wait until the work function finishes. This means
that the callback function may still be running after the driver's
remove function has finished, which would result in a use-after-free.
Fix by calling cancel_delayed_work_sync(), which ensures that
the work is properly cancelled, no longer running, and unable
to re-schedule itself.
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Yang Yingliang <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
On newer Microsoft Surface models (specifically 7th-generation, i.e.
Surface Pro 7, Surface Book 3, Surface Laptop 3, and Surface Laptop Go),
battery and AC status/information is no longer handled via standard ACPI
devices, but instead directly via the Surface System Aggregator Module
(SSAM), i.e. the embedded controller on those devices.
While on previous generation models, AC status is also handled via SSAM,
an ACPI shim was present to translate the standard ACPI AC interface to
SSAM requests. The SSAM interface itself, which is modeled closely after
the ACPI interface, has not changed.
This commit introduces a new SSAM client device driver to support AC
status/information via the aforementioned interface on said Surface
models.
Signed-off-by: Maximilian Luz <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
On newer Microsoft Surface models (specifically 7th-generation, i.e.
Surface Pro 7, Surface Book 3, Surface Laptop 3, and Surface Laptop Go),
battery and AC status/information is no longer handled via standard ACPI
devices, but instead directly via the Surface System Aggregator Module
(SSAM), i.e. the embedded controller on those devices.
While on previous generation models, battery status is also handled via
SSAM, an ACPI shim was present to translate the standard ACPI battery
interface to SSAM requests. The SSAM interface itself, which is modeled
closely after the ACPI interface, has not changed.
This commit introduces a new SSAM client device driver to support
battery status/information via the aforementioned interface on said
Surface models. It is in parts based on the standard ACPI battery
driver.
Signed-off-by: Maximilian Luz <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
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 <[email protected]>
|
|
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: 5069185fc18e ("power: supply: bq25980: Add support for the BQ259xx family")
Signed-off-by: Ricardo Rivera-Matos <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Immutable branch between MFD and Power due for the v5.13 merge window.
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
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<[email protected]>
Signed-off-by: Jiapeng Chong <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
This will allow to use the BATTERY_GOLDFISH driver
without enabling GOLDFISH.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
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 <[email protected]>
Acked-by: Rob Herring <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Yang Li <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
bounce
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 <[email protected]>
Tested-by: Tony Lindgren <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
conversion
Signed-off-by: Carl Philipp Klemm <[email protected]>
Acked-by: Tony Lindgren <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
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 <[email protected]>
|
|
sbs-manager implements a GPIO chip, so include the proper
gpio driver include instead of the legacy gpio.h.
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
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 <[email protected]>
|
|
Simplify code by using devm_add_action_or_reset to unregister
the i2c_mux_adapter.
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
sbs-charger does not use any GPIOs, so no need to include
gpio.h and of_gpio.h.
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
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 <[email protected]>
|
|
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 <[email protected]>
|
|
Change 'long long int' to 'long long' because the int is unnecessary,
as suggested by checkpatch.pl.
Signed-off-by: Milan Djurovic <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Get regulator from parent device's node and extcon by name.
Signed-off-by: Timon Baetz <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
s/Hisilicon/HiSilicon/g.
It should use capital S, according to
https://www.hisilicon.com/en/terms-of-use.
Signed-off-by: Hao Fang <[email protected]>
Acked-by: Haojian Zhuang <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
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 <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Suggested-by: Nicolas Ferre <[email protected]>
Signed-off-by: Claudiu Beznea <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Changesets: 70c23e62d20c ("dt-bindings: power: supply: Fix remaining battery.txt links")
and: 471dec8023d1 ("dt-bindings: power: Convert battery.txt to battery.yaml")
renamed: Documentation/devicetree/bindings/power/supply/battery.txt
to: Documentation/devicetree/bindings/power/supply/battery.yaml.
Update its cross-reference accordingly.
Fixes: 70c23e62d20c ("dt-bindings: power: supply: Fix remaining battery.txt links")
Fixes: 471dec8023d1 ("dt-bindings: power: Convert battery.txt to battery.yaml")
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Changeset 3004e581d92a ("dt-bindings: power: supply: lego-ev3-battery: Convert to DT schema format")
renamed: Documentation/devicetree/bindings/power/supply/lego_ev3_battery.txt
to: Documentation/devicetree/bindings/power/supply/lego,ev3-battery.yaml.
Update its cross-reference accordingly.
Fixes: 3004e581d92a ("dt-bindings: power: supply: lego-ev3-battery: Convert to DT schema format")
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Reviewed-by: David Lechner <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Normal parentheses should be used when referring to config variables
in Makefile. Replace the accidentally introduced curly brackets by
regular parentheses.
Fixes: a7f79f99541ef ("power: reset: add driver for LinkStation power off")
Acked-by: Daniel González Cabanelas <[email protected]>
Signed-off-by: Daniel Golle <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Few trivial spelling fixes.
Signed-off-by: Bhaskar Chowdhury <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
The file has been replaced by power-supply.yaml and all links
have been updated to the new file.
Signed-off-by: Sebastian Reichel <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
|
|
Signed-off-by: Sebastian Reichel <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
|
|
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 <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
|
|
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 <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
|
|
Convert the binding to DT schema format.
Signed-off-by: Sebastian Reichel <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
|
|
Convert the binding to DT schema format.
Signed-off-by: Sebastian Reichel <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
|
|
Convert the binding to DT schema format.
Signed-off-by: Sebastian Reichel <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
|
|
Convert the binding to DT schema format.
Signed-off-by: Sebastian Reichel <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
|
|
Convert the binding to DT schema format.
Signed-off-by: Sebastian Reichel <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
|
|
Convert the binding to DT schema format.
Signed-off-by: Sebastian Reichel <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
|
|
Convert the binding to DT schema format.
Cc: Chen-Yu Tsai <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
|
|
Convert the binding to DT schema format.
Signed-off-by: Sebastian Reichel <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
|
|
Convert the binding to DT schema format.
Signed-off-by: Sebastian Reichel <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
|
|
Convert the binding to DT schema format.
Signed-off-by: Sebastian Reichel <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
|
|
Convert the binding to DT schema format.
Signed-off-by: Sebastian Reichel <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
|
|
Convert the binding to DT schema format.
Signed-off-by: Sebastian Reichel <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
|
|
Convert the binding to DT schema format.
Signed-off-by: Sebastian Reichel <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
|