linux/drivers/mfd/intel_soc_pmic_chtwc.c

// SPDX-License-Identifier: GPL-2.0
/*
 * MFD core driver for Intel Cherrytrail Whiskey Cove PMIC
 *
 * Copyright (C) 2017 Hans de Goede <[email protected]>
 *
 * Based on various non upstream patches to support the CHT Whiskey Cove PMIC:
 * Copyright (C) 2013-2015 Intel Corporation. All rights reserved.
 */

#include <linux/acpi.h>
#include <linux/delay.h>
#include <linux/dmi.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/mfd/core.h>
#include <linux/mfd/intel_soc_pmic.h>
#include <linux/regmap.h>

/* PMIC device registers */
#define REG_OFFSET_MASK
#define REG_ADDR_MASK
#define REG_ADDR_SHIFT

#define CHT_WC_IRQLVL1
#define CHT_WC_IRQLVL1_MASK

/* Whiskey Cove PMIC share same ACPI ID between different platforms */
#define CHT_WC_HRV

/* Level 1 IRQs (level 2 IRQs are handled in the child device drivers) */
enum {};

static const struct resource cht_wc_pwrsrc_resources[] =;

static const struct resource cht_wc_ext_charger_resources[] =;

static struct mfd_cell cht_wc_dev[] =;

/*
 * The CHT Whiskey Cove covers multiple I2C addresses, with a 1 Byte
 * register address space per I2C address, so we use 16 bit register
 * addresses where the high 8 bits contain the I2C client address.
 */
static int cht_wc_byte_reg_read(void *context, unsigned int reg,
				unsigned int *val)
{}

static int cht_wc_byte_reg_write(void *context, unsigned int reg,
				 unsigned int val)
{}

static const struct regmap_config cht_wc_regmap_cfg =;

static const struct regmap_irq cht_wc_regmap_irqs[] =;

static const struct regmap_irq_chip cht_wc_regmap_irq_chip =;

static const struct dmi_system_id cht_wc_model_dmi_ids[] =;

static int cht_wc_probe(struct i2c_client *client)
{}

static void cht_wc_shutdown(struct i2c_client *client)
{}

static int cht_wc_suspend(struct device *dev)
{}

static int cht_wc_resume(struct device *dev)
{}
static DEFINE_SIMPLE_DEV_PM_OPS(cht_wc_pm_ops, cht_wc_suspend, cht_wc_resume);

static const struct i2c_device_id cht_wc_i2c_id[] =;

static const struct acpi_device_id cht_wc_acpi_ids[] =;

static struct i2c_driver cht_wc_driver =;
builtin_i2c_driver();