diff options
author | Mihail Atanassov <Mihail.Atanassov@arm.com> | 2019-08-28 14:03:49 +0300 |
---|---|---|
committer | Ayan kumar halder <ayan.halder@arm.com> | 2019-09-03 16:12:59 +0300 |
commit | 5fcd055193c5d4cac6d205bd65e52c957ea057c2 (patch) | |
tree | 56b5909c832f4ad66f643588624e5aaf9540f72c /drivers/gpu/drm/arm | |
parent | 6914f8eb64f9de5308e2968968145cf6eb304025 (diff) | |
download | linux-5fcd055193c5d4cac6d205bd65e52c957ea057c2.tar.xz |
drm/komeda: Add ACLK rate to sysfs
Expose node with the name 'aclk_hz'
Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Signed-off-by: Ayan kumar halder <ayan.halder@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190828110342.45936-1-mihail.atanassov@arm.com
Diffstat (limited to 'drivers/gpu/drm/arm')
-rw-r--r-- | drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c index 0142ee991957..e8d67395a3b9 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c @@ -91,9 +91,19 @@ config_id_show(struct device *dev, struct device_attribute *attr, char *buf) } static DEVICE_ATTR_RO(config_id); +static ssize_t +aclk_hz_show(struct device *dev, struct device_attribute *attr, char *buf) +{ + struct komeda_dev *mdev = dev_to_mdev(dev); + + return snprintf(buf, PAGE_SIZE, "%lu\n", clk_get_rate(mdev->aclk)); +} +static DEVICE_ATTR_RO(aclk_hz); + static struct attribute *komeda_sysfs_entries[] = { &dev_attr_core_id.attr, &dev_attr_config_id.attr, + &dev_attr_aclk_hz.attr, NULL, }; |