#include <linux/delay.h>
#include <linux/pm_runtime.h>
#include <linux/sched/signal.h>
#include "sb_regs.h"
#include "tb.h"
#if IS_ENABLED(CONFIG_USB4_DEBUGFS_MARGINING)
#define TB_MAX_RETIMER_INDEX …
#else
#define TB_MAX_RETIMER_INDEX …
#endif
int tb_retimer_nvm_read(struct tb_retimer *rt, unsigned int address, void *buf,
size_t size)
{ … }
static int nvm_read(void *priv, unsigned int offset, void *val, size_t bytes)
{ … }
static int nvm_write(void *priv, unsigned int offset, void *val, size_t bytes)
{ … }
static int tb_retimer_nvm_add(struct tb_retimer *rt)
{ … }
static int tb_retimer_nvm_validate_and_write(struct tb_retimer *rt)
{ … }
static int tb_retimer_nvm_authenticate(struct tb_retimer *rt, bool auth_only)
{ … }
static ssize_t device_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(device);
static ssize_t nvm_authenticate_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static void tb_retimer_nvm_authenticate_status(struct tb_port *port, u32 *status)
{ … }
static void tb_retimer_set_inbound_sbtx(struct tb_port *port)
{ … }
static void tb_retimer_unset_inbound_sbtx(struct tb_port *port)
{ … }
static ssize_t nvm_authenticate_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{ … }
static DEVICE_ATTR_RW(nvm_authenticate);
static ssize_t nvm_version_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(nvm_version);
static ssize_t vendor_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(vendor);
static struct attribute *retimer_attrs[] = …;
static const struct attribute_group retimer_group = …;
static const struct attribute_group *retimer_groups[] = …;
static void tb_retimer_release(struct device *dev)
{ … }
const struct device_type tb_retimer_type = …;
static int tb_retimer_add(struct tb_port *port, u8 index, u32 auth_status,
bool on_board)
{ … }
static void tb_retimer_remove(struct tb_retimer *rt)
{ … }
struct tb_retimer_lookup { … };
static int retimer_match(struct device *dev, void *data)
{ … }
static struct tb_retimer *tb_port_find_retimer(struct tb_port *port, u8 index)
{ … }
int tb_retimer_scan(struct tb_port *port, bool add)
{ … }
static int remove_retimer(struct device *dev, void *data)
{ … }
void tb_retimer_remove_all(struct tb_port *port)
{ … }