drivers: charger: charger_max20355: fix configuration
Maximum charging current is selected with an external resistor in the MAX20335 charger. Therefore it is not possible to configure it with software directly. There is only a capability to limit current set with hardware but configuration of the limiter is not straight-forward. To reflect real functionality, drop usage of `constant-charge-current-max-microamp` property as an required one and use custom `chgin-to-sys-current-limit-microamp` instead. Use enum in binding file to signalize improper values at compile time. Drop support for `CHARGER_PROP_CONSTANT_CHARGE_CURRENT_UA` API property since this cannot be handled. The `max20335_get_constant_charge_current()` function become useless so remove it. Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
This commit is contained in:
parent
9b0510cea9
commit
d791526dd8
5 changed files with 30 additions and 55 deletions
|
@ -8,12 +8,21 @@ include: battery.yaml
|
|||
compatible: "maxim,max20335-charger"
|
||||
|
||||
properties:
|
||||
constant-charge-current-max-microamp:
|
||||
required: true
|
||||
|
||||
constant-charge-voltage-max-microvolt:
|
||||
required: true
|
||||
|
||||
chgin-to-sys-current-limit-microamp:
|
||||
type: int
|
||||
required: true
|
||||
enum:
|
||||
- 0
|
||||
- 100000
|
||||
- 500000
|
||||
- 1000000
|
||||
description: |
|
||||
CHGIN to SYS path current limitter configuration.
|
||||
Refer to ILimCntl register description for details.
|
||||
|
||||
int-gpios:
|
||||
type: phandle-array
|
||||
required: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue