linux/drivers/usb/common/debug.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Common USB debugging functions
 *
 * Copyright (C) 2010-2011 Texas Instruments Incorporated - https://www.ti.com
 *
 * Authors: Felipe Balbi <[email protected]>,
 *	    Sebastian Andrzej Siewior <[email protected]>
 */

#include <linux/kernel.h>
#include <linux/usb/ch9.h>

static void usb_decode_get_status(__u8 bRequestType, __u16 wIndex,
				  __u16 wLength, char *str, size_t size)
{}

static const char *usb_decode_device_feature(u16 wValue)
{}

static const char *usb_decode_test_mode(u16 wIndex)
{}

static void usb_decode_set_clear_feature(__u8 bRequestType,
					 __u8 bRequest, __u16 wValue,
					 __u16 wIndex, char *str, size_t size)
{}

static void usb_decode_set_address(__u16 wValue, char *str, size_t size)
{}

static void usb_decode_get_set_descriptor(__u8 bRequestType, __u8 bRequest,
					  __u16 wValue, __u16 wIndex,
					  __u16 wLength, char *str, size_t size)
{}

static void usb_decode_get_configuration(__u16 wLength, char *str, size_t size)
{}

static void usb_decode_set_configuration(__u8 wValue, char *str, size_t size)
{}

static void usb_decode_get_intf(__u16 wIndex, __u16 wLength, char *str,
				size_t size)
{}

static void usb_decode_set_intf(__u8 wValue, __u16 wIndex, char *str,
				size_t size)
{}

static void usb_decode_synch_frame(__u16 wIndex, __u16 wLength,
				   char *str, size_t size)
{}

static void usb_decode_set_sel(__u16 wLength, char *str, size_t size)
{}

static void usb_decode_set_isoch_delay(__u8 wValue, char *str, size_t size)
{}

static void usb_decode_ctrl_generic(char *str, size_t size, __u8 bRequestType,
				    __u8 bRequest, __u16 wValue, __u16 wIndex,
				    __u16 wLength)
{}

static void usb_decode_ctrl_standard(char *str, size_t size, __u8 bRequestType,
				     __u8 bRequest, __u16 wValue, __u16 wIndex,
				     __u16 wLength)
{}

/**
 * usb_decode_ctrl - Returns human readable representation of control request.
 * @str: buffer to return a human-readable representation of control request.
 *       This buffer should have about 200 bytes.
 * @size: size of str buffer.
 * @bRequestType: matches the USB bmRequestType field
 * @bRequest: matches the USB bRequest field
 * @wValue: matches the USB wValue field (CPU byte order)
 * @wIndex: matches the USB wIndex field (CPU byte order)
 * @wLength: matches the USB wLength field (CPU byte order)
 *
 * Function returns decoded, formatted and human-readable description of
 * control request packet.
 *
 * The usage scenario for this is for tracepoints, so function as a return
 * use the same value as in parameters. This approach allows to use this
 * function in TP_printk
 *
 * Important: wValue, wIndex, wLength parameters before invoking this function
 * should be processed by le16_to_cpu macro.
 */
const char *usb_decode_ctrl(char *str, size_t size, __u8 bRequestType,
			    __u8 bRequest, __u16 wValue, __u16 wIndex,
			    __u16 wLength)
{}
EXPORT_SYMBOL_GPL();