aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/devfreq-event.h
diff options
context:
space:
mode:
authorChanwoo Choi <cw00.choi@samsung.com>2020-09-08 19:24:47 +0900
committerChanwoo Choi <cw00.choi@samsung.com>2020-09-29 17:50:10 +0900
commit02bdbf7d09c059b16047e3d4a05e6d584dd993b6 (patch)
tree25a3c46d7350113a22ce3171f6de2cfe242fcc4a /include/linux/devfreq-event.h
parentPM / devfreq: Change prototype of devfreq_get_devfreq_by_phandle function (diff)
downloadwireguard-linux-02bdbf7d09c059b16047e3d4a05e6d584dd993b6.tar.xz
wireguard-linux-02bdbf7d09c059b16047e3d4a05e6d584dd993b6.zip
PM / devfreq: event: Change prototype of devfreq_event_get_edev_by_phandle function
Previously, devfreq core support 'devfreq-events' property in order to get the devfreq-event device by phandle. But, 'devfreq-events' property name is not proper on devicetree binding because this name doesn't mean the any h/w attribute. The devfreq-event core hand over the rights to decide the property name for getting the devfreq-event device on devicetree. Each devfreq-event driver will decide the property name on devicetree binding and then pass the their own property name to devfreq_event_get_edev_by_phandle function. And change the prototype of devfreq_event_get_edev_count function because of used deprecated 'devfreq-events' property. Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'include/linux/devfreq-event.h')
-rw-r--r--include/linux/devfreq-event.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/linux/devfreq-event.h b/include/linux/devfreq-event.h
index f14f17f8cb7f..4a50a5c71a5f 100644
--- a/include/linux/devfreq-event.h
+++ b/include/linux/devfreq-event.h
@@ -106,8 +106,11 @@ extern int devfreq_event_get_event(struct devfreq_event_dev *edev,
struct devfreq_event_data *edata);
extern int devfreq_event_reset_event(struct devfreq_event_dev *edev);
extern struct devfreq_event_dev *devfreq_event_get_edev_by_phandle(
- struct device *dev, int index);
-extern int devfreq_event_get_edev_count(struct device *dev);
+ struct device *dev,
+ const char *phandle_name,
+ int index);
+extern int devfreq_event_get_edev_count(struct device *dev,
+ const char *phandle_name);
extern struct devfreq_event_dev *devfreq_event_add_edev(struct device *dev,
struct devfreq_event_desc *desc);
extern int devfreq_event_remove_edev(struct devfreq_event_dev *edev);
@@ -152,12 +155,15 @@ static inline int devfreq_event_reset_event(struct devfreq_event_dev *edev)
}
static inline struct devfreq_event_dev *devfreq_event_get_edev_by_phandle(
- struct device *dev, int index)
+ struct device *dev,
+ const char *phandle_name,
+ int index)
{
return ERR_PTR(-EINVAL);
}
-static inline int devfreq_event_get_edev_count(struct device *dev)
+static inline int devfreq_event_get_edev_count(struct device *dev,
+ const char *phandle_name)
{
return -EINVAL;
}