Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Mihail Atanassov and committed by
Ayan kumar halder
5fcd0551 6914f8eb

+10
+10
drivers/gpu/drm/arm/display/komeda/komeda_dev.c
··· 91 91 } 92 92 static DEVICE_ATTR_RO(config_id); 93 93 94 + static ssize_t 95 + aclk_hz_show(struct device *dev, struct device_attribute *attr, char *buf) 96 + { 97 + struct komeda_dev *mdev = dev_to_mdev(dev); 98 + 99 + return snprintf(buf, PAGE_SIZE, "%lu\n", clk_get_rate(mdev->aclk)); 100 + } 101 + static DEVICE_ATTR_RO(aclk_hz); 102 + 94 103 static struct attribute *komeda_sysfs_entries[] = { 95 104 &dev_attr_core_id.attr, 96 105 &dev_attr_config_id.attr, 106 + &dev_attr_aclk_hz.attr, 97 107 NULL, 98 108 }; 99 109