mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
interconnect changes for 5.9
Here are the interconnect changes for the 5.9-rc1 merge window consisting mostly of changes that give the core more flexibility in order to support some new provider drivers. Core changes: - Export of_icc_get_from_provider() - Relax requirement in of_icc_get_from_provider() - Allow inter-provider pairs to be configured - Mark all dummy functions as static inline Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org> -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJfGsHrAAoJEIDQzArG2BZjc3gP/2PVWSUrFTKbR0u7Nu/9egzs IrEKj2A5yWgV9EA1nIXkXaEHIr+2SgZBOKNEqtZBRW7QX4DLqBDH4M7nvedETXd5 BwKWqap5TyXKKGkdpSNZYABHonGFUhTHxDY0sh7nDZqaPsasICmWKJF4k5lh9BHN 3Ix2I0fJ3sTRHfG8txQG/SRO/gbH7WnT3U6hznaI21tVtHsWZ5+tzDQKJLyUsnWY Q6vWNnQmGj3vbk5Y2xcAUrdNlZuARh0+vYBZVFaoxCHVNggkjvuMzIdrQa5Z2p2H H+rZM8URaUKUE8yZK+vXfW5huYAd94D17H5ccm5MXZcj3rsVBTbJY3ByB8iynCYi RCySMSzexLB+ldL8cZJb3mYW9krgbVhIQg6Sf6XzMjMEKrNJbQheSa3ayK5jN4lz 3uksghfMQZeVXRiPWShtupoTXVT+G25/4LMLQ5e3+sEZr+WdFKXir9K7wQaroXep 7pgCr5BD+JkzG3bgwDQvKRc2o+1tp2r07izlfMbTW2kxmtOsCrWuDVy3aZ3O18EE YviKIrAeDBEgIv7MBq7nRgk6MsZxrJXuU6rq2vW01XXrSuTBJGxaIzqZtwW+oXrB iNvqC93o5mDemAiyzB5wB5imXQgkO0W9mFA+ryHtMWwOR857MlOEZakSY+m5Qv+9 IAeiNVgqIwNNGCdcWHyD =+gRu -----END PGP SIGNATURE----- Merge tag 'icc-5.9-rc1' of https://git.linaro.org/people/georgi.djakov/linux into char-misc-next Georgi writes: interconnect changes for 5.9 Here are the interconnect changes for the 5.9-rc1 merge window consisting mostly of changes that give the core more flexibility in order to support some new provider drivers. Core changes: - Export of_icc_get_from_provider() - Relax requirement in of_icc_get_from_provider() - Allow inter-provider pairs to be configured - Mark all dummy functions as static inline Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org> * tag 'icc-5.9-rc1' of https://git.linaro.org/people/georgi.djakov/linux: interconnect: Mark all dummy functions as static inline interconnect: Allow inter-provider pairs to be configured interconnect: Relax requirement in of_icc_get_from_provider() interconnect: Export of_icc_get_from_provider()
This commit is contained in:
commit
54918b8ed1
|
|
@ -263,23 +263,22 @@ static int aggregate_requests(struct icc_node *node)
|
|||
static int apply_constraints(struct icc_path *path)
|
||||
{
|
||||
struct icc_node *next, *prev = NULL;
|
||||
struct icc_provider *p;
|
||||
int ret = -EINVAL;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < path->num_nodes; i++) {
|
||||
next = path->reqs[i].node;
|
||||
p = next->provider;
|
||||
|
||||
/*
|
||||
* Both endpoints should be valid master-slave pairs of the
|
||||
* same interconnect provider that will be configured.
|
||||
*/
|
||||
if (!prev || next->provider != prev->provider) {
|
||||
/* both endpoints should be valid master-slave pairs */
|
||||
if (!prev || (p != prev->provider && !p->inter_set)) {
|
||||
prev = next;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* set the constraints */
|
||||
ret = next->provider->set(prev, next);
|
||||
ret = p->set(prev, next);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
|
|
@ -334,12 +333,12 @@ EXPORT_SYMBOL_GPL(of_icc_xlate_onecell);
|
|||
* Returns a valid pointer to struct icc_node on success or ERR_PTR()
|
||||
* on failure.
|
||||
*/
|
||||
static struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
|
||||
struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
|
||||
{
|
||||
struct icc_node *node = ERR_PTR(-EPROBE_DEFER);
|
||||
struct icc_provider *provider;
|
||||
|
||||
if (!spec || spec->args_count != 1)
|
||||
if (!spec)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
mutex_lock(&icc_lock);
|
||||
|
|
@ -353,6 +352,7 @@ static struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
|
|||
|
||||
return node;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(of_icc_get_from_provider);
|
||||
|
||||
static void devm_icc_release(struct device *dev, void *res)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ struct icc_node *of_icc_xlate_onecell(struct of_phandle_args *spec,
|
|||
* @xlate: provider-specific callback for mapping nodes from phandle arguments
|
||||
* @dev: the device this interconnect provider belongs to
|
||||
* @users: count of active users
|
||||
* @inter_set: whether inter-provider pairs will be configured with @set
|
||||
* @data: pointer to private data
|
||||
*/
|
||||
struct icc_provider {
|
||||
|
|
@ -53,6 +54,7 @@ struct icc_provider {
|
|||
struct icc_node* (*xlate)(struct of_phandle_args *spec, void *data);
|
||||
struct device *dev;
|
||||
int users;
|
||||
bool inter_set;
|
||||
void *data;
|
||||
};
|
||||
|
||||
|
|
@ -103,6 +105,7 @@ void icc_node_del(struct icc_node *node);
|
|||
int icc_nodes_remove(struct icc_provider *provider);
|
||||
int icc_provider_add(struct icc_provider *provider);
|
||||
int icc_provider_del(struct icc_provider *provider);
|
||||
struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec);
|
||||
|
||||
#else
|
||||
|
||||
|
|
@ -117,7 +120,7 @@ static inline struct icc_node *icc_node_create(int id)
|
|||
return ERR_PTR(-ENOTSUPP);
|
||||
}
|
||||
|
||||
void icc_node_destroy(int id)
|
||||
static inline void icc_node_destroy(int id)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -126,16 +129,16 @@ static inline int icc_link_create(struct icc_node *node, const int dst_id)
|
|||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
int icc_link_destroy(struct icc_node *src, struct icc_node *dst)
|
||||
static inline int icc_link_destroy(struct icc_node *src, struct icc_node *dst)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
void icc_node_add(struct icc_node *node, struct icc_provider *provider)
|
||||
static inline void icc_node_add(struct icc_node *node, struct icc_provider *provider)
|
||||
{
|
||||
}
|
||||
|
||||
void icc_node_del(struct icc_node *node)
|
||||
static inline void icc_node_del(struct icc_node *node)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -154,6 +157,11 @@ static inline int icc_provider_del(struct icc_provider *provider)
|
|||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
static inline struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
|
||||
{
|
||||
return ERR_PTR(-ENOTSUPP);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_INTERCONNECT */
|
||||
|
||||
#endif /* __LINUX_INTERCONNECT_PROVIDER_H */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user