kernel_samsung_a53x/drivers/vision3/dsp/hardware/include/dsp-bus.h
2024-06-15 16:02:09 -03:00

49 lines
1.1 KiB
C
Executable file

/* SPDX-License-Identifier: GPL-2.0 */
/*
* Samsung Exynos SoC series dsp driver
*
* Copyright (c) 2019 Samsung Electronics Co., Ltd.
* http://www.samsung.com/
*/
#ifndef __HW_DSP_BUS_H__
#define __HW_DSP_BUS_H__
#include <linux/mutex.h>
#define DSP_BUS_SCENARIO_NAME_LEN (32)
struct dsp_system;
struct dsp_bus;
struct dsp_bus_scenario {
unsigned int id;
char name[DSP_BUS_SCENARIO_NAME_LEN];
unsigned int bts_scen_idx;
struct mutex lock;
bool enabled;
};
struct dsp_bus_ops {
int (*mo_get_by_name)(struct dsp_bus *bus, unsigned char *name);
int (*mo_put_by_name)(struct dsp_bus *bus, unsigned char *name);
int (*mo_get_by_id)(struct dsp_bus *bus, unsigned int id);
int (*mo_put_by_id)(struct dsp_bus *bus, unsigned int id);
int (*mo_all_put)(struct dsp_bus *bus);
int (*open)(struct dsp_bus *bus);
int (*close)(struct dsp_bus *bus);
int (*probe)(struct dsp_bus *bus, void *sys);
void (*remove)(struct dsp_bus *bus);
};
struct dsp_bus {
unsigned int scen_count;
struct dsp_bus_scenario *scen;
int max_scen_id;
const struct dsp_bus_ops *ops;
struct dsp_system *sys;
};
#endif