#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of_address.h>
#include <linux/platform_device.h>
static void __iomem *base;
#define PVPANIC_PANICKED (1 << 0)
MODULE_AUTHOR("Hu Tao <hutao@cn.fujitsu.com>");
MODULE_DESCRIPTION("pvpanic device driver");
pvpanic_send_event(unsigned int event)
pvpanic_panic_notify(struct notifier_block *nb, unsigned long code,
pvpanic_send_event(PVPANIC_PANICKED);
static struct notifier_block pvpanic_panic_nb = {
.notifier_call = pvpanic_panic_notify,
static int pvpanic_add(struct acpi_device *device);
static int pvpanic_remove(struct acpi_device *device);
static const struct acpi_device_id pvpanic_device_ids[] = {
MODULE_DEVICE_TABLE(acpi, pvpanic_device_ids);
static struct acpi_driver pvpanic_driver = {
.ids = pvpanic_device_ids,
.remove = pvpanic_remove,