RE: [PATCHv2] power_supply: Register battery as a thermal zone

From: Tc, Jenny
Date: Mon Jun 18 2012 - 01:11:58 EST


Hi Anton,

> -----Original Message-----
> From: Anton Vorontsov [mailto:cbouatmailru@xxxxxxxxx]
> Sent: Monday, June 18, 2012 9:59 AM
> To: Tc, Jenny
> Cc: linux-kernel@xxxxxxxxxxxxxxx; R, Durgadoss
> Subject: Re: [PATCHv2] power_supply: Register battery as a thermal zone
>
> On Wed, May 09, 2012 at 08:36:47PM +0530, Jenny TC wrote:
> > Battery and charger contribute to Thermals in most of the embedded
> > devices. So, it makes sense to identify them as Thermal zones in a
> > particular platform.
> >
> > This patch registers a thermal zone if the power supply is reporting a
> > temperature property. The thermal zone will be used by platform's
> > thermal management solution.
> >
> > Signed-off-by: Jenny TC <jenny.tc@xxxxxxxxx>
> > ---
>
> Once again, thanks for the patch! It's a nice feature.
>
> [...]
> > @@ -206,6 +258,9 @@ int power_supply_register(struct device *parent,
> struct power_supply *psy)
> > goto success;
> >
> > create_triggers_failed:
> > + if (psy->tzd)
> > + thermal_zone_device_unregister(psy->tzd);
>
> This causes errors:
>
> CC drivers/power/pda_power.o
> drivers/power/power_supply_core.c: In function âpower_supply_registerâ:
> drivers/power/power_supply_core.c:261:9: error: âstruct power_supplyâ has
> no member named âtzdâ
> drivers/power/power_supply_core.c:262:37: error: âstruct power_supplyâ
> has no member named âtzdâ
> make[2]: *** [drivers/power/power_supply_core.o] Error 1
>
> I think we should just introduce unregister_thermal(). So, that's what I've
> applied:

Sorry I missed it. Thanks for adding it. Hope you will merge it

-jtc
èº{.nÇ+‰·Ÿ®‰­†+%ŠËlzwm…ébëæìr¸›zX§»®w¥Š{ayºÊÚë,j­¢f£¢·hš‹àz¹®w¥¢¸ ¢·¦j:+v‰¨ŠwèjØm¶Ÿÿ¾«‘êçzZ+ƒùšŽŠÝj"ú!¶iO•æ¬z·švØ^¶m§ÿðà nÆàþY&—