#define pr_fmt(fmt) …
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/extcon.h>
#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/notifier.h>
#include <linux/pinctrl/consumer.h>
#include <linux/pinctrl/machine.h>
#include <linux/platform_device.h>
#include <linux/serdev.h>
#include <linux/time.h>
#include <linux/types.h>
#include <linux/workqueue.h>
#include "serdev_helpers.h"
#define YT2_1380_FC_PDEV_NAME …
#define YT2_1380_FC_SERDEV_CTRL …
#define YT2_1380_FC_SERDEV_NAME …
#define YT2_1380_FC_EXTCON_NAME …
#define YT2_1380_FC_MAX_TRIES …
#define YT2_1380_FC_PIN_SW_DELAY_US …
#define YT2_1380_FC_UART_DRAIN_DELAY_US …
#define YT2_1380_FC_VOLT_SW_DELAY_US …
struct yt2_1380_fc { … };
static int yt2_1380_fc_set_gpio_mode(struct yt2_1380_fc *fc, bool enable)
{ … }
static bool yt2_1380_fc_dedicated_charger_connected(struct yt2_1380_fc *fc)
{ … }
static bool yt2_1380_fc_fast_charger_connected(struct yt2_1380_fc *fc)
{ … }
static void yt2_1380_fc_worker(struct work_struct *work)
{ … }
static int yt2_1380_fc_extcon_evt(struct notifier_block *nb,
unsigned long event, void *param)
{ … }
static size_t yt2_1380_fc_receive(struct serdev_device *serdev, const u8 *data, size_t len)
{ … }
static const struct serdev_device_ops yt2_1380_fc_serdev_ops = …;
static int yt2_1380_fc_serdev_probe(struct serdev_device *serdev)
{ … }
struct serdev_device_driver yt2_1380_fc_serdev_driver = …;
static const struct pinctrl_map yt2_1380_fc_pinctrl_map[] = …;
static int yt2_1380_fc_pdev_probe(struct platform_device *pdev)
{ … }
static void yt2_1380_fc_pdev_remove(struct platform_device *pdev)
{ … }
static struct platform_driver yt2_1380_fc_pdev_driver = …;
static int __init yt2_1380_fc_module_init(void)
{ … }
module_init(…) …;
static void __exit yt2_1380_fc_module_exit(void)
{ … }
module_exit(yt2_1380_fc_module_exit);
MODULE_ALIAS(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;