From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Garrett Subject: Re: /sys/class/power_supply/BAT0/ charge_ vs energy_ Date: Mon, 9 Jan 2012 13:37:22 +0000 Message-ID: <20120109133722.GA9981@srcf.ucam.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from cavan.codon.org.uk ([93.93.128.6]:49276 "EHLO cavan.codon.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752763Ab2AINhZ (ORCPT ); Mon, 9 Jan 2012 08:37:25 -0500 Content-Disposition: inline In-Reply-To: Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Jamie Kitson Cc: linux-acpi On Mon, Jan 09, 2012 at 12:10:00PM +0000, Jamie Kitson wrote: > If I boot with AC plugged in the /sys/class/power_supply/BAT0/ > directory is populated with charge_*, but if I boot on battery the > directory is populated with energy_*. > > Disconnecting/connecting the power after boot does not effect the file names. > > Is this a bug or a feature? It makes scripts harder to write than necessary. It's the way Lenovo's firmware works. It's not clear why. -- Matthew Garrett | mjg59@srcf.ucam.org