[lkml]   [2007]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 1/5] power: RFC: introduce a new power API
    On Sun, 2007-12-16 at 21:24 -0500, Andres Salomon wrote:
    > This API has the power_supply drivers device their own device_attribute
    > list; I find this to be a lot more flexible and cleaner. For example,
    > rather than having a function with a huge switch statement (as olpc_battery
    > currently has), we have separate callback functions. We're not limited
    > to drivers only being able to pass 'int' and 'char*'s in sysfs, we're
    > not forced to keep a global string around in memory (as is again the
    > case for olpc_battery's serial number code), we don't have ordering
    > restrictions w/ the return value being interpreted based upon where it's
    > located in the array... etc. The other API seems to encourage driver
    > authors to get their custom sysfs knobs into the list of sysfs knobs, and
    > this one doesn't.
    > If there is interest in this API, I'll convert the rest of the power_supply
    > drivers over to it and resubmit patches.

    Looks sane enough to me. If Anton has no objections, I'll merge it.

    > Ignore the psy->num_properties indentation below; that was done so patch #4
    > wasn't stupidly large.

    Interesting... but I suppose it makes sense.


     \ /
      Last update: 2007-12-17 03:39    [W:0.020 / U:62.948 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site