MAJOR=4
MINOR=35
DEVNAME=tty35
  A   ˆl–Ü4ý( ©³( 	Å€fàB¦-ÿ¿ƒ/·_†I|¥�+a–Ým_J*j"Tâ‚Æ^¸ÈÅ£Ä 	[    /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
/*
 * This file is provided under a dual BSD/GPLv2 license.  When using or
 * redistributing this file, you may do so under either license.
 *
 * Copyright(c) 2025 Intel Corporation.
 */

#ifndef __HDA_SDW_BPT_H
#define __HDA_SDW_BPT_H

#include <linux/device.h>

struct hdac_ext_stream;
struct snd_dma_buffer;

#if IS_ENABLED(CONFIG_SND_SOF_SOF_HDA_SDW_BPT)
int hda_sdw_bpt_open(struct device *dev, int link_id, struct hdac_ext_stream **bpt_tx_stream,
		     struct snd_dma_buffer *dmab_tx_bdl, u32 bpt_tx_num_bytes,
		     u32 tx_dma_bandwidth, struct hdac_ext_stream **bpt_rx_stream,
		     struct snd_dma_buffer *dmab_rx_bdl, u32 bpt_rx_num_bytes,
		     u32 rx_dma_bandwidth);

int hda_sdw_bpt_send_async(struct device *dev, struct hdac_ext_stream *bpt_tx_stream,
			   struct hdac_ext_stream *bpt_rx_stream);

int hda_sdw_bpt_wait(struct device *dev, struct hdac_ext_stream *bpt_tx_stream,
		     struct hdac_ext_stream *bpt_rx_stream);

int hda_sdw_bpt_close(struct device *dev, struct hdac_ext_stream *bpt_tx_stream,
		      struct snd_dma_buffer *dmab_tx_bdl, struct hdac_ext_stream *bpt_rx_stream,
		      struct snd_dma_buffer *dmab_rx_bdl);
#else
static inline int hda_sdw_bpt_open(struct device *dev, int link_id,
				   struct hdac_ext_stream **bpt_tx_stream,
				   struct snd_dma_buffer *dmab_tx_bdl, u32 bpt_tx_num_bytes,
				   u32 tx_dma_bandwidth, struct hdac_ext_stream **bpt_rx_stream,
				   struct snd_dma_buffer *dmab_rx_bdl, u32 bpt_rx_num_bytes,
				   u32 rx_dma_bandwidth)
{
	WARN_ONCE(1, "SoundWire BPT is disabled");
	return -EOPNOTSUPP;
}

static inline int hda_sdw_bpt_send_async(struct device *dev, struct hdac_ext_stream *bpt_tx_stream,
					 struct hdac_ext_stream *bpt_rx_stream)
{
	WARN_ONCE(1, "SoundWire BPT is disabled");
	return -EOPNOTSUPP;
}

static inline int hda_sdw_bpt_wait(struct device *dev, struct hdac_ext_stream *bpt_tx_stream,
				   struct hdac_ext_stream *bpt_rx_stream)
{
	WARN_ONCE(1, "SoundWire BPT is disabled");
	return -EOPNOTSUPP;
}

static inline int hda_sdw_bpt_close(struct device *dev, struct hdac_ext_stream *bpt_tx_stream,
				    struct snd_dma_buffer *dmab_tx_bdl,
				    struct hdac_ext_stream *bpt_rx_stream,
				    struct snd_dma_buffer *dmab_rx_bdl)
{
	WARN_ONCE(1, "SoundWire BPT is disabled");
	return -EOPNOTSUPP;
}
#endif

#endif /* __HDA_SDW_BPT_H */
     ˆÀÁƒí¹¿¾Ä Œ    /*
 * Allwinner Reduced Serial Bus Driver
 *
 * Copyright (c) 2015 Chen-Yu Tsai
 *
 * Author: Chen-Yu Tsai <wens@csie.org>
 *
 * This file is licensed under the terms of the GNU General Public
 * License version 2.  This program is licensed "as is" without any
 * warranty of any kind, whether express or implied.
 */
#ifndef _SUNXI_RSB_H
#define _SUNXI_RSB_H

#include <linux/device.h>
#include <linux/regmap.h>
#include <linux/types.h>

struct sunxi_rsb;

/**
 * struct sunxi_rsb_device - Basic representation of an RSB device
 * @dev:	Driver model representation of the device.
 * @ctrl:	RSB controller managing the bus hosting this device.
 * @rtaddr:	This device's runtime address
 * @hwaddr:	This device's hardware address
 */
struct sunxi_rsb_device {
	struct device		dev;
	struct sunxi_rsb	*rsb;
	int			irq;
	u8			rtaddr;
	u16			hwaddr;
};

static inline struct sunxi_rsb_device *to_sunxi_rsb_device(struct device *d)
{
	return container_of(d, struct sunxi_rsb_device, dev);
}

static inline void *sunxi_rsb_device_get_drvdata(const struct sunxi_rsb_device *rdev)
{
	return dev_get_drvdata(&rdev->dev);
}

static inline void sunxi_rsb_device_set_drvdata(struct sunxi_rsb_device *rdev,
						void *data)
{
	dev_set_drvdata(&rdev->dev, data);
}

/**
 * struct sunxi_rsb_driver - RSB slave device driver
 * @driver:	RSB device drivers should initialize name and owner field of
 *		this structure.
 * @probe:	binds this driver to a RSB device.
 * @remove:	unbinds this driver from the RSB device.
 */
struct sunxi_rsb_driver {
	struct device_driver driv