#include <drm/bridge/aux-bridge.h>
#include <linux/bitfield.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/of_graph.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/usb/typec_dp.h>
#include <linux/usb/typec_mux.h>
#include <linux/usb/typec_retimer.h>
#define PTN36502_CHIP_ID_REG …
#define PTN36502_CHIP_ID …
#define PTN36502_CHIP_REVISION_REG …
#define PTN36502_CHIP_REVISION_BASE_MASK …
#define PTN36502_CHIP_REVISION_METAL_MASK …
#define PTN36502_DP_LINK_CTRL_REG …
#define PTN36502_DP_LINK_CTRL_LANES_MASK …
#define PTN36502_DP_LINK_CTRL_LANES_2 …
#define PTN36502_DP_LINK_CTRL_LANES_4 …
#define PTN36502_DP_LINK_CTRL_LINK_RATE_MASK …
#define PTN36502_DP_LINK_CTRL_LINK_RATE_5_4GBPS …
#define PTN36502_DP_LANE_CTRL_REG(n) …
#define PTN36502_DP_LANE_CTRL_RX_GAIN_MASK …
#define PTN36502_DP_LANE_CTRL_RX_GAIN_3DB …
#define PTN36502_DP_LANE_CTRL_TX_SWING_MASK …
#define PTN36502_DP_LANE_CTRL_TX_SWING_800MVPPD …
#define PTN36502_DP_LANE_CTRL_PRE_EMPHASIS_MASK …
#define PTN36502_DP_LANE_CTRL_PRE_EMPHASIS_3_5DB …
#define PTN36502_MODE_CTRL1_REG …
#define PTN36502_MODE_CTRL1_PLUG_ORIENT_MASK …
#define PTN36502_MODE_CTRL1_PLUG_ORIENT_REVERSE …
#define PTN36502_MODE_CTRL1_AUX_CROSSBAR_MASK …
#define PTN36502_MODE_CTRL1_AUX_CROSSBAR_SW_ON …
#define PTN36502_MODE_CTRL1_MODE_MASK …
#define PTN36502_MODE_CTRL1_MODE_OFF …
#define PTN36502_MODE_CTRL1_MODE_USB_ONLY …
#define PTN36502_MODE_CTRL1_MODE_USB_DP …
#define PTN36502_MODE_CTRL1_MODE_DP …
#define PTN36502_DEVICE_CTRL_REG …
#define PTN36502_DEVICE_CTRL_AUX_MONITORING_MASK …
#define PTN36502_DEVICE_CTRL_AUX_MONITORING_EN …
struct ptn36502 { … };
static int ptn36502_set(struct ptn36502 *ptn)
{ … }
static int ptn36502_sw_set(struct typec_switch_dev *sw, enum typec_orientation orientation)
{ … }
static int ptn36502_retimer_set(struct typec_retimer *retimer, struct typec_retimer_state *state)
{ … }
static int ptn36502_detect(struct ptn36502 *ptn)
{ … }
static const struct regmap_config ptn36502_regmap = …;
static int ptn36502_probe(struct i2c_client *client)
{ … }
static void ptn36502_remove(struct i2c_client *client)
{ … }
static const struct i2c_device_id ptn36502_table[] = …;
MODULE_DEVICE_TABLE(i2c, ptn36502_table);
static const struct of_device_id ptn36502_of_table[] = …;
MODULE_DEVICE_TABLE(of, ptn36502_of_table);
static struct i2c_driver ptn36502_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;