linux/drivers/soc/qcom/pmic_glink_altmode.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2022, Linaro Ltd
 */
#include <linux/auxiliary_bus.h>
#include <linux/bitfield.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/mutex.h>
#include <linux/property.h>
#include <linux/soc/qcom/pdr.h>
#include <drm/bridge/aux-bridge.h>

#include <linux/usb/typec_altmode.h>
#include <linux/usb/typec_dp.h>
#include <linux/usb/typec_mux.h>
#include <linux/usb/typec_retimer.h>

#include <linux/soc/qcom/pmic_glink.h>

#define PMIC_GLINK_MAX_PORTS

#define USBC_SC8180X_NOTIFY_IND
#define USBC_CMD_WRITE_REQ
#define USBC_NOTIFY_IND

#define ALTMODE_PAN_EN
#define ALTMODE_PAN_ACK

struct usbc_write_req {};

#define NOTIFY_PAYLOAD_SIZE
struct usbc_notify {};

struct usbc_sc8180x_notify {};

enum pmic_glink_altmode_pin_assignment {};

struct pmic_glink_altmode;

#define work_to_altmode_port(w)

struct pmic_glink_altmode_port {};

#define work_to_altmode(w)

struct pmic_glink_altmode {};

static int pmic_glink_altmode_request(struct pmic_glink_altmode *altmode, u32 cmd, u32 arg)
{}

static void pmic_glink_altmode_enable_dp(struct pmic_glink_altmode *altmode,
					 struct pmic_glink_altmode_port *port,
					 u8 mode, bool hpd_state,
					 bool hpd_irq)
{}

static void pmic_glink_altmode_enable_usb(struct pmic_glink_altmode *altmode,
					  struct pmic_glink_altmode_port *port)
{}

static void pmic_glink_altmode_safe(struct pmic_glink_altmode *altmode,
				    struct pmic_glink_altmode_port *port)
{}

static void pmic_glink_altmode_worker(struct work_struct *work)
{}

static enum typec_orientation pmic_glink_altmode_orientation(unsigned int orientation)
{}

#define SC8180X_PORT_MASK
#define SC8180X_ORIENTATION_MASK
#define SC8180X_MUX_MASK
#define SC8180X_MODE_MASK
#define SC8180X_HPD_STATE_MASK
#define SC8180X_HPD_IRQ_MASK

static void pmic_glink_altmode_sc8180xp_notify(struct pmic_glink_altmode *altmode,
					       const void *data, size_t len)
{}

#define SC8280XP_DPAM_MASK
#define SC8280XP_HPD_STATE_MASK
#define SC8280XP_HPD_IRQ_MASK

static void pmic_glink_altmode_sc8280xp_notify(struct pmic_glink_altmode *altmode,
					       u16 svid, const void *data, size_t len)
{}

static void pmic_glink_altmode_callback(const void *data, size_t len, void *priv)
{}

static void pmic_glink_altmode_put_retimer(void *data)
{}

static void pmic_glink_altmode_put_mux(void *data)
{}

static void pmic_glink_altmode_put_switch(void *data)
{}

static void pmic_glink_altmode_enable_worker(struct work_struct *work)
{}

static void pmic_glink_altmode_pdr_notify(void *priv, int state)
{}

static const struct of_device_id pmic_glink_altmode_of_quirks[] =;

static int pmic_glink_altmode_probe(struct auxiliary_device *adev,
				    const struct auxiliary_device_id *id)
{}

static const struct auxiliary_device_id pmic_glink_altmode_id_table[] =;
MODULE_DEVICE_TABLE(auxiliary, pmic_glink_altmode_id_table);

static struct auxiliary_driver pmic_glink_altmode_driver =;

module_auxiliary_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();