#include <linux/workqueue.h>
#include <linux/greybus.h>
#include "greybus_trace.h"
#define GB_CONNECTION_CPORT_QUIESCE_TIMEOUT …
static void gb_connection_kref_release(struct kref *kref);
static DEFINE_SPINLOCK(gb_connections_lock);
static DEFINE_MUTEX(gb_connection_mutex);
static bool gb_connection_cport_in_use(struct gb_interface *intf, u16 cport_id)
{ … }
static void gb_connection_get(struct gb_connection *connection)
{ … }
static void gb_connection_put(struct gb_connection *connection)
{ … }
static struct gb_connection *
gb_connection_hd_find(struct gb_host_device *hd, u16 cport_id)
{ … }
void greybus_data_rcvd(struct gb_host_device *hd, u16 cport_id,
u8 *data, size_t length)
{ … }
EXPORT_SYMBOL_GPL(…);
static void gb_connection_kref_release(struct kref *kref)
{ … }
static void gb_connection_init_name(struct gb_connection *connection)
{ … }
static struct gb_connection *
_gb_connection_create(struct gb_host_device *hd, int hd_cport_id,
struct gb_interface *intf,
struct gb_bundle *bundle, int cport_id,
gb_request_handler_t handler,
unsigned long flags)
{ … }
struct gb_connection *
gb_connection_create_static(struct gb_host_device *hd, u16 hd_cport_id,
gb_request_handler_t handler)
{ … }
struct gb_connection *
gb_connection_create_control(struct gb_interface *intf)
{ … }
struct gb_connection *
gb_connection_create(struct gb_bundle *bundle, u16 cport_id,
gb_request_handler_t handler)
{ … }
EXPORT_SYMBOL_GPL(…);
struct gb_connection *
gb_connection_create_flags(struct gb_bundle *bundle, u16 cport_id,
gb_request_handler_t handler,
unsigned long flags)
{ … }
EXPORT_SYMBOL_GPL(…);
struct gb_connection *
gb_connection_create_offloaded(struct gb_bundle *bundle, u16 cport_id,
unsigned long flags)
{ … }
EXPORT_SYMBOL_GPL(…);
static int gb_connection_hd_cport_enable(struct gb_connection *connection)
{ … }
static void gb_connection_hd_cport_disable(struct gb_connection *connection)
{ … }
static int gb_connection_hd_cport_connected(struct gb_connection *connection)
{ … }
static int gb_connection_hd_cport_flush(struct gb_connection *connection)
{ … }
static int gb_connection_hd_cport_quiesce(struct gb_connection *connection)
{ … }
static int gb_connection_hd_cport_clear(struct gb_connection *connection)
{ … }
static int
gb_connection_svc_connection_create(struct gb_connection *connection)
{ … }
static void
gb_connection_svc_connection_destroy(struct gb_connection *connection)
{ … }
static int gb_connection_control_connected(struct gb_connection *connection)
{ … }
static void
gb_connection_control_disconnecting(struct gb_connection *connection)
{ … }
static void
gb_connection_control_disconnected(struct gb_connection *connection)
{ … }
static int gb_connection_shutdown_operation(struct gb_connection *connection,
u8 phase)
{ … }
static int gb_connection_cport_shutdown(struct gb_connection *connection,
u8 phase)
{ … }
static int
gb_connection_cport_shutdown_phase_1(struct gb_connection *connection)
{ … }
static int
gb_connection_cport_shutdown_phase_2(struct gb_connection *connection)
{ … }
static void gb_connection_cancel_operations(struct gb_connection *connection,
int errno)
__must_hold(&connection->lock)
{ … }
static void
gb_connection_flush_incoming_operations(struct gb_connection *connection,
int errno)
__must_hold(&connection->lock)
{ … }
static int _gb_connection_enable(struct gb_connection *connection, bool rx)
{ … }
int gb_connection_enable(struct gb_connection *connection)
{ … }
EXPORT_SYMBOL_GPL(…);
int gb_connection_enable_tx(struct gb_connection *connection)
{ … }
EXPORT_SYMBOL_GPL(…);
void gb_connection_disable_rx(struct gb_connection *connection)
{ … }
EXPORT_SYMBOL_GPL(…);
void gb_connection_mode_switch_prepare(struct gb_connection *connection)
{ … }
void gb_connection_mode_switch_complete(struct gb_connection *connection)
{ … }
void gb_connection_disable(struct gb_connection *connection)
{ … }
EXPORT_SYMBOL_GPL(…);
void gb_connection_disable_forced(struct gb_connection *connection)
{ … }
EXPORT_SYMBOL_GPL(…);
void gb_connection_destroy(struct gb_connection *connection)
{ … }
EXPORT_SYMBOL_GPL(…);
void gb_connection_latency_tag_enable(struct gb_connection *connection)
{ … }
EXPORT_SYMBOL_GPL(…);
void gb_connection_latency_tag_disable(struct gb_connection *connection)
{ … }
EXPORT_SYMBOL_GPL(…);