#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/platform_device.h>
#include <linux/input-polldev.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/hwmon-sysfs.h>
#include <linux/workqueue.h>
#define APPLESMC_DATA_PORT 0x300
#define APPLESMC_CMD_PORT 0x304
#define APPLESMC_NR_PORTS 32
#define APPLESMC_MAX_DATA_LENGTH 32
#define APPLESMC_MIN_WAIT 0x0010
#define APPLESMC_RETRY_WAIT 0x0100
#define APPLESMC_MAX_WAIT 0x20000
#define APPLESMC_READ_CMD 0x10
#define APPLESMC_WRITE_CMD 0x11
#define APPLESMC_GET_KEY_BY_INDEX_CMD 0x12
#define APPLESMC_GET_KEY_TYPE_CMD 0x13
#define KEY_COUNT_KEY "#KEY"
#define LIGHT_SENSOR_LEFT_KEY "ALV0"
#define LIGHT_SENSOR_RIGHT_KEY "ALV1"
#define BACKLIGHT_KEY "LKSB"
#define CLAMSHELL_KEY "MSLD"
#define MOTION_SENSOR_X_KEY "MO_X"