public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexey Starikovskiy <aystarik@gmail.com>
To: Frans Pop <elendil@planet.nl>
Cc: Jeff Chua <jeff.chua.linux@gmail.com>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: latest 2.6.23 git missing ACPI POWER_SUPPLY
Date: Mon, 22 Oct 2007 17:07:54 +0400	[thread overview]
Message-ID: <471CA0AA.4000904@gmail.com> (raw)
In-Reply-To: <E1IjvB3-0005oG-N9@faramir.fjphome.nl>

[-- Attachment #1: Type: text/plain, Size: 965 bytes --]

Frans Pop wrote:
> Jeff Chua wrote:
>> Just pulled latest linux-2.6, and couldn't get ACPI to detect
>> ACPI_BATTERY and ACPI_AC.
>>
>> It seems ACPI POWER_SUPPLY is still missing.
> 
> I had the same problem. It turns out you need to enable
>    drivers -> Power supply class support
> (either built in or as module) to get ACPI AC/Battery support.
> 
> I must say that having these relatively top-level ACPI settings depending on something that is relatively buried away is not very intuitive!
> Especially not since at first glance you don't really seem to need that option except for some weird hardware.
> 
> CC'ing ACPI mailing list for other opinions.
I was thinking that 'select' might be more appropriate here...
Please take a look on attached patch.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


[-- Attachment #2: use_select_for_power_class.patch --]
[-- Type: text/x-diff, Size: 1350 bytes --]

ACPI: use select POWER_SUPPLY for AC, BATTERY and SBS

From: Alexey Starikovskiy <astarikovskiy@suse.de>

POWER_SUPPLY is needed for AC, battery, and SBS sysfs support.
Use 'select' instead of 'depends on', as it is will not be selected
by anything else, leading to confusion.

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
---

 drivers/acpi/Kconfig |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 5d0e26a..ecd87d7 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -88,7 +88,8 @@ config ACPI_PROC_EVENT
 
 config ACPI_AC
 	tristate "AC Adapter"
-	depends on X86 && POWER_SUPPLY
+	depends on X86
+	select POWER_SUPPLY
 	default y
 	help
 	  This driver adds support for the AC Adapter object, which indicates
@@ -97,7 +98,8 @@ config ACPI_AC
 
 config ACPI_BATTERY
 	tristate "Battery"
-	depends on X86 && POWER_SUPPLY
+	depends on X86
+	select POWER_SUPPLY
 	default y
 	help
 	  This driver adds support for battery information through
@@ -352,7 +354,7 @@ config ACPI_HOTPLUG_MEMORY
 config ACPI_SBS
 	tristate "Smart Battery System"
 	depends on X86
-	depends on POWER_SUPPLY
+	select POWER_SUPPLY
 	help
 	  This driver adds support for the Smart Battery System, another
 	  type of access to battery information, found on some laptops.

  reply	other threads:[~2007-10-22 13:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <b6a2187b0710220045q2920c0dat9ebe4850b02d1bbf@mail.gmail.com>
2007-10-22 11:10 ` latest 2.6.23 git missing ACPI POWER_SUPPLY Frans Pop
2007-10-22 13:07   ` Alexey Starikovskiy [this message]
2007-10-22 14:33     ` Frans Pop
2007-10-22 23:11       ` Jeff Chua

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=471CA0AA.4000904@gmail.com \
    --to=aystarik@gmail.com \
    --cc=elendil@planet.nl \
    --cc=jeff.chua.linux@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox