#include <linux/debugfs.h>
#include <linux/mfd/intel_soc_pmic.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#define CRYSTALCOVE_SPWRSRC_REG …
#define CRYSTALCOVE_RESETSRC0_REG …
#define CRYSTALCOVE_RESETSRC1_REG …
#define CRYSTALCOVE_WAKESRC_REG …
struct crc_pwrsrc_data { … };
static const char * const pwrsrc_pwrsrc_info[] = …;
static const char * const pwrsrc_resetsrc0_info[] = …;
static const char * const pwrsrc_resetsrc1_info[] = …;
static const char * const pwrsrc_wakesrc_info[] = …;
static void crc_pwrsrc_log(struct seq_file *seq, const char *prefix,
const char * const *info, unsigned int reg_val)
{ … }
static int pwrsrc_show(struct seq_file *seq, void *unused)
{ … }
static int resetsrc_show(struct seq_file *seq, void *unused)
{ … }
static int wakesrc_show(struct seq_file *seq, void *unused)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
DEFINE_SHOW_ATTRIBUTE(…);
DEFINE_SHOW_ATTRIBUTE(…);
static int crc_pwrsrc_read_and_clear(struct crc_pwrsrc_data *data,
unsigned int reg, unsigned int *val)
{ … }
static int crc_pwrsrc_probe(struct platform_device *pdev)
{ … }
static void crc_pwrsrc_remove(struct platform_device *pdev)
{ … }
static struct platform_driver crc_pwrsrc_driver = …;
module_platform_driver(…) …;
MODULE_ALIAS(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;