lkml.org 
[lkml]   [2020]   [Dec]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 3/8] power: supply: max8997_charger: Set CHARGER current limit
On Wed, Dec 30, 2020 at 08:52:15PM +0000, Timon Baetz wrote:
> Register for extcon notification and set charging current depending on
> the detected cable type. Current values are taken from vendor kernel,
> where most charger types end up setting 650mA [0].
>
> Also enable and disable the CHARGER regulator based on extcon events.
>
> [0] https://github.com/krzk/linux-vendor-backup/blob/samsung/galaxy-s2-epic-4g-touch-sph-d710-exynos4210-dump/drivers/misc/max8997-muic.c#L1675-L1678
>
> Signed-off-by: Timon Baetz <timon.baetz@protonmail.com>
> ---
> v6: dev_info() instead of dev_err().
> v5: Use devm_regulator_get_optional(), dev_err() on failure.
> dev_err() on extcon_get_edev_by_phandle() failure.
> v4: Make extcon and charger-supply optional.
> v3: Split MFD change.
> return on regulator_set_current_limit() failure.
> v2: Split DTS changes.
> Add missing include.
> Rename charger_data members.
> Disable regulator on regulator_set_current_limit() failure.
> Fix ret declaration.
> Remove unneeded variables.
> Don't dev_err() on deferral.
> Get regulator and extcon from DTS.
> Use devm_regulator_get().
> Fix indentation.



Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

\
 
 \ /
  Last update: 2020-12-31 09:58    [W:0.114 / U:1.816 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site