#include <linux/spi/spi.h>
#include <linux/packing.h>
#include "sja1105.h"
struct sja1105_chunk { … };
static void
sja1105_spi_message_pack(void *buf, const struct sja1105_spi_message *msg)
{ … }
static int sja1105_xfer(const struct sja1105_private *priv,
sja1105_spi_rw_mode_t rw, u64 reg_addr, u8 *buf,
size_t len, struct ptp_system_timestamp *ptp_sts)
{ … }
int sja1105_xfer_buf(const struct sja1105_private *priv,
sja1105_spi_rw_mode_t rw, u64 reg_addr,
u8 *buf, size_t len)
{ … }
int sja1105_xfer_u64(const struct sja1105_private *priv,
sja1105_spi_rw_mode_t rw, u64 reg_addr, u64 *value,
struct ptp_system_timestamp *ptp_sts)
{ … }
int sja1105_xfer_u32(const struct sja1105_private *priv,
sja1105_spi_rw_mode_t rw, u64 reg_addr, u32 *value,
struct ptp_system_timestamp *ptp_sts)
{ … }
static int sja1105et_reset_cmd(struct dsa_switch *ds)
{ … }
static int sja1105pqrs_reset_cmd(struct dsa_switch *ds)
{ … }
static int sja1110_reset_cmd(struct dsa_switch *ds)
{ … }
int sja1105_inhibit_tx(const struct sja1105_private *priv,
unsigned long port_bitmap, bool tx_inhibited)
{ … }
struct sja1105_status { … };
static void sja1105_status_unpack(void *buf, struct sja1105_status *status)
{ … }
static int sja1105_status_get(struct sja1105_private *priv,
struct sja1105_status *status)
{ … }
int static_config_buf_prepare_for_upload(struct sja1105_private *priv,
void *config_buf, int buf_len)
{ … }
#define RETRIES …
int sja1105_static_config_upload(struct sja1105_private *priv)
{ … }
static const struct sja1105_regs sja1105et_regs = …;
static const struct sja1105_regs sja1105pqrs_regs = …;
static const struct sja1105_regs sja1110_regs = …;
const struct sja1105_info sja1105e_info = …;
const struct sja1105_info sja1105t_info = …;
const struct sja1105_info sja1105p_info = …;
const struct sja1105_info sja1105q_info = …;
const struct sja1105_info sja1105r_info = …;
const struct sja1105_info sja1105s_info = …;
const struct sja1105_info sja1110a_info = …;
const struct sja1105_info sja1110b_info = …;
const struct sja1105_info sja1110c_info = …;
const struct sja1105_info sja1110d_info = …;