mirror of https://gitee.com/openkylin/linux.git
ACPI / battery: move some ACPI_BATTERY_* definitions to header
ACPI_BATTERY_CLASS is used in multiple places. Also, I'll use ACPI_BATTERY_NOTIFY_STATUS inside AC driver in one of following patches. So, create a header file and move ACPI_BATTERY_CLASS and ACPI_BATTERY_NOTIFY_* definitions into it. Also, remove copy of ACPI_BATTERY_CLASS from sbs.c Signed-off-by: Alexander Mezin <mezin.alexander@gmail.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
dcb99fd9b0
commit
f03be3525f
|
@ -39,15 +39,13 @@
|
||||||
#include <linux/acpi.h>
|
#include <linux/acpi.h>
|
||||||
#include <linux/power_supply.h>
|
#include <linux/power_supply.h>
|
||||||
|
|
||||||
|
#include "battery.h"
|
||||||
|
|
||||||
#define PREFIX "ACPI: "
|
#define PREFIX "ACPI: "
|
||||||
|
|
||||||
#define ACPI_BATTERY_VALUE_UNKNOWN 0xFFFFFFFF
|
#define ACPI_BATTERY_VALUE_UNKNOWN 0xFFFFFFFF
|
||||||
|
|
||||||
#define ACPI_BATTERY_CLASS "battery"
|
|
||||||
#define ACPI_BATTERY_DEVICE_NAME "Battery"
|
#define ACPI_BATTERY_DEVICE_NAME "Battery"
|
||||||
#define ACPI_BATTERY_NOTIFY_STATUS 0x80
|
|
||||||
#define ACPI_BATTERY_NOTIFY_INFO 0x81
|
|
||||||
#define ACPI_BATTERY_NOTIFY_THRESHOLD 0x82
|
|
||||||
|
|
||||||
/* Battery power unit: 0 means mW, 1 means mA */
|
/* Battery power unit: 0 means mW, 1 means mA */
|
||||||
#define ACPI_BATTERY_POWER_UNIT_MA 1
|
#define ACPI_BATTERY_POWER_UNIT_MA 1
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
#ifndef __ACPI_BATTERY_H
|
||||||
|
#define __ACPI_BATTERY_H
|
||||||
|
|
||||||
|
#define ACPI_BATTERY_CLASS "battery"
|
||||||
|
|
||||||
|
#define ACPI_BATTERY_NOTIFY_STATUS 0x80
|
||||||
|
#define ACPI_BATTERY_NOTIFY_INFO 0x81
|
||||||
|
#define ACPI_BATTERY_NOTIFY_THRESHOLD 0x82
|
||||||
|
|
||||||
|
#endif
|
|
@ -37,12 +37,12 @@
|
||||||
#include <linux/power_supply.h>
|
#include <linux/power_supply.h>
|
||||||
|
|
||||||
#include "sbshc.h"
|
#include "sbshc.h"
|
||||||
|
#include "battery.h"
|
||||||
|
|
||||||
#define PREFIX "ACPI: "
|
#define PREFIX "ACPI: "
|
||||||
|
|
||||||
#define ACPI_SBS_CLASS "sbs"
|
#define ACPI_SBS_CLASS "sbs"
|
||||||
#define ACPI_AC_CLASS "ac_adapter"
|
#define ACPI_AC_CLASS "ac_adapter"
|
||||||
#define ACPI_BATTERY_CLASS "battery"
|
|
||||||
#define ACPI_SBS_DEVICE_NAME "Smart Battery System"
|
#define ACPI_SBS_DEVICE_NAME "Smart Battery System"
|
||||||
#define ACPI_SBS_FILE_INFO "info"
|
#define ACPI_SBS_FILE_INFO "info"
|
||||||
#define ACPI_SBS_FILE_STATE "state"
|
#define ACPI_SBS_FILE_STATE "state"
|
||||||
|
|
Loading…
Reference in New Issue