linux/drivers/mfd/rohm-bd71828.c

// SPDX-License-Identifier: GPL-2.0-only
//
// Copyright (C) 2019 ROHM Semiconductors
//
// ROHM BD71828/BD71815 PMIC driver

#include <linux/gpio_keys.h>
#include <linux/i2c.h>
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/irq.h>
#include <linux/mfd/core.h>
#include <linux/mfd/rohm-bd71815.h>
#include <linux/mfd/rohm-bd71828.h>
#include <linux/mfd/rohm-generic.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/regmap.h>
#include <linux/types.h>

static struct gpio_keys_button button =;

static struct gpio_keys_platform_data bd71828_powerkey_data =;

static const struct resource bd71815_rtc_irqs[] =;

static const struct resource bd71828_rtc_irqs[] =;

static struct resource bd71815_power_irqs[] =;

static struct mfd_cell bd71815_mfd_cells[] =;

static struct mfd_cell bd71828_mfd_cells[] =;

static const struct regmap_range bd71815_volatile_ranges[] =;

static const struct regmap_range bd71828_volatile_ranges[] =;

static const struct regmap_access_table bd71815_volatile_regs =;

static const struct regmap_access_table bd71828_volatile_regs =;

static const struct regmap_config bd71815_regmap =;

static const struct regmap_config bd71828_regmap =;

/*
 * Mapping of main IRQ register bits to sub-IRQ register offsets so that we can
 * access corect sub-IRQ registers based on bits that are set in main IRQ
 * register. BD71815 and BD71828 have same sub-register-block offests.
 */

static unsigned int bit0_offsets[] =;		/* RTC IRQ */
static unsigned int bit1_offsets[] =;		/* TEMP IRQ */
static unsigned int bit2_offsets[] =;	/* BAT MON IRQ */
static unsigned int bit3_offsets[] =;		/* BAT IRQ */
static unsigned int bit4_offsets[] =;		/* CHG IRQ */
static unsigned int bit5_offsets[] =;		/* VSYS IRQ */
static unsigned int bit6_offsets[] =;		/* DCIN IRQ */
static unsigned int bit7_offsets[] =;		/* BUCK IRQ */

static struct regmap_irq_sub_irq_map bd718xx_sub_irq_offsets[] =;

static const struct regmap_irq bd71815_irqs[] =;

static struct regmap_irq bd71828_irqs[] =;

static struct regmap_irq_chip bd71828_irq_chip =;

static struct regmap_irq_chip bd71815_irq_chip =;

static int set_clk_mode(struct device *dev, struct regmap *regmap,
			int clkmode_reg)
{}

static struct i2c_client *bd71828_dev;
static void bd71828_power_off(void)
{}

static void bd71828_remove_poweroff(void *data)
{}

static int bd71828_i2c_probe(struct i2c_client *i2c)
{}

static const struct of_device_id bd71828_of_match[] =;
MODULE_DEVICE_TABLE(of, bd71828_of_match);

static struct i2c_driver bd71828_drv =;
module_i2c_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();