Re: ACPI battery driver emits POWER_SUPPLY_STATUS_FULL when power lead plugged in

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

 



On Fri, 23 Jan 2009, Alexey Starikovskiy wrote:
> This is probably related to this piece of code (drivers/acpi/battery.c),
> similar code exists in drivers/acpi/sbs.c, but it is not relevant to your case:
> 	case POWER_SUPPLY_PROP_STATUS:
> 		if (battery->state & 0x01)
> 			val->intval = POWER_SUPPLY_STATUS_DISCHARGING;
> 		else if (battery->state & 0x02)
> 			val->intval = POWER_SUPPLY_STATUS_CHARGING;
> 		else if (battery->state == 0)
> 			val->intval = POWER_SUPPLY_STATUS_FULL;
> 		else
> 			val->intval = POWER_SUPPLY_STATUS_UNKNOWN;
> 		break;
>
> Actually, state==0 means POWER_SUPPLY_STATUS_NOT_CHARGING, so if that is preferred it could be changed.

It should be fixed, yes.  Batteries being idle without being full are really
common in laptops with battery-life-saving functions (charge/stop-charge
threshold control).

-- 
  "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