linux/drivers/mfd/rsmu_spi.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * SPI driver for Renesas Synchronization Management Unit (SMU) devices.
 *
 * Copyright (C) 2021 Integrated Device Technology, Inc., a Renesas Company.
 */

#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)
{}

/*
 * 1-byte (1B) offset addressing:
 * 16-bit register address: the lower 7 bits of the register address come
 * from the offset addr byte and the upper 9 bits come from the page register.
 */
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();