#include <linux/gfp.h>
#include <linux/greybus.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/printk.h>
#include <linux/serdev.h>
#include <linux/tty.h>
#include <linux/tty_driver.h>
#include <linux/greybus/hd.h>
#include <linux/init.h>
#include <linux/device.h>
#include <linux/crc-ccitt.h>
#include <linux/circ_buf.h>
#include <linux/types.h>
#include <linux/workqueue.h>
#define RX_HDLC_PAYLOAD …
#define CRC_LEN …
#define MAX_RX_HDLC …
#define TX_CIRC_BUF_SIZE …
#define ADDRESS_GREYBUS …
#define ADDRESS_DBG …
#define ADDRESS_CONTROL …
#define HDLC_FRAME …
#define HDLC_ESC …
#define HDLC_XOR …
#define CONTROL_SVC_START …
#define CONTROL_SVC_STOP …
#define GB_MAX_CPORTS …
struct gb_beagleplay { … };
struct hdlc_payload { … };
struct hdlc_greybus_frame { … } __packed;
static void hdlc_rx_greybus_frame(struct gb_beagleplay *bg, u8 *buf, u16 len)
{ … }
static void hdlc_rx_dbg_frame(const struct gb_beagleplay *bg, const char *buf, u16 len)
{ … }
static void hdlc_write(struct gb_beagleplay *bg)
{ … }
static void hdlc_append(struct gb_beagleplay *bg, u8 value)
{ … }
static void hdlc_append_escaped(struct gb_beagleplay *bg, u8 value)
{ … }
static void hdlc_append_tx_frame(struct gb_beagleplay *bg)
{ … }
static void hdlc_append_tx_u8(struct gb_beagleplay *bg, u8 value)
{ … }
static void hdlc_append_tx_buf(struct gb_beagleplay *bg, const u8 *buf, u16 len)
{ … }
static void hdlc_append_tx_crc(struct gb_beagleplay *bg)
{ … }
static void hdlc_transmit(struct work_struct *work)
{ … }
static void hdlc_tx_frames(struct gb_beagleplay *bg, u8 address, u8 control,
const struct hdlc_payload payloads[], size_t count)
{ … }
static void hdlc_tx_s_frame_ack(struct gb_beagleplay *bg)
{ … }
static void hdlc_rx_frame(struct gb_beagleplay *bg)
{ … }
static size_t hdlc_rx(struct gb_beagleplay *bg, const u8 *data, size_t count)
{ … }
static int hdlc_init(struct gb_beagleplay *bg)
{ … }
static void hdlc_deinit(struct gb_beagleplay *bg)
{ … }
static size_t gb_tty_receive(struct serdev_device *sd, const u8 *data,
size_t count)
{ … }
static void gb_tty_wakeup(struct serdev_device *serdev)
{ … }
static struct serdev_device_ops gb_beagleplay_ops = …;
static int gb_message_send(struct gb_host_device *hd, u16 cport, struct gb_message *msg, gfp_t mask)
{ … }
static void gb_message_cancel(struct gb_message *message)
{ … }
static struct gb_hd_driver gb_hdlc_driver = …;
static void gb_beagleplay_start_svc(struct gb_beagleplay *bg)
{ … }
static void gb_beagleplay_stop_svc(struct gb_beagleplay *bg)
{ … }
static void gb_greybus_deinit(struct gb_beagleplay *bg)
{ … }
static int gb_greybus_init(struct gb_beagleplay *bg)
{ … }
static void gb_serdev_deinit(struct gb_beagleplay *bg)
{ … }
static int gb_serdev_init(struct gb_beagleplay *bg)
{ … }
static int gb_beagleplay_probe(struct serdev_device *serdev)
{ … }
static void gb_beagleplay_remove(struct serdev_device *serdev)
{ … }
static const struct of_device_id gb_beagleplay_of_match[] = …;
MODULE_DEVICE_TABLE(of, gb_beagleplay_of_match);
static struct serdev_device_driver gb_beagleplay_driver = …;
module_serdev_device_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;