#include <linux/clk.h>
#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/mfd/core.h>
#include <linux/mfd/wcd934x/registers.h>
#include <linux/mfd/wcd934x/wcd934x.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/slimbus.h>
#define WCD934X_REGMAP_IRQ_REG(_irq, _off, _mask) …
static const struct mfd_cell wcd934x_devices[] = …;
static const struct regmap_irq wcd934x_irqs[] = …;
static const unsigned int wcd934x_config_regs[] = …;
static const struct regmap_irq_chip wcd934x_regmap_irq_chip = …;
static bool wcd934x_is_volatile_register(struct device *dev, unsigned int reg)
{
switch (reg) {
case WCD934X_INTR_PIN1_STATUS0...WCD934X_INTR_PIN2_CLEAR3:
case WCD934X_SWR_AHB_BRIDGE_RD_DATA_0:
case WCD934X_SWR_AHB_BRIDGE_RD_DATA_1:
case WCD934X_SWR_AHB_BRIDGE_RD_DATA_2:
case WCD934X_SWR_AHB_BRIDGE_RD_DATA_3:
case WCD934X_SWR_AHB_BRIDGE_ACCESS_STATUS:
case WCD934X_ANA_MBHC_RESULT_3:
case WCD934X_ANA_MBHC_RESULT_2:
case WCD934X_ANA_MBHC_RESULT_1:
case WCD934X_ANA_MBHC_MECH:
case WCD934X_ANA_MBHC_ELECT:
case WCD934X_ANA_MBHC_ZDET:
case WCD934X_ANA_MICB2:
case WCD934X_ANA_RCO:
case WCD934X_ANA_BIAS:
return true;
default:
return false;
}
};
static const struct regmap_range_cfg wcd934x_ranges[] = …;
static const struct regmap_config wcd934x_regmap_config = …;
static int wcd934x_bring_up(struct wcd934x_ddata *ddata)
{ … }
static int wcd934x_slim_status_up(struct slim_device *sdev)
{ … }
static int wcd934x_slim_status(struct slim_device *sdev,
enum slim_device_status status)
{ … }
static int wcd934x_slim_probe(struct slim_device *sdev)
{ … }
static void wcd934x_slim_remove(struct slim_device *sdev)
{ … }
static const struct slim_device_id wcd934x_slim_id[] = …;
static struct slim_driver wcd934x_slim_driver = …;
module_slim_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;
MODULE_AUTHOR(…) …;