Squashed backup commit (no shallow-clone history issues) of xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream commit 9eece662e) plus all fixes applied to get everpal_defconfig building clean against a modern (GCC 15.2.0) toolchain -- see the previous commit message on the lineage-23.2 branch (also in this repo history is not available here since this is a squashed snapshot; full incremental history lives in the local DL380 checkout and the upstream GitHub remote). Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
50 lines
1.4 KiB
C
50 lines
1.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef COMPONENT_H
|
|
#define COMPONENT_H
|
|
|
|
#include <linux/stddef.h>
|
|
|
|
struct device;
|
|
|
|
struct component_ops {
|
|
int (*bind)(struct device *comp, struct device *master,
|
|
void *master_data);
|
|
void (*unbind)(struct device *comp, struct device *master,
|
|
void *master_data);
|
|
};
|
|
|
|
int component_add(struct device *, const struct component_ops *);
|
|
void component_del(struct device *, const struct component_ops *);
|
|
|
|
int component_bind_all(struct device *master, void *master_data);
|
|
void component_unbind_all(struct device *master, void *master_data);
|
|
|
|
struct master;
|
|
|
|
struct component_master_ops {
|
|
int (*bind)(struct device *master);
|
|
void (*unbind)(struct device *master);
|
|
};
|
|
|
|
void component_master_del(struct device *,
|
|
const struct component_master_ops *);
|
|
|
|
struct component_match;
|
|
|
|
int component_master_add_with_match(struct device *,
|
|
const struct component_master_ops *, struct component_match *);
|
|
void component_match_add_release(struct device *master,
|
|
struct component_match **matchptr,
|
|
void (*release)(struct device *, void *),
|
|
int (*compare)(struct device *, void *), void *compare_data);
|
|
|
|
static inline void component_match_add(struct device *master,
|
|
struct component_match **matchptr,
|
|
int (*compare)(struct device *, void *), void *compare_data)
|
|
{
|
|
component_match_add_release(master, matchptr, NULL, compare,
|
|
compare_data);
|
|
}
|
|
|
|
#endif
|