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

// SPDX-License-Identifier: GPL-2.0+
/*
 * OnSemi NB7VPQ904M Type-C driver
 *
 * Copyright (C) 2023 Dmitry Baryshkov <[email protected]>
 */
#include <linux/i2c.h>
#include <linux/mutex.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/bitfield.h>
#include <linux/of_graph.h>
#include <drm/bridge/aux-bridge.h>
#include <linux/usb/typec_dp.h>
#include <linux/usb/typec_mux.h>
#include <linux/usb/typec_retimer.h>
#include <linux/gpio/consumer.h>
#include <linux/regulator/consumer.h>

#define NB7_CHNA
#define NB7_CHNB
#define NB7_CHNC
#define NB7_CHND
#define NB7_IS_CHAN_AD(channel)

#define GEN_DEV_SET_REG

#define GEN_DEV_SET_CHIP_EN
#define GEN_DEV_SET_CHNA_EN
#define GEN_DEV_SET_CHNB_EN
#define GEN_DEV_SET_CHNC_EN
#define GEN_DEV_SET_CHND_EN

#define GEN_DEV_SET_OP_MODE_MASK

#define GEN_DEV_SET_OP_MODE_DP_CC2
#define GEN_DEV_SET_OP_MODE_DP_CC1
#define GEN_DEV_SET_OP_MODE_DP_4LANE
#define GEN_DEV_SET_OP_MODE_USB

#define EQ_SETTING_REG_BASE
#define EQ_SETTING_REG(n)
#define EQ_SETTING_MASK

#define OUTPUT_COMPRESSION_AND_POL_REG_BASE
#define OUTPUT_COMPRESSION_AND_POL_REG(n)
#define OUTPUT_COMPRESSION_MASK

#define FLAT_GAIN_REG_BASE
#define FLAT_GAIN_REG(n)
#define FLAT_GAIN_MASK

#define LOSS_MATCH_REG_BASE
#define LOSS_MATCH_REG(n)
#define LOSS_MATCH_MASK

#define AUX_CC_REG

#define CHIP_VERSION_REG

struct nb7vpq904m {};

static void nb7vpq904m_set_channel(struct nb7vpq904m *nb7, unsigned int channel, bool dp)
{}

static int nb7vpq904m_set(struct nb7vpq904m *nb7)
{}

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

static int nb7vpq904m_retimer_set(struct typec_retimer *retimer, struct typec_retimer_state *state)
{}

static const struct regmap_config nb7_regmap =;

enum {};

#define DATA_LANES_COUNT

static const int supported_data_lane_mapping[][DATA_LANES_COUNT] =;

static int nb7vpq904m_parse_data_lanes_mapping(struct nb7vpq904m *nb7)
{}

static int nb7vpq904m_probe(struct i2c_client *client)
{}

static void nb7vpq904m_remove(struct i2c_client *client)
{}

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

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

static struct i2c_driver nb7vpq904m_driver =;

module_i2c_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();