#include <linux/acpi.h>
#include <linux/bits.h>
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/mfd/core.h>
#include <linux/mfd/intel_soc_pmic.h>
#include <linux/mfd/intel_soc_pmic_bxtwc.h>
#include <linux/module.h>
#include <linux/platform_data/x86/intel_scu_ipc.h>
#define REG_ADDR_MASK …
#define REG_ADDR_SHIFT …
#define REG_OFFSET_MASK …
#define BXTWC_IRQLVL1 …
#define BXTWC_PWRBTNIRQ …
#define BXTWC_THRM0IRQ …
#define BXTWC_THRM1IRQ …
#define BXTWC_THRM2IRQ …
#define BXTWC_BCUIRQ …
#define BXTWC_ADCIRQ …
#define BXTWC_CHGR0IRQ …
#define BXTWC_CHGR1IRQ …
#define BXTWC_GPIOIRQ0 …
#define BXTWC_GPIOIRQ1 …
#define BXTWC_CRITIRQ …
#define BXTWC_TMUIRQ …
#define BXTWC_MIRQLVL1 …
#define BXTWC_MIRQLVL1_MCHGR …
#define BXTWC_MPWRBTNIRQ …
#define BXTWC_MTHRM0IRQ …
#define BXTWC_MTHRM1IRQ …
#define BXTWC_MTHRM2IRQ …
#define BXTWC_MBCUIRQ …
#define BXTWC_MADCIRQ …
#define BXTWC_MCHGR0IRQ …
#define BXTWC_MCHGR1IRQ …
#define BXTWC_MGPIO0IRQ …
#define BXTWC_MGPIO1IRQ …
#define BXTWC_MCRITIRQ …
#define BXTWC_MTMUIRQ …
#define BROXTON_PMIC_WC_HRV …
#define PMC_PMIC_ACCESS …
#define PMC_PMIC_READ …
#define PMC_PMIC_WRITE …
enum bxtwc_irqs { … };
enum bxtwc_irqs_pwrbtn { … };
enum bxtwc_irqs_bcu { … };
enum bxtwc_irqs_adc { … };
enum bxtwc_irqs_chgr { … };
enum bxtwc_irqs_tmu { … };
enum bxtwc_irqs_crit { … };
static const struct regmap_irq bxtwc_regmap_irqs[] = …;
static const struct regmap_irq bxtwc_regmap_irqs_pwrbtn[] = …;
static const struct regmap_irq bxtwc_regmap_irqs_bcu[] = …;
static const struct regmap_irq bxtwc_regmap_irqs_adc[] = …;
static const struct regmap_irq bxtwc_regmap_irqs_chgr[] = …;
static const struct regmap_irq bxtwc_regmap_irqs_tmu[] = …;
static const struct regmap_irq bxtwc_regmap_irqs_crit[] = …;
static const struct regmap_irq_chip bxtwc_regmap_irq_chip = …;
static const struct regmap_irq_chip bxtwc_regmap_irq_chip_pwrbtn = …;
static const struct regmap_irq_chip bxtwc_regmap_irq_chip_tmu = …;
static const struct regmap_irq_chip bxtwc_regmap_irq_chip_bcu = …;
static const struct regmap_irq_chip bxtwc_regmap_irq_chip_adc = …;
static const struct regmap_irq_chip bxtwc_regmap_irq_chip_chgr = …;
static const struct regmap_irq_chip bxtwc_regmap_irq_chip_crit = …;
static const struct resource gpio_resources[] = …;
static const struct resource adc_resources[] = …;
static const struct resource usbc_resources[] = …;
static const struct resource charger_resources[] = …;
static const struct resource thermal_resources[] = …;
static const struct resource bcu_resources[] = …;
static const struct resource tmu_resources[] = …;
static struct mfd_cell bxt_wc_dev[] = …;
static int regmap_ipc_byte_reg_read(void *context, unsigned int reg,
unsigned int *val)
{ … }
static int regmap_ipc_byte_reg_write(void *context, unsigned int reg,
unsigned int val)
{ … }
static unsigned long bxtwc_reg_addr;
static ssize_t addr_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t addr_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{ … }
static ssize_t val_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t val_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{ … }
static DEVICE_ATTR_ADMIN_RW(addr);
static DEVICE_ATTR_ADMIN_RW(val);
static struct attribute *bxtwc_attrs[] = …;
static const struct attribute_group bxtwc_group = …;
static const struct attribute_group *bxtwc_groups[] = …;
static const struct regmap_config bxtwc_regmap_config = …;
static int bxtwc_add_chained_irq_chip(struct intel_soc_pmic *pmic,
struct regmap_irq_chip_data *pdata,
int pirq, int irq_flags,
const struct regmap_irq_chip *chip,
struct regmap_irq_chip_data **data)
{ … }
static int bxtwc_probe(struct platform_device *pdev)
{ … }
static void bxtwc_shutdown(struct platform_device *pdev)
{ … }
static int bxtwc_suspend(struct device *dev)
{ … }
static int bxtwc_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(bxtwc_pm_ops, bxtwc_suspend, bxtwc_resume);
static const struct acpi_device_id bxtwc_acpi_ids[] = …;
MODULE_DEVICE_TABLE(acpi, bxtwc_acpi_ids);
static struct platform_driver bxtwc_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;