2002-09-12 08:05:52

by Soós Péter

[permalink] [raw]
Subject: APM & ACPI detect

Hi,

Are there any "official way" to detect that APM or ACPI is active?

With APM I try it and it works:

#ifdef CONFIG_APM
#include <linux/apm_bios.h>
#endif

...

#ifdef CONFIG_APM
if (apm_info.disabled >= 0) {
printk(KERN_NOTICE "Real APM support is present.\n");
}
#endif

Are there any similar for ACPI?

Thanks,
Peter


2002-09-12 15:11:32

by Andrew Grover

[permalink] [raw]
Subject: RE: APM & ACPI detect

> From: Soos Peter [mailto:[email protected]]
> Are there any "official way" to detect that APM or ACPI is active?
>
> With APM I try it and it works:
>
> #ifdef CONFIG_APM
> #include <linux/apm_bios.h>
> #endif
>
> ...
>
> #ifdef CONFIG_APM
> if (apm_info.disabled >= 0) {
> printk(KERN_NOTICE "Real APM support is present.\n");
> }
> #endif
>
> Are there any similar for ACPI?

Well there's pm_active, which is 1 if either is on. Is this really what you
want?

Regards -- Andy

2002-09-13 11:55:23

by Soós Péter

[permalink] [raw]
Subject: RE: APM & ACPI detect

On Thu, 12 Sep 2002, Grover, Andrew wrote:

> > Are there any "official way" to detect that APM or ACPI is active?
>
> Well there's pm_active, which is 1 if either is on. Is this really what you
> want?

No, I have to know what stuff is active: APM or ACPI.

Thanks,
Peter



2002-09-13 17:21:56

by Andrew Grover

[permalink] [raw]
Subject: RE: APM & ACPI detect

> From: Soos Peter [mailto:[email protected]]
> On Thu, 12 Sep 2002, Grover, Andrew wrote:
>
> > > Are there any "official way" to detect that APM or ACPI is active?
> >
> > Well there's pm_active, which is 1 if either is on. Is this
> really what you
> > want?
>
> No, I have to know what stuff is active: APM or ACPI.

OK, I guess we'll add that.

-- Andy