lkml.org 
[lkml]   [2013]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] power_supply: Add charge control struct in power supply class
On Mon, Jan 07, 2013 at 05:43:58AM +0000, Pallala, Ramakrishna wrote:
> > > > > +struct power_supply_charger_control {
> > > > > + const char *name;
> > > > > + /* get charging status */
> > > > > + int (*is_charging_enabled)(void);
> > > > > + int (*is_charger_enabled)(void);
[...]
> > The similar functionalities are exposed by patch
> > https://lkml.org/lkml/2012/10/18/219.
> > As per Anton's review comments on this patch, I'll be moving the macros to
> > power_supply.h.
> > Wouldn't that be enough ?
>
> Though the macros seem to be fine but I would still think that call back way of interfaces would be
> More flexible and straightforward.

We have properties mechanism deployed already, so I'd rather keep it
consistent.

p.s. We had 'properties vs. callbacks' debates before, there are pros and
cons of each approach. Unless there are some unresolvable issues, let's
stick with the original approach. :)


\
 
 \ /
  Last update: 2013-01-07 08:01    [W:0.063 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site