Thread (9 messages) flat view 9 messages, 3 authors, 2021-12-14

Re: [PATCH v2] power: supply_core: Pass pointer to battery info

From: Matti Vaittinen <mazziesaccount@gmail.com>
Date: 2021-12-14 06:44:17

Hi deee Ho peeps,

On 12/13/21 11:23, Matti Vaittinen wrote:
On 12/10/21 07:57, Matti Vaittinen wrote:
quoted
On Thu, Dec 9, 2021 at 2:46 AM Linus Walleij 
[off-list ref] wrote:
quoted
quoted
Also I would love if you could test v2 on hardware!
... snip ...
spare board left - and I do noeed it for bunch of tasks - so I am afraid 
I can't re-try testing untill I have ordered and received few 
replacement boards...
It seems I like to live on the edge. I nevertheless connected my spare 
BBB board to the BD99954 and got it working. (I noticed I had two loose 
wires touching each others during my previous trial. It resulted 
shorting +5V from beagle to GND - which was not a good idea).

It appears the patch worked as expected - but it also appears the 
BD99954 driver does not handle missing info too well... I typoed the 
trickle-charger current property in DT - and as a result the driver 
decided -EINVAL to be valid value (just too large) and set the largest 
current BD99954 supports for trickle-charging... I think this same 
problem is there for all the -EINVAL values. If I am not mistaken this 
is somewhat nasty as it means that if some information is missing the 
driver will change (potentially pre-configured) values to something 
which may fry things...

Linus, want to fix this while at it - or do you prefer me to patch the 
BD99954 with some sanity checks? I think it'd be nice to get the fixes 
in stable so it might be best to add the sanity checks before changing 
the battery-info allocation - that might be nicer for the stable folks. 
(I guess you have plenty of other things to code + some IRL tasks as 
well ...;] So, I can patch this but it means there is likely to be some 
conflicts with your series. Hence I thought I'll ask if you wish to add 
checks for uninitialized battery-info values)

Best Regards
	--Matti Vaittinen
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help