1 /* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
13 #ifndef _ARCH_ARM_MACH_MSM_BUS_RULES_H
14 #define _ARCH_ARM_MACH_MSM_BUS_RULES_H
16 #include <linux/types.h>
17 #include <linux/list.h>
18 #include <linux/notifier.h>
19 #include <dt-bindings/msm/msm-bus-rule-ops.h>
23 struct rule_update_path_info {
29 struct list_head link;
32 struct rule_apply_rcm_info {
36 bool after_clk_commit;
37 struct list_head link;
40 struct bus_rule_type {
53 void msm_rule_register(int num_rules, struct bus_rule_type *rule,
54 struct notifier_block *nb);
55 void msm_rule_unregister(int num_rules, struct bus_rule_type *rule,
56 struct notifier_block *nb);
57 bool msm_rule_update(struct bus_rule_type *old_rule,
58 struct bus_rule_type *new_rule,
59 struct notifier_block *nb);
60 void msm_rule_evaluate_rules(int node);
61 void print_rules_buf(char *buf, int count);
62 bool msm_rule_are_rules_registered(void);
63 #endif /* _ARCH_ARM_MACH_MSM_BUS_RULES_H */