#include <linux/delay.h>
#include <linux/greybus.h>
#include "greybus_trace.h"
#define GB_INTERFACE_MODE_SWITCH_TIMEOUT …
#define GB_INTERFACE_DEVICE_ID_BAD …
#define GB_INTERFACE_AUTOSUSPEND_MS …
#define GB_INTERFACE_SUSPEND_HIBERNATE_DELAY_MS …
#define DME_SELECTOR_INDEX_NULL …
#define DME_T_TST_SRC_INCREMENT …
#define DME_DDBL1_MANUFACTURERID …
#define DME_DDBL1_PRODUCTID …
#define DME_TOSHIBA_GMP_VID …
#define DME_TOSHIBA_GMP_PID …
#define DME_TOSHIBA_GMP_SN0 …
#define DME_TOSHIBA_GMP_SN1 …
#define DME_TOSHIBA_GMP_INIT_STATUS …
#define TOSHIBA_DMID …
#define TOSHIBA_ES2_BRIDGE_DPID …
#define TOSHIBA_ES3_APBRIDGE_DPID …
#define TOSHIBA_ES3_GBPHY_DPID …
static int gb_interface_hibernate_link(struct gb_interface *intf);
static int gb_interface_refclk_set(struct gb_interface *intf, bool enable);
static int gb_interface_dme_attr_get(struct gb_interface *intf,
u16 attr, u32 *val)
{ … }
static int gb_interface_read_ara_dme(struct gb_interface *intf)
{ … }
static int gb_interface_read_dme(struct gb_interface *intf)
{ … }
static int gb_interface_route_create(struct gb_interface *intf)
{ … }
static void gb_interface_route_destroy(struct gb_interface *intf)
{ … }
static int gb_interface_legacy_mode_switch(struct gb_interface *intf)
{ … }
void gb_interface_mailbox_event(struct gb_interface *intf, u16 result,
u32 mailbox)
{ … }
static void gb_interface_mode_switch_work(struct work_struct *work)
{ … }
int gb_interface_request_mode_switch(struct gb_interface *intf)
{ … }
EXPORT_SYMBOL_GPL(…);
static int gb_interface_read_and_clear_init_status(struct gb_interface *intf)
{ … }
#define gb_interface_attr(field, type) …
gb_interface_attr(…);
gb_interface_attr(…);
gb_interface_attr(…);
gb_interface_attr(…);
gb_interface_attr(…);
gb_interface_attr(…);
static ssize_t voltage_now_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(voltage_now);
static ssize_t current_now_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(current_now);
static ssize_t power_now_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(power_now);
static ssize_t power_state_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t power_state_store(struct device *dev,
struct device_attribute *attr, const char *buf,
size_t len)
{ … }
static DEVICE_ATTR_RW(power_state);
static const char *gb_interface_type_string(struct gb_interface *intf)
{ … }
static ssize_t interface_type_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(interface_type);
static struct attribute *interface_unipro_attrs[] = …;
static struct attribute *interface_greybus_attrs[] = …;
static struct attribute *interface_power_attrs[] = …;
static struct attribute *interface_common_attrs[] = …;
static umode_t interface_unipro_is_visible(struct kobject *kobj,
struct attribute *attr, int n)
{ … }
static umode_t interface_greybus_is_visible(struct kobject *kobj,
struct attribute *attr, int n)
{ … }
static umode_t interface_power_is_visible(struct kobject *kobj,
struct attribute *attr, int n)
{ … }
static const struct attribute_group interface_unipro_group = …;
static const struct attribute_group interface_greybus_group = …;
static const struct attribute_group interface_power_group = …;
static const struct attribute_group interface_common_group = …;
static const struct attribute_group *interface_groups[] = …;
static void gb_interface_release(struct device *dev)
{ … }
#ifdef CONFIG_PM
static int gb_interface_suspend(struct device *dev)
{ … }
static int gb_interface_resume(struct device *dev)
{ … }
static int gb_interface_runtime_idle(struct device *dev)
{ … }
#endif
static const struct dev_pm_ops gb_interface_pm_ops = …;
const struct device_type greybus_interface_type = …;
struct gb_interface *gb_interface_create(struct gb_module *module,
u8 interface_id)
{ … }
static int gb_interface_vsys_set(struct gb_interface *intf, bool enable)
{ … }
static int gb_interface_refclk_set(struct gb_interface *intf, bool enable)
{ … }
static int gb_interface_unipro_set(struct gb_interface *intf, bool enable)
{ … }
static int gb_interface_activate_operation(struct gb_interface *intf,
enum gb_interface_type *intf_type)
{ … }
static int gb_interface_hibernate_link(struct gb_interface *intf)
{ … }
static int _gb_interface_activate(struct gb_interface *intf,
enum gb_interface_type *type)
{ … }
static int _gb_interface_activate_es3_hack(struct gb_interface *intf,
enum gb_interface_type *type)
{ … }
int gb_interface_activate(struct gb_interface *intf)
{ … }
void gb_interface_deactivate(struct gb_interface *intf)
{ … }
int gb_interface_enable(struct gb_interface *intf)
{ … }
void gb_interface_disable(struct gb_interface *intf)
{ … }
int gb_interface_add(struct gb_interface *intf)
{ … }
void gb_interface_del(struct gb_interface *intf)
{ … }
void gb_interface_put(struct gb_interface *intf)
{ … }