Hi, On Thu, Mar 16, 2023 at 09:10:03AM +0200, Matti Vaittinen wrote: > > For chargers the situation is different (they usually want the > > data before registration), but they should not expose the > > battery data anyways. > > I probably should go back studying how the power-supply class > works before continuing this discussion :) > > So, is it so that when a single IC contains both the charger logic > and battery monitoring - then the driver is expected to create two > power_supply devices. One for the battery and the other for the > charger? I assume both of these pover_supply devices will then > find the same battery_info - which means that one of the devices > (probably the charger) should not auto-expose properties(?) Yes. > Well, as I said I should go study things better before continuing > - but as I have limited time for studying this now I'll just ask > if there is a danger we auto-expose battery details from existing > drivers via two devices? And as I did no study I will just accept > what ever answer you give and trust you to know this better ^_^; Nothing will explode. But charger devices are supposed to provide charger information and the data from simple-battery is about the battery, so it should be exposed through a battery typed device. Exposing e.g. POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN for a charger makes no sense. Why would the charger have a design capacity? > [...] > > [05/12] power: supply: generic-adc-battery: drop jitter delay support > > I didn't feel technically capable of reviewing the above delay > patch as I don't know what kind of delays are typically needed - > or if they need to be configurable - or what is the purpose of > this delay (some stabilization period after charging?) > > So, it's not that your patch had something I didn't agree with - I > was just not feeling I understand the consequences of the changes. > Purely from coding perspective it looked good to me :) From what I can tell the original author had to debounce the GPIO. -- Sebastian
Attachment:
signature.asc
Description: PGP signature