Age | Commit message (Collapse) | Author | Files | Lines |
|
This patch adds support for the bq24192 variant to bq24190_charger.
Signed-off-by: Jonathan Marek <[email protected]>
[[email protected]: Changed if statement to a switch based on
feedback from Sebastian Reichel.]
Signed-off-by: Brian Masney <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Switch the SI to boot mode so on a warm reboot, the SI is able to access
the flash.
Signed-off-by: Alexandre Belloni <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Similar to gpio-reset allow to specify active and inactive delays
while keeping the 100ms defaults that were used previously all the time.
The dt-properties are named the same as in gpio-reset but get an "-ms"
suffix as properties should contain such a suffix specifying its unit.
Signed-off-by: Heiko Stuebner <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
Reviewed-by: Moritz Fischer <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Make code more readable.
Signed-off-by: Baolin Wang <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Fix incorrect return value.
Signed-off-by: Baolin Wang <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Fix some misspelled words.
Signed-off-by: Baolin Wang <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Remove unused index counting.
Signed-off-by: Baolin Wang <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Trivial fix to clean up indentation issue, remove an extraneous tab
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Immutable branch between mfd and power-supply for driver
changes related to axp813.
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
AXP813 and AXP803 PMICs can control input current and minimum voltage.
Both of these values are configurable.
Signed-off-by: Oskari Lemmela <[email protected]>
Reviewed-by: Quentin Schulz <[email protected]>
Reviewed-by: Chen-Yu Tsai <[email protected]>
Acked-by: Lee Jones <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Make use of the recommended BIT() macro for bit defines.
Signed-off-by: Olliver Schinagl <[email protected]>
Signed-off-by: Priit Laes <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
The axp20x_usb_power driver uses BIT() operations but lacks the include
for it. Include the bitops.h header file.
Signed-off-by: Olliver Schinagl <[email protected]>
Signed-off-by: Priit Laes <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
object size
Don't populate the array cpcap_battery_irqs on the stack but instead
make it static. Makes the object code smaller by 99 bytes:
Before:
text data bss dec hex filename
13673 2448 0 16121 3ef9 cpcap-battery.o
After:
text data bss dec hex filename
13510 2512 0 16022 3e96 cpcap-battery.o
(gcc version 8.2.0 x86_64)
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.
Cc: Sebastian Reichel <[email protected]>
Cc: [email protected]
Signed-off-by: Rob Herring <[email protected]>
|
|
According to [1] and [2], the temperature values are in tenths of degree
Celsius. Exposing the Celsius value makes the battery appear on fire:
$ upower -i /org/freedesktop/UPower/devices/battery_olpc_battery
...
temperature: 236.9 degrees C
Tested on OLPC XO-1 and OLPC XO-1.75 laptops.
[1] include/linux/power_supply.h
[2] Documentation/power/power_supply_class.txt
Fixes: fb972873a767 ("[BATTERY] One Laptop Per Child power/battery driver")
Cc: [email protected]
Signed-off-by: Lubomir Rintel <[email protected]>
Acked-by: Pavel Machek <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Fix build errors when FUEL_GUAGE_SC27XX is enabled but IIO is either
not enabled or IIO=m and FUEL_GUAGE_SC27XX=y.
ld: drivers/power/supply/sc27xx_fuel_gauge.o: in function `sc27xx_fgu_get_temp':
sc27xx_fuel_gauge.c:(.text+0x1d2): undefined reference to `iio_read_channel_processed'
ld: drivers/power/supply/sc27xx_fuel_gauge.o: in function `sc27xx_fgu_probe':
sc27xx_fuel_gauge.c:(.text+0x97f): undefined reference to `devm_iio_channel_get'
Signed-off-by: Randy Dunlap <[email protected]>
Cc: [email protected]
Acked-by: Baolin Wang <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
This patch adds the Spreadtrum SC27XX serial PMICs fuel gauge support,
which is used to calculate the battery capacity.
Original-by: Yuanjiang Yu <[email protected]>
Signed-off-by: Baolin Wang <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
We have introduced some battery properties to present the OCV table
temperatures and OCV capacity table values. Thus this patch add OCV
temperature and OCV table for battery information, as well as providing
some helper functions to use the OCV capacity table for users.
Signed-off-by: Baolin Wang <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Add one field for 'struct power_supply_battery_info' to present the battery
factory internal resistance.
Signed-off-by: Baolin Wang <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull Devicetree updates from Rob Herring:
"A bit bigger than normal as I've been busy this cycle.
There's a few things with dependencies and a few things subsystem
maintainers didn't pick up, so I'm taking them thru my tree.
The fixes from Johan didn't get into linux-next, but they've been
waiting for some time now and they are what's left of what subsystem
maintainers didn't pick up.
Summary:
- Sync dtc with upstream version v1.4.7-14-gc86da84d30e4
- Work to get rid of direct accesses to struct device_node name and
type pointers in preparation for removing them. New helpers for
parsing DT cpu nodes and conversions to use the helpers. printk
conversions to %pOFn for printing DT node names. Most went thru
subystem trees, so this is the remainder.
- Fixes to DT child node lookups to actually be restricted to child
nodes instead of treewide.
- Refactoring of dtb targets out of arch code. This makes the support
more uniform and enables building all dtbs on c6x, microblaze, and
powerpc.
- Various DT binding updates for Renesas r8a7744 SoC
- Vendor prefixes for Facebook, OLPC
- Restructuring of some ARM binding docs moving some peripheral
bindings out of board/SoC binding files
- New "secure-chosen" binding for secure world settings on ARM
- Dual licensing of 2 DT IRQ binding headers"
* tag 'devicetree-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (78 commits)
ARM: dt: relicense two DT binding IRQ headers
power: supply: twl4030-charger: fix OF sibling-node lookup
NFC: nfcmrvl_uart: fix OF child-node lookup
net: stmmac: dwmac-sun8i: fix OF child-node lookup
net: bcmgenet: fix OF child-node lookup
drm/msm: fix OF child-node lookup
drm/mediatek: fix OF sibling-node lookup
of: Add missing exports of node name compare functions
dt-bindings: Add OLPC vendor prefix
dt-bindings: misc: bk4: Add device tree binding for Liebherr's BK4 SPI bus
dt-bindings: thermal: samsung: Add SPDX license identifier
dt-bindings: clock: samsung: Add SPDX license identifiers
dt-bindings: timer: ostm: Add R7S9210 support
dt-bindings: phy: rcar-gen2: Add r8a7744 support
dt-bindings: can: rcar_can: Add r8a7744 support
dt-bindings: timer: renesas, cmt: Document r8a7744 CMT support
dt-bindings: watchdog: renesas-wdt: Document r8a7744 support
dt-bindings: thermal: rcar: Add device tree support for r8a7744
Documentation: dt: Add binding for /secure-chosen/stdout-path
dt-bindings: arm: zte: Move sysctrl bindings to their own doc
...
|
|
Use the new of_get_compatible_child() helper to lookup the usb sibling
node instead of using of_find_compatible_node(), which searches the
entire tree from a given start node and thus can return an unrelated
(non-sibling) node.
This also addresses a potential use-after-free (e.g. after probe
deferral) as the tree-wide helper drops a reference to its first
argument (i.e. the parent device node).
While at it, also fix the related phy-node reference leak.
Fixes: f5e4edb8c888 ("power: twl4030_charger: find associated phy by more reliable means.")
Cc: stable <[email protected]> # 4.2
Cc: NeilBrown <[email protected]>
Cc: Felipe Balbi <[email protected]>
Cc: Sebastian Reichel <[email protected]>
Reviewed-by: Sebastian Reichel <[email protected]>
Signed-off-by: Johan Hovold <[email protected]>
Signed-off-by: Rob Herring <[email protected]>
|
|
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 201510 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Trivial fix to spelling mistake in MODULE_DESCRIPTION text
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
omap_sr_register_pmic() was introduced in 2010 in commit
984aa6dbf4ca ("OMAP3: PM: Adding smartreflex driver support.")
. There was never any caller of this function in mainline resulting in a
warning
sr_init: No PMIC hook to init smartreflex
for each machine where this driver is enabled. So remove the unused
function and the pr_warn.
Signed-off-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
|
|
Update the binding and driver for pms405 pon.
Signed-off-by: Vinod Koul <[email protected]>
Signed-off-by: Bjorn Andersson <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
According to the datasheet, bq27411 is similar to bq27421.
Signed-off-by: Liu Xiang <[email protected]>
Reviewed-by: Andrew F. Davis <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
This patch adds the SC2731 PMIC switch charger support.
Signed-off-by: Baolin Wang <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
This avoids getting woken up from suspend after power interruptions
when the bci wrongly thinks the battery is full just because
of input current going low because of low input power
Signed-off-by: Andreas Kemnade <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
the charging current uses unsigned int variables, if we step back
if the current is still low, we would run into negative which
means setting the target to a huge value.
Better add checks here.
Signed-off-by: Andreas Kemnade <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
drivers/power/supply/bq25890_charger.c:614:2-3: Unneeded semicolon
drivers/power/supply/bq25890_charger.c:621:2-3: Unneeded semicolon
drivers/power/supply/bq25890_charger.c:630:3-4: Unneeded semicolon
drivers/power/supply/bq25890_charger.c:638:2-3: Unneeded semicolon
drivers/power/supply/bq25890_charger.c:644:2-3: Unneeded semicolon
Remove unneeded semicolon.
Generated by: scripts/coccinelle/misc/semicolon.cocci
Fixes: 9d9ae3414d1b ("power: supply: bq25890_charger: Add debugging output of failed initialization")
CC: Angus Ainslie (Purism) <[email protected]>
Signed-off-by: kbuild test robot <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Since the max8998 MFD driver supports instantiation by DT, platform data
retrieval is handled in MFD probe and cell drivers should get use
the pdata field of max8998_dev struct to obtain them.
Fixes: ee999fb3f17f ("mfd: max8998: Add support for Device Tree")
Signed-off-by: Tomasz Figa <[email protected]>
Signed-off-by: Paweł Chmiel <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Immutable branch for mfd and power-supply for v4.20
Immutable branch between mfd and power-supply for driver
changes in CROS USBPD charger driver.
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
ChromeOS devices can have one optional dedicated port.
The Dedicated port is unique and similar to the USB PD ports
except that it doesn't support as many properties.
The presence of a dedicated port is determined from whether the
EC's charger port count is equal to 'number of USB PD port' + 1.
The dedicated port ID is always the last valid port ID.
This commit keeps compatibility with Embedded Controllers that do not
support the new EC_CMD_CHARGE_PORT_COUNT command by setting
the number of charger port to be equal to the number of USB PD port
when this command fails.
Signed-off-by: Fabien Parent <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Immutable branch for mach-at91 and power-supply for v4.20
Immutable branch between mach-at91 and power-supply for driver
changes in at91-poweroff.
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
There should be only one instance of struct shdwc in the system. This is
referenced through at91_shdwc. Return in probe if at91_shdwc is already
allocated.
Signed-off-by: Claudiu Beznea <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Rename at91_shdwc_base member of struct shdwc to shdwc_base. There is
already an "at91" string in at91_shdwc object.
Signed-off-by: Claudiu Beznea <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Make sclk part of struct shdwc to have all the data specific to SHDWC
grouped together in one structure.
Signed-off-by: Claudiu Beznea <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Make mpddrc_base part of struct shdwc since there is also only one
instance of struct shdwc *at91_shdwc in system and to have all data
specific to SHDWC grouped together.
Signed-off-by: Claudiu Beznea <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Use only one poweroff function for sama5d2 and adapt it to work for both
scenarios (having LPDDR or not).
Signed-off-by: Claudiu Beznea <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
The SAMA5D2 NRST input signal is resynchronized with the SLCK clock and it
can take up to 2 SLCK cycles (about 90us) for the internal reset to be
effective. During this delay, the VDDCORE current consumption may still be
high (application-dependent) with the VDDCORE regulator already OFF. Under
such conditions, VDDCORE may operate below its operating range leading to
potential register corruption.
To prevent such situation, it is recommended to decrease significantly the
power consumption of the device once the voltage regulator is turned-off.
This can be achieved by operating the device at a much lower low frequency.
To solve this switch the master clock to slock clock just before writing
shutdown command to shutdown controller.
Signed-off-by: Claudiu Beznea <[email protected]>
Suggested-by: Patrice Vilchez <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
This patch updates license to use SPDX-License-Identifier
instead of verbose license text.
Signed-off-by: Kuninori Morimoto <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
If kstrtoul() fails then we print "charge_full" when it's uninitialized.
The debug printk doesn't add anything so I deleted it and cleaned these
two functions up a bit.
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
This adds rate limiting to the message that is printed when reading a
power supply property via sysfs returns an error. This will prevent
userspace applications from unintentionally dDOSing the system by
continuously reading a property that returns an error.
Signed-off-by: David Lechner <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
The BQ2589x family has the capability of reading the current battery voltage.
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Angus Ainslie (Purism) <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
The BQ25896 is almost identical to the BQ25890.
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Angus Ainslie (Purism) <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
There are a few table entries that aren't used. Drop them.
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Angus Ainslie (Purism) <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
To ease adding a new part variant some debugging is handy.
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Angus Ainslie (Purism) <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Replace GPL v2.0 and v2.0+ license statements with SPDX license
identifiers.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
simple_strtoul is obsolete, and use kstrtoint instead
Signed-off-by: Ding Xiang <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|
|
Pointer 'dev' is being assigned but is never used hence it is
redundant and can be removed.
Cleans up clang warning:
variable 'dev' set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
|