Re: [PATCH] mfd: bd71828: Add some missing charger related registers

From: Andreas Kemnade
Date: Tue Dec 09 2025 - 04:22:07 EST


On Mon, 8 Dec 2025 09:47:43 +0200
Matti Vaittinen <mazziesaccount@xxxxxxxxx> wrote:

> On 07/12/2025 10:50, Andreas Kemnade wrote:
> > As there are some registers missing which are required for future charger
> > extensions, add them.
> >
> > Signed-off-by: Andreas Kemnade <andreas@xxxxxxxxxxxx>
>
> Reviewed-by: Matti Vaittinen <mazziesaccount@xxxxxxxxx>
>
> Thanks for working with this driver! Much appreciated :)
>
[...]
> I asked for some clarification from the HQ folks - but they may be quite
> busy, and my request(s) may not be at the top of the priority list. So,
> let's see...
>
> Are you planning to expose the current limit values to user-space? Allow
> setting the control to AUTO/fixed value? I suppose this is what enabled
> you to do some low-power charging, right?
>
I am thinking about adding input_current_limit property and providing the
ILIM_DCIN_EN as a custom sysfs property like maybe "auto_input_current_limitation"

I had issues with using my bike hub dynamo and some solar panels
without any additional batteries in between, just regulator (and
in the bike hub dynamo, of course a rectifier with a smoothing capacitor).
I would expect to just see the current limited so that voltage stays at the
anticollapse voltage, but that is not the case.
I have solved the problem with clearing ILIM_DCIN_EN and setting current
accordingly (often to something like 0.4A). I will try to use the next sun ray
arriving here to recheck. I have created a script to manipulate
things using i2cset in a lonely place in nature where I obviously
did not want to spend time with datasheets as short as possible.

The key point is not only low-power charging but also power sources with
changing properties.

Regards,
Andreas