dc68054305
- Restore 29 recipe symlinks (libdrm, qtbase, dbus, sddm, pipewire, etc.) - Restore 33 patches (KDE, libdrm, mesa, pipewire, sddm, wireplumber) - Restore 20+ local/scripts (audit, lint, test, build helpers) - Restore src/cook/scheduler.rs, status.rs, gnu-config/ - Restore scripts/patch-inclusion-gate.sh, run_mini1.sh, validate-collision-log.sh - Recover TLC source from HEAD (was overwritten by 0.2.3 checkout) - Recover 11 local/docs plans from HEAD (were overwritten) - Recover qt6-wayland-smoke symlink from HEAD - Fix MOTD: remove garbled ASCII art, use clean text - Update version: 0.2.0 -> 0.2.4 in os-release, motd, config - Reduce filesystem_size: 1536 -> 512 MiB - Add ABSOLUTE RULE to AGENTS.md: never delete/ignore packages - Reduce pcid scheme log verbosity: info -> debug
61 lines
1.7 KiB
C
61 lines
1.7 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (c) 2023 Ideas On Board Oy
|
|
*/
|
|
|
|
#ifndef _VCHIQ_DEVICE_H
|
|
#define _VCHIQ_DEVICE_H
|
|
|
|
#include <linux/device.h>
|
|
#include <linux/mod_devicetable.h>
|
|
|
|
struct vchiq_drv_mgmt;
|
|
|
|
struct vchiq_device {
|
|
struct device dev;
|
|
struct vchiq_drv_mgmt *drv_mgmt;
|
|
};
|
|
|
|
struct vchiq_driver {
|
|
int (*probe)(struct vchiq_device *device);
|
|
void (*remove)(struct vchiq_device *device);
|
|
int (*resume)(struct vchiq_device *device);
|
|
int (*suspend)(struct vchiq_device *device,
|
|
pm_message_t state);
|
|
|
|
const struct vchiq_device_id *id_table;
|
|
struct device_driver driver;
|
|
};
|
|
|
|
static inline struct vchiq_device *to_vchiq_device(struct device *d)
|
|
{
|
|
return container_of(d, struct vchiq_device, dev);
|
|
}
|
|
|
|
static inline struct vchiq_driver *to_vchiq_driver(struct device_driver *d)
|
|
{
|
|
return container_of(d, struct vchiq_driver, driver);
|
|
}
|
|
|
|
extern const struct bus_type vchiq_bus_type;
|
|
|
|
struct vchiq_device *
|
|
vchiq_device_register(struct device *parent, const char *name);
|
|
void vchiq_device_unregister(struct vchiq_device *dev);
|
|
|
|
int vchiq_driver_register(struct vchiq_driver *vchiq_drv);
|
|
void vchiq_driver_unregister(struct vchiq_driver *vchiq_drv);
|
|
|
|
/**
|
|
* module_vchiq_driver() - Helper macro for registering a vchiq driver
|
|
* @__vchiq_driver: vchiq driver struct
|
|
*
|
|
* Helper macro for vchiq drivers which do not do anything special in
|
|
* module init/exit. This eliminates a lot of boilerplate. Each module may only
|
|
* use this macro once, and calling it replaces module_init() and module_exit()
|
|
*/
|
|
#define module_vchiq_driver(__vchiq_driver) \
|
|
module_driver(__vchiq_driver, vchiq_driver_register, vchiq_driver_unregister)
|
|
|
|
#endif /* _VCHIQ_DEVICE_H */
|