linux/drivers/usb/typec/mux/fsa4480.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2021-2022 Linaro Ltd.
 * Copyright (C) 2018-2020 The Linux Foundation
 */

#include <linux/bits.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/regmap.h>
#include <linux/usb/typec_dp.h>
#include <linux/usb/typec_mux.h>

#define FSA4480_SWITCH_ENABLE
#define FSA4480_SWITCH_SELECT
#define FSA4480_SWITCH_STATUS1
#define FSA4480_SLOW_L
#define FSA4480_SLOW_R
#define FSA4480_SLOW_MIC
#define FSA4480_SLOW_SENSE
#define FSA4480_SLOW_GND
#define FSA4480_DELAY_L_R
#define FSA4480_DELAY_L_MIC
#define FSA4480_DELAY_L_SENSE
#define FSA4480_DELAY_L_AGND
#define FSA4480_FUNCTION_ENABLE
#define FSA4480_RESET
#define FSA4480_MAX_REGISTER

#define FSA4480_ENABLE_DEVICE
#define FSA4480_ENABLE_SBU
#define FSA4480_ENABLE_USB
#define FSA4480_ENABLE_SENSE
#define FSA4480_ENABLE_MIC
#define FSA4480_ENABLE_AGND

#define FSA4480_SEL_SBU_REVERSE
#define FSA4480_SEL_USB
#define FSA4480_SEL_SENSE
#define FSA4480_SEL_MIC
#define FSA4480_SEL_AGND

#define FSA4480_ENABLE_AUTO_JACK_DETECT

struct fsa4480 {};

static const struct regmap_config fsa4480_regmap_config =;

static int fsa4480_set(struct fsa4480 *fsa)
{}

static int fsa4480_switch_set(struct typec_switch_dev *sw,
			      enum typec_orientation orientation)
{}

static int fsa4480_mux_set(struct typec_mux_dev *mux, struct typec_mux_state *state)
{}

enum {};

#define DATA_LANES_COUNT

static const int supported_data_lane_mapping[][DATA_LANES_COUNT] =;

static int fsa4480_parse_data_lanes_mapping(struct fsa4480 *fsa)
{}

static int fsa4480_probe(struct i2c_client *client)
{}

static void fsa4480_remove(struct i2c_client *client)
{}

static const struct i2c_device_id fsa4480_table[] =;
MODULE_DEVICE_TABLE(i2c, fsa4480_table);

static const struct of_device_id fsa4480_of_table[] =;
MODULE_DEVICE_TABLE(of, fsa4480_of_table);

static struct i2c_driver fsa4480_driver =;
module_i2c_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();