#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/regmap.h>
#include <linux/spi/spi.h>
#include "encx24j600_hw.h"
static int encx24j600_switch_bank(struct encx24j600_context *ctx,
int bank)
{ … }
static int encx24j600_cmdn(struct encx24j600_context *ctx, u8 opcode,
const void *buf, size_t len)
{ … }
static void regmap_lock_mutex(void *context)
{ … }
static void regmap_unlock_mutex(void *context)
{ … }
static int regmap_encx24j600_sfr_read(void *context, u8 reg, u8 *val,
size_t len)
{ … }
static int regmap_encx24j600_sfr_update(struct encx24j600_context *ctx,
u8 reg, u8 *val, size_t len,
u8 unbanked_cmd, u8 banked_code)
{ … }
static int regmap_encx24j600_sfr_write(void *context, u8 reg, u8 *val,
size_t len)
{ … }
static int regmap_encx24j600_sfr_set_bits(struct encx24j600_context *ctx,
u8 reg, u8 val)
{ … }
static int regmap_encx24j600_sfr_clr_bits(struct encx24j600_context *ctx,
u8 reg, u8 val)
{ … }
static int regmap_encx24j600_reg_update_bits(void *context, unsigned int reg,
unsigned int mask,
unsigned int val)
{ … }
int regmap_encx24j600_spi_write(void *context, u8 reg, const u8 *data,
size_t count)
{ … }
EXPORT_SYMBOL_GPL(…);
int regmap_encx24j600_spi_read(void *context, u8 reg, u8 *data, size_t count)
{ … }
EXPORT_SYMBOL_GPL(…);
static int regmap_encx24j600_write(void *context, const void *data,
size_t len)
{ … }
static int regmap_encx24j600_read(void *context,
const void *reg_buf, size_t reg_size,
void *val, size_t val_size)
{ … }
static bool encx24j600_regmap_readable(struct device *dev, unsigned int reg)
{ … }
static bool encx24j600_regmap_writeable(struct device *dev, unsigned int reg)
{ … }
static bool encx24j600_regmap_volatile(struct device *dev, unsigned int reg)
{ … }
static bool encx24j600_regmap_precious(struct device *dev, unsigned int reg)
{ … }
static int regmap_encx24j600_phy_reg_read(void *context, unsigned int reg,
unsigned int *val)
{ … }
static int regmap_encx24j600_phy_reg_write(void *context, unsigned int reg,
unsigned int val)
{ … }
static bool encx24j600_phymap_readable(struct device *dev, unsigned int reg)
{ … }
static bool encx24j600_phymap_writeable(struct device *dev, unsigned int reg)
{ … }
static bool encx24j600_phymap_volatile(struct device *dev, unsigned int reg)
{ … }
static struct regmap_config regcfg = …;
static const struct regmap_bus regmap_encx24j600 = …;
static const struct regmap_config phycfg = …;
static const struct regmap_bus phymap_encx24j600 = …;
int devm_regmap_init_encx24j600(struct device *dev,
struct encx24j600_context *ctx)
{ … }
EXPORT_SYMBOL_GPL(…);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;