#include <linux/atomic.h>
#include <linux/crc-itu-t.h>
#include <linux/delay.h>
#include <linux/export.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/kernel.h>
#include <linux/mfd/rave-sp.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/sched.h>
#include <linux/serdev.h>
#include <asm/unaligned.h>
#define RAVE_SP_STX …
#define RAVE_SP_ETX …
#define RAVE_SP_DLE …
#define RAVE_SP_MAX_DATA_SIZE …
#define RAVE_SP_CHECKSUM_8B2C …
#define RAVE_SP_CHECKSUM_CCITT …
#define RAVE_SP_CHECKSUM_SIZE …
#define RAVE_SP_RX_BUFFER_SIZE …
#define RAVE_SP_STX_ETX_SIZE …
#define RAVE_SP_TX_BUFFER_SIZE …
enum rave_sp_deframer_state { … };
struct rave_sp_deframer { … };
struct rave_sp_reply { … };
struct rave_sp_checksum { … };
struct rave_sp_version { … } __packed;
struct rave_sp_status { … } __packed;
struct rave_sp_variant_cmds { … };
struct rave_sp_variant { … };
struct rave_sp { … };
static bool rave_sp_id_is_event(u8 code)
{ … }
static void rave_sp_unregister_event_notifier(struct device *dev, void *res)
{ … }
int devm_rave_sp_register_event_notifier(struct device *dev,
struct notifier_block *nb)
{ … }
EXPORT_SYMBOL_GPL(…);
static void csum_8b2c(const u8 *buf, size_t size, u8 *crc)
{ … }
static void csum_ccitt(const u8 *buf, size_t size, u8 *crc)
{ … }
static void *stuff(unsigned char *dest, const unsigned char *src, size_t n)
{ … }
static int rave_sp_write(struct rave_sp *sp, const u8 *data, u8 data_size)
{ … }
static u8 rave_sp_reply_code(u8 command)
{ … }
int rave_sp_exec(struct rave_sp *sp,
void *__data, size_t data_size,
void *reply_data, size_t reply_data_size)
{ … }
EXPORT_SYMBOL_GPL(…);
static void rave_sp_receive_event(struct rave_sp *sp,
const unsigned char *data, size_t length)
{ … }
static void rave_sp_receive_reply(struct rave_sp *sp,
const unsigned char *data, size_t length)
{ … }
static void rave_sp_receive_frame(struct rave_sp *sp,
const unsigned char *data,
size_t length)
{ … }
static size_t rave_sp_receive_buf(struct serdev_device *serdev,
const u8 *buf, size_t size)
{ … }
static int rave_sp_rdu1_cmd_translate(enum rave_sp_command command)
{ … }
static int rave_sp_rdu2_cmd_translate(enum rave_sp_command command)
{ … }
static int rave_sp_default_cmd_translate(enum rave_sp_command command)
{ … }
static const char *devm_rave_sp_version(struct device *dev,
struct rave_sp_version *version)
{ … }
static int rave_sp_rdu1_get_status(struct rave_sp *sp,
struct rave_sp_status *status)
{ … }
static int rave_sp_emulated_get_status(struct rave_sp *sp,
struct rave_sp_status *status)
{ … }
static int rave_sp_get_status(struct rave_sp *sp)
{ … }
static const struct rave_sp_checksum rave_sp_checksum_8b2c = …;
static const struct rave_sp_checksum rave_sp_checksum_ccitt = …;
static const struct rave_sp_variant rave_sp_legacy = …;
static const struct rave_sp_variant rave_sp_rdu1 = …;
static const struct rave_sp_variant rave_sp_rdu2 = …;
static const struct of_device_id rave_sp_dt_ids[] = …;
static const struct serdev_device_ops rave_sp_serdev_device_ops = …;
static int rave_sp_probe(struct serdev_device *serdev)
{ … }
MODULE_DEVICE_TABLE(of, rave_sp_dt_ids);
static struct serdev_device_driver rave_sp_drv = …;
module_serdev_device_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;