- 28 5月, 2020 3 次提交
-
-
由 Sebastian Reichel 提交于
This merges the MP2629 battery charge management immutable branch between MFD, IIO and power-supply due for the v5.8 merge window into power-supply for-next branch. Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
由 Serge Semin 提交于
Since normally syscon-reboot block is supposed to be a part of a system controller, lets look for the syscon regmap in a parental DT node if regmap property isn't specified. DT binding from now considers the regmap property as deprecated. Signed-off-by: NSerge Semin <Sergey.Semin@baikalelectronics.ru> Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
由 Serge Semin 提交于
Since normally syscon-reboot block is supposed to be a part of a system controller, lets mark the regmap property as deprecated and recommend the syscon-reboot node to be a sub-node of SYSCON. Signed-off-by: NSerge Semin <Sergey.Semin@baikalelectronics.ru> Reviewed-by: NRob Herring <robh@kernel.org> Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
- 26 5月, 2020 6 次提交
-
-
由 Saravanan Sekar 提交于
Add MAINTAINERS entry for Monolithic Power Systems mp2629 Charger driver. Signed-off-by: NSaravanan Sekar <sravanhome@gmail.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: NSebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Saravanan Sekar 提交于
Allows the user to compensate the intrinsic resistance of the battery to accelerate the charging cycle. Signed-off-by: NSaravanan Sekar <sravanhome@gmail.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: NSebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Saravanan Sekar 提交于
The mp2629 provides switching-mode battery charge management for single-cell Li-ion or Li-polymer battery. Driver supports the access/control input source and battery charging parameters. Signed-off-by: NSaravanan Sekar <sravanhome@gmail.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: NSebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Saravanan Sekar 提交于
Add support for 8-bit resolution ADC readings for input power supply and battery charging measurement. Provides voltage, current readings to mp2629 power supply driver. Signed-off-by: NSaravanan Sekar <sravanhome@gmail.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: NJonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Saravanan Sekar 提交于
mp2629 is a highly-integrated switching-mode battery charge management device for single-cell Li-ion or Li-polymer battery. Add MFD core enables chip access for ADC driver for battery readings, and a power supply battery-charger driver Signed-off-by: NSaravanan Sekar <sravanhome@gmail.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: NJonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Saravanan Sekar 提交于
Add device tree binding information for mp2629 mfd driver. Signed-off-by: NSaravanan Sekar <sravanhome@gmail.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 18 5月, 2020 1 次提交
-
-
由 Dan Murphy 提交于
Convert the bq27xxx.txt to yaml format CC: Pali Rohár <pali@kernel.org> CC: Andrew F. Davis <afd@ti.com> Signed-off-by: NDan Murphy <dmurphy@ti.com> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
- 13 5月, 2020 1 次提交
-
-
由 Wolfram Sang 提交于
Move away from the deprecated API in this comment. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
- 11 5月, 2020 10 次提交
-
-
由 Michał Mirosław 提交于
Report REG00.IINLIM value as INPUT_CURRENT_LIMIT property. Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
由 Michał Mirosław 提交于
Report configured precharge current. Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
由 Michał Mirosław 提交于
Report charging type based on recently read state. Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
由 Michał Mirosław 提交于
Edge interrupts from the charger may be lost or stuck in fault mode since probe(). Check if something changed everytime userspace wants some data. Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
由 Michał Mirosław 提交于
Datasheet describes two modes for reading ADC measurements: 1. continuous, 1 Hz - enabled and started by CONV_RATE bit 2. one-shot - triggered by CONV_START bit In continuous mode, CONV_START is read-only and signifies an ongoing conversion. Change the code to follow the datasheet and really disable continuous mode for power saving. Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
由 Michał Mirosław 提交于
Charge Current is more apropriately reflected by CURRENT_NOW property (measured current) than CONSTANT_CURRENT_VOLTAGE (configured CC-phase current limit). Fix the reference and make the sign reflect direction of the current. Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
由 Jonathan Bakker 提交于
According to the datasheet available at (1), the bottom four bits are always zero and the actual voltage is 1.25x this value in mV. Since the kernel API specifies that voltages should be in uV, it should report 1250x the shifted value. 1) https://datasheets.maximintegrated.com/en/ds/MAX17040-MAX17041.pdfSigned-off-by: NJonathan Bakker <xc-racer2@live.ca> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
由 Lubomir Rintel 提交于
The framework is unhappy about them, because it uses the names in sysfs attributes: power_supply olpc-ac: hwmon: 'olpc-ac' is not a valid name attribute, please fix power_supply olpc-battery: hwmon: 'olpc-battery' is not a valid name attribute, please fix See also commit 648cd48c ("hwmon: Do not accept invalid name attributes") and commit 74d3b641 ("hwmon: Relax name attribute validation for new APIs"). Signed-off-by: NLubomir Rintel <lkundrak@v3.sk> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
由 David Heidelberg 提交于
This delay-fix is picked up from downstream driver, we measured that 25 - 35 ms delay ensure that we get required data. Tested on SMB347 on Nexus 7 2012. Otherwise IRQSTAT_E fails to provide correct information. Signed-off-by: NDmitry Osipenko <digetx@gmail.com> Signed-off-by: NDavid Heidelberg <david@ixit.cz> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
由 Dmitry Osipenko 提交于
Fix failure when USB cable is connected: smb347 2-006a: reading IRQSTAT_D failed Fixes: 1502cfe1 ("smb347-charger: Fix battery status reporting logic for charger faults") Tested-by: NDavid Heidelberg <david@ixit.cz> Signed-off-by: NDmitry Osipenko <digetx@gmail.com> Signed-off-by: NDavid Heidelberg <david@ixit.cz> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
- 10 5月, 2020 10 次提交
-
-
由 Matti Vaittinen 提交于
The "default n" is not needed as it is, well, default. Clean the KConfig by removing "default n". Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
由 Matti Vaittinen 提交于
Indent the help text as explained in Documentation/process/coding-style.rst Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
由 Matti Vaittinen 提交于
The ROHM BD99954 is a Battery Management LSI for 1-4 cell Lithium-Ion secondary battery intended to be used in space-constraint equipment such as Low profile Notebook PC, Tablets and other applications. BD99954 provides a Dual-source Battery Charger, two port BC1.2 detection and a Battery Monitor. Support ROHM BD99954 Charger IC. Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
由 Matti Vaittinen 提交于
The ROHM BD99954 is a Battery Management LSI for 1-4 cell Lithium-Ion secondary battery. Intended to be used in space-constraint equipment such as Low profile Notebook PC, Tablets and other applications. BD99954 provides a Dual-source Battery Charger, two port BC1.2 detection and a Battery Monitor. Document the DT bindings for BD99954 Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
由 Matti Vaittinen 提交于
Add parsing of new device-tree battery bindings. - trickle-charge-current-microamp - precharge-upper-limit-microvolt - re-charge-voltage-microvolt - over-voltage-threshold-microvolt Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
由 Matti Vaittinen 提交于
Add: - trickle-charge-current-microamp: Some chargers have 3 charging stages. First one when battery is almost empty is often called as trickle-charge. Last state when battery has been "woken up" is usually called as fast-charge. In addition to this some chargers have a 'middle state' which ROHM BD99954 data-sheet describes as pre-charge. Some batteries can benefit from this 3-phase charging [citation needed]. Introduce trickle-charge-current-microamp so that batteries can give charging current limit for all three states. - precharge-upper-limit-microvolt: When battery voltage has reached certain limit we change from trickle-charge to next charging state (pre-charge for BD99954). Allow battery to specify this limit. - re-charge-voltage-microvolt: Allow giving a battery specific voltage limit for chargers which can automatically re-start charging when battery has discharghed down to this limit. - over-voltage-threshold-microvolt Allow specifying voltage threshold after which the battery is assumed to be faulty. Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
由 Matti Vaittinen 提交于
Change the bd70528 to use common linear_range code instead of implementing a copy of it in this driver. Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
由 Sebastian Reichel 提交于
lib: Add linear ranges helper library and start using it Series extracts a "linear ranges" helper out of the regulator framework. Linear ranges helper is intended to help converting real-world values to register values when conversion is linear. I suspect this is useful also for power subsystem and possibly for clk. Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
由 Hongbo Yao 提交于
Fix gcc '-Wunused-but-set-variable' warning: drivers/power/reset/ltc2952-poweroff.c:97:16: warning: variable ‘overruns’ set but not used [-Wunused-but-set-variable] unsigned long overruns; Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NHongbo Yao <yaohongbo@huawei.com> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
由 Christophe JAILLET 提交于
In the probe function, in case of error, resources allocated in 'lp8788_setup_adc_channel()' must be released. This can be achieved easily by using the devm_ variant of 'iio_channel_get()'. This has the extra benefit to simplify the remove function and to axe the 'lp8788_release_adc_channel()' function which is now useless. Fixes: 98a27664 ("power_supply: Add new lp8788 charger driver") Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
- 09 5月, 2020 7 次提交
-
-
由 Serge Semin 提交于
Modern device tree bindings are supposed to be created as YAML-files in accordance with dt-schema. This commit replaces SYSCON reboot-mode legacy bare text bindings with YAML file. As before the bindings file states that the corresponding dts node is supposed to be compatible "syscon-reboot-mode" device and necessarily have an offset property to determine which register from the regmap is supposed to keep the mode on reboot. Signed-off-by: NSerge Semin <Sergey.Semin@baikalelectronics.ru> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
由 ChenTao 提交于
Fix the following warning: drivers/power/supply/cw2015_battery.c:96:5: warning: 'cw_update_profile' was not declared. Should it be static? drivers/power/supply/cw2015_battery.c:712:1: warning: 'cw_bat_pm_ops' was not declared. Should it be static? Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NChenTao <chentao107@huawei.com> Acked-by: NTobias Schramm <t.schramm@manjaro.org> Tested-by: NTobias Schramm <t.schramm@manjaro.org> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
由 Dan Carpenter 提交于
We introduced some new locking here, but need to update the error paths so they unlock before returning. Fixes: 72d9cd9c ("power: bq25890: protect view of the chip's state") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
由 Matti Vaittinen 提交于
Change the regulator helpers to use common linear_ranges code. Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Reviewed-by: NMark Brown <broonie@kernel.org> Acked-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Acked-by: NAdam Thomson <Adam.Thomson.Opensource@diasemi.com> Link: https://lore.kernel.org/r/64f01d5e381b8631a271616b7790f9d5640974fb.1588944082.git.matti.vaittinen@fi.rohmeurope.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Matti Vaittinen 提交于
Follow-up patches in this series will add a generic struct linear_range. Rename bd70528 internal struct to avoid collision. Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Reviewed-by: NSebastian Reichel <sebastian.reichel@collabora.com> Link: https://lore.kernel.org/r/286b1ae0adc1c08e7b644cbdc1a43eb2e0644647.1588944082.git.matti.vaittinen@fi.rohmeurope.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Matti Vaittinen 提交于
Add a KUnit test for the linear_ranges helper. Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Reviewed-by: NBrendan Higgins <brendanhiggins@google.com> Link: https://lore.kernel.org/r/311fea741bafdcd33804d3187c1642e24275e3e5.1588944082.git.matti.vaittinen@fi.rohmeurope.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Matti Vaittinen 提交于
Many devices have control registers which control some measurable property. Often a register contains control field so that change in this field causes linear change in the controlled property. It is not a rare case that user wants to give 'meaningful' control values and driver needs to convert them to register field values. Even more often user wants to 'see' the currently set value - again in meaningful units - and driver needs to convert the values it reads from register to these meaningful units. Examples of this include: - regulators, voltage/current configurations - power, voltage/current configurations - clk(?) NCOs and maybe others I can't think of right now. Provide a linear_range helper which can do conversion from user value to register value 'selector'. The idea here is stolen from regulator framework and patches refactoring the regulator helpers to use this are following. Current implementation does not support inversely proportional ranges but it might be useful if we could support also inversely proportional ranges? Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Reviewed-by: NMark Brown <broonie@kernel.org> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/59259bc475e0c800eb4bb163f02528c7c01f7b3a.1588944082.git.matti.vaittinen@fi.rohmeurope.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 07 5月, 2020 2 次提交
-
-
由 Mathew King 提交于
Add POWER_SUPPLY_TYPE to the uevent env for power supply. Type is a property of all power supplies and there is a sysfs entry for it but it is not included in the properties array of the power supply so explicitly add it to the udev env. Signed-off-by: NMathew King <mathewk@chromium.org> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-
由 Mathew King 提交于
Reduce the number of touch points to add a new enum property to the power_supply class by mapping the array of text values to the device attribute descriptor. A new enum property can now added by creating an array with the text values named POWER_SUPPLY_${PROPNAME}_TEXT and adding POWER_SUPPLY_ENUM_ATTR(${PROPNAME}) to the power_supply_attrs array. Signed-off-by: NMathew King <mathewk@chromium.org> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
-