Subject: [PATCH] [acpi thermal] Add skeleton of new-school thermal driver - Populate drivers/acpi/drivers/thermal/ - Fill in Makefile - Add make entry to core ACPI driver Makefile Signed-off-by: Patrick Mochel --- drivers/acpi/drivers/Makefile | 1 + drivers/acpi/drivers/thermal/Makefile | 6 ++++++ drivers/acpi/drivers/thermal/device.c | 15 +++++++++++++++ drivers/acpi/drivers/thermal/driver.c | 15 +++++++++++++++ drivers/acpi/drivers/thermal/event.c | 15 +++++++++++++++ drivers/acpi/drivers/thermal/proc.c | 15 +++++++++++++++ drivers/acpi/drivers/thermal/sysfs.c | 10 ++++++++++ drivers/acpi/drivers/thermal/thermal.h | 15 +++++++++++++++ 8 files changed, 92 insertions(+), 0 deletions(-) create mode 100644 drivers/acpi/drivers/thermal/Makefile create mode 100644 drivers/acpi/drivers/thermal/device.c create mode 100644 drivers/acpi/drivers/thermal/driver.c create mode 100644 drivers/acpi/drivers/thermal/event.c create mode 100644 drivers/acpi/drivers/thermal/proc.c create mode 100644 drivers/acpi/drivers/thermal/sysfs.c create mode 100644 drivers/acpi/drivers/thermal/thermal.h applies-to: c382c4c5117a07349e3433d90dc73bef1b72b4a2 a5593f0306798e3622a5ff8bbb741d836dacf7e0 diff --git a/drivers/acpi/drivers/Makefile b/drivers/acpi/drivers/Makefile index 08f4233..8dbd919 100644 --- a/drivers/acpi/drivers/Makefile +++ b/drivers/acpi/drivers/Makefile @@ -6,6 +6,7 @@ obj-$(CONFIG_ACPI_BATTERY) += battery/ obj-$(CONFIG_ACPI_BUTTON) += button/ obj-$(CONFIG_ACPI_FAN) += fan/ obj-$(CONFIG_ACPI_POWER) += power/ +obj-$(CONFIG_ACPI_THERMAL) += thermal/ obj-y += legacy/ diff --git a/drivers/acpi/drivers/thermal/Makefile b/drivers/acpi/drivers/thermal/Makefile new file mode 100644 index 0000000..c601270 --- /dev/null +++ b/drivers/acpi/drivers/thermal/Makefile @@ -0,0 +1,6 @@ +obj-$(CONFIG_ACPI_THERMAL) += thermal.o + +thermal-y := driver.o device.o event.o + +thermal-$(CONFIG_ACPI_DM_PROC) += proc.o +thermal-$(CONFIG_ACPI_DM_SYSFS) += sysfs.o diff --git a/drivers/acpi/drivers/thermal/device.c b/drivers/acpi/drivers/thermal/device.c new file mode 100644 index 0000000..80bbdd7 --- /dev/null +++ b/drivers/acpi/drivers/thermal/device.c @@ -0,0 +1,15 @@ +/*** + * drivers/acpi/drivers/thermal/device.c - Low-level thermal device access + * + * Copyright (C) 2006 Patrick Mochel + * + * Based on drivers/acpi/thermal.c, which was + * + * Copyright (C) 2001, 2002 Andy Grover + * Copyright (C) 2001, 2002 Paul Diefenbaugh + * + * This file is released under the GPLv2. + */ + +#include "thermal.h" + diff --git a/drivers/acpi/drivers/thermal/driver.c b/drivers/acpi/drivers/thermal/driver.c new file mode 100644 index 0000000..8b7faad --- /dev/null +++ b/drivers/acpi/drivers/thermal/driver.c @@ -0,0 +1,15 @@ +/*** + * drivers/acpi/drivers/thermal/driver.c - New-school ACPI thermal driver + * + * Copyright (C) 2006 Patrick Mochel + * + * Based on drivers/acpi/thermal.c, which was + * + * Copyright (C) 2001, 2002 Andy Grover + * Copyright (C) 2001, 2002 Paul Diefenbaugh + * + * This file is released under the GPLv2. + */ + +#include "thermal.h" + diff --git a/drivers/acpi/drivers/thermal/event.c b/drivers/acpi/drivers/thermal/event.c new file mode 100644 index 0000000..30c9413 --- /dev/null +++ b/drivers/acpi/drivers/thermal/event.c @@ -0,0 +1,15 @@ +/*** + * drivers/acpi/drivers/thermal/event.c - Event interface for thermal devices + * + * Copyright (C) 2006 Patrick Mochel + * + * Based on drivers/acpi/thermal.c, which was + * + * Copyright (C) 2001, 2002 Andy Grover + * Copyright (C) 2001, 2002 Paul Diefenbaugh + * + * This file is released under the GPLv2. + */ + +#include "thermal.h" + diff --git a/drivers/acpi/drivers/thermal/proc.c b/drivers/acpi/drivers/thermal/proc.c new file mode 100644 index 0000000..7618282 --- /dev/null +++ b/drivers/acpi/drivers/thermal/proc.c @@ -0,0 +1,15 @@ +/*** + * drivers/acpi/drivers/thermal/proc.c - proc FS interface for thermal devices + * + * Copyright (C) 2006 Patrick Mochel + * + * Based on drivers/acpi/thermal.c, which was + * + * Copyright (C) 2001, 2002 Andy Grover + * Copyright (C) 2001, 2002 Paul Diefenbaugh + * + * This file is released under the GPLv2. + */ + +#include "thermal.h" + diff --git a/drivers/acpi/drivers/thermal/sysfs.c b/drivers/acpi/drivers/thermal/sysfs.c new file mode 100644 index 0000000..03802fd --- /dev/null +++ b/drivers/acpi/drivers/thermal/sysfs.c @@ -0,0 +1,10 @@ +/** + * drivers/acpi/drivers/thermal/sysfs.c - sysfs interface for thermal driver. + * + * Copyright (C) 2006 Patrick Mochel + * + * This file is released under the GPLv2. + */ + +#include "thermal.h" + diff --git a/drivers/acpi/drivers/thermal/thermal.h b/drivers/acpi/drivers/thermal/thermal.h new file mode 100644 index 0000000..269a8fb --- /dev/null +++ b/drivers/acpi/drivers/thermal/thermal.h @@ -0,0 +1,15 @@ + +#include + +#ifdef DEBUG +#define dbg(fmt, ...) printk(KERN_DEBUG PREFIX "thermal: " fmt "\n", ## __VA_ARGS__) +#else +#define dbg(fmt, ...) +#endif + +#define _COMPONENT ACPI_THERMAL_COMPONENT +ACPI_MODULE_NAME("acpi_thermal"); + + +#define ACPI_THERMAL_HID "ACPI_THM" + --- 0.99.9.GIT