#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/mfd/core.h>
#include <linux/mfd/rsmu.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/spi/spi.h>
#include "rsmu.h"
#define RSMU_CM_PAGE_ADDR …
#define RSMU_SABRE_PAGE_ADDR …
#define RSMU_PAGE_MASK …
#define RSMU_ADDR_MASK …
static int rsmu_read_device(struct rsmu_ddata *rsmu, u8 reg, u8 *buf, u16 bytes)
{ … }
static int rsmu_write_device(struct rsmu_ddata *rsmu, u8 reg, u8 *buf, u16 bytes)
{ … }
static int rsmu_write_page_register(struct rsmu_ddata *rsmu, u32 reg)
{ … }
static int rsmu_reg_read(void *context, unsigned int reg, unsigned int *val)
{ … }
static int rsmu_reg_write(void *context, unsigned int reg, unsigned int val)
{ … }
static const struct regmap_config rsmu_cm_regmap_config = …;
static const struct regmap_config rsmu_sabre_regmap_config = …;
static int rsmu_spi_probe(struct spi_device *client)
{ … }
static void rsmu_spi_remove(struct spi_device *client)
{ … }
static const struct spi_device_id rsmu_spi_id[] = …;
MODULE_DEVICE_TABLE(spi, rsmu_spi_id);
static const struct of_device_id rsmu_spi_of_match[] = …;
MODULE_DEVICE_TABLE(of, rsmu_spi_of_match);
static struct spi_driver rsmu_spi_driver = …;
static int __init rsmu_spi_init(void)
{ … }
subsys_initcall(rsmu_spi_init);
static void __exit rsmu_spi_exit(void)
{ … }
module_exit(rsmu_spi_exit);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;