Re: [RFC][PATCH] ACPI: battery: add power_{now, avg} properties to power_class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 16 Dec 2008, Alexey Starikovskiy wrote:
> @@ -224,10 +224,12 @@ static int acpi_sbs_battery_get_property(struct power_supply *psy,
>  				acpi_battery_vscale(battery) * 1000;
>  		break;
>  	case POWER_SUPPLY_PROP_CURRENT_NOW:
> +	case POWER_SUPPLY_PROP_POWER_NOW:
>  		val->intval = abs(battery->current_now) *
>  				acpi_battery_ipscale(battery) * 1000;
>  		break;
>  	case POWER_SUPPLY_PROP_CURRENT_AVG:
> +	case POWER_SUPPLY_PROP_POWER_AVG:
>  		val->intval = abs(battery->current_avg) *
>  				acpi_battery_ipscale(battery) * 1000;
>  		break;

Excuse me if I am talking nonsense (I have looked over just the patch,
not the entire file), but how can that be correct?  It is either power
or current, it cannot be both, so the CURRENT case should be dropped.
And if it is power, why have fields named current_now... or is
ipscale() a voltage, and not a scaling factor?

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux