linux/drivers/platform/chrome/cros_typec_vdm.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * USB Power Delivery Vendor Defined Message (VDM) support code.
 *
 * Copyright 2023 Google LLC
 * Author: Prashant Malani <pmalani@chromium.org>
 */

#include <linux/module.h>
#include <linux/platform_data/cros_ec_commands.h>
#include <linux/usb/pd_vdo.h>

#include "cros_ec_typec.h"
#include "cros_typec_vdm.h"

/*
 * Retrieves pending VDM attention messages from the EC and forwards them to the altmode driver
 * based on SVID.
 */
void cros_typec_handle_vdm_attention(struct cros_typec_data *typec, int port_num)
{}

/*
 * Retrieves a VDM response from the EC and forwards it to the altmode driver based on SVID.
 */
void cros_typec_handle_vdm_response(struct cros_typec_data *typec, int port_num)
{}

static int cros_typec_port_amode_enter(struct typec_altmode *amode, u32 *vdo)
{}

static int cros_typec_port_amode_vdm(struct typec_altmode *amode, const u32 hdr,
				     const u32 *vdo, int cnt)
{}

const struct typec_altmode_ops port_amode_ops =;