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[] = { ...@@ -27,12 +27,24 @@ static const struct greybus_module_id id_table[] = {
{ }, /* terminating NULL entry */ { }, /* 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) static int get_status(struct gb_battery *gb)
{ {
// FIXME!!! // FIXME!!!
return 0; return 0;
} }
static int get_max_voltage(struct gb_battery *gb)
{
// FIXME!!!
return 4700000;
}
static int get_capacity(struct gb_battery *gb) static int get_capacity(struct gb_battery *gb)
{ {
// FIXME!!! // FIXME!!!
...@@ -59,8 +71,7 @@ static int get_property(struct power_supply *b, ...@@ -59,8 +71,7 @@ static int get_property(struct power_supply *b,
switch (psp) { switch (psp) {
case POWER_SUPPLY_PROP_TECHNOLOGY: case POWER_SUPPLY_PROP_TECHNOLOGY:
// FIXME - guess! val->intval = get_tech(gb);
val->intval = POWER_SUPPLY_TECHNOLOGY_NiMH;
break; break;
case POWER_SUPPLY_PROP_STATUS: case POWER_SUPPLY_PROP_STATUS:
...@@ -68,7 +79,7 @@ static int get_property(struct power_supply *b, ...@@ -68,7 +79,7 @@ static int get_property(struct power_supply *b,
break; break;
case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN: case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN:
val->intval = 4700000; // FIXME - guess??? val->intval = get_max_voltage(gb);
break; break;
case POWER_SUPPLY_PROP_CAPACITY: 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