RE: [PATCH v2] charger_manager: update charge profile upontemperature zone change

From: Tc, Jenny
Date: Wed May 09 2012 - 02:21:02 EST



> > > This patch allows the Charger-Manager to adjust the charging
> > > parameters upon events like VBUS rise or drop and allows batteries
> > > to have multiple charge profiles for different temperature zones.
> > >
> > > Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@xxxxxxxxx>
> >
> > I don't see how the parameters are changed when update_charger is true.
> My initial thought was to keep these details hide from CM.
>
> > Are you intending to do it at userspace after getting uevent_notify()?
> > (I don't think it's good)
> No, we will do it from driver only.
>
> > If the intension is to update some of the charger-manager internal
> > parameters (struct charger_manager's struct charger_desc) according to
> > the temperature, we'd need a more general method that can also update
> values in the charger-manager context.
> >
> > For example, instead of simply putting a callback to determine whether
> > an update is required or not, a table of (including hysterisis)
> > temperatures and values to be updated (or callbacks to update
> > charger_desc based on the temperature) might be a starting point. You
> may also need to consider using notifier chain w/ temperatures.
> >
> Yes I agree, I will submit another patch with these changes.
>
> As part of charge enablement we generally program charge current, charge
> voltage into the charger chip.
>
> We can pass the charging parameters CC and CV in two ways.
> 1. Add these params in charger_desc struct and the charger regulator can get
> these params using container_of() call? but becomes complex.
>
> 2. use regulator_set_voltage()/regulator_set_current_limit() functions to set
> the CV and CC params.
> but not suitable as is, we have add support in regulator framework
>

regulator_ops has support for set_current_limit and set_voltage. Can we use the same for setting CC and CV?

> 3. use regulator_get_drvdata()/regulator_set_drvdata() to set CC & CV
> params. These functions allow us to add more params in future if required.
>
> I am thinking of using option 3.
>
> Let me know your feedback.
>
> Thanks,
> Ram
>
> Nëê?íyéìbìÐív??é{.n?ëì{ìåzXãìè
> }ìêì?j:+vë?ìåzZ+Â?zfïíì?ëëiïéz?ìâ?ìé??å
> fë^jíyìë@Aìëï
>
> 0ëh??i
N‹§²æìr¸›yúèšØb²X¬¶ÇvØ^–)Þ{.nÇ+‰·¥Š{±‘êçzX§¶›¡Ü}©ž²ÆzÚ&j:+v‰¨¾«‘êçzZ+€Ê+zf£¢·hšˆ§~†­†Ûiÿûàz¹®w¥¢¸?™¨è­Ú&¢)ßf”ù^jÇy§m…á@A«a¶Úÿ 0¶ìh®å’i