Commit 43789c31 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

greybus: battery-gb: provide accessors for a few more functions

Put the hard coded values in a function to make it easier to see what
needs to be done here.
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 213aefe2
......@@ -27,12 +27,24 @@ static const struct greybus_module_id id_table[] = {
{ }, /* terminating NULL entry */
};
static int get_tech(struct gb_battery *gb)
{
// FIXME - guess!
return POWER_SUPPLY_TECHNOLOGY_NiMH;
}
static int get_status(struct gb_battery *gb)
{
// FIXME!!!
return 0;
}
static int get_max_voltage(struct gb_battery *gb)
{
// FIXME!!!
return 4700000;
}
static int get_capacity(struct gb_battery *gb)
{
// FIXME!!!
......@@ -59,8 +71,7 @@ static int get_property(struct power_supply *b,
switch (psp) {
case POWER_SUPPLY_PROP_TECHNOLOGY:
// FIXME - guess!
val->intval = POWER_SUPPLY_TECHNOLOGY_NiMH;
val->intval = get_tech(gb);
break;
case POWER_SUPPLY_PROP_STATUS:
......@@ -68,7 +79,7 @@ static int get_property(struct power_supply *b,
break;
case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN:
val->intval = 4700000; // FIXME - guess???
val->intval = get_max_voltage(gb);
break;
case POWER_SUPPLY_PROP_CAPACITY:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment