diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c b/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c index 8eaee190..0c94e246 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c | |||
@@ -384,32 +384,6 @@ static ssize_t is_railgated_show(struct device *dev, | |||
384 | } | 384 | } |
385 | static DEVICE_ATTR(is_railgated, S_IRUGO, is_railgated_show, NULL); | 385 | static DEVICE_ATTR(is_railgated, S_IRUGO, is_railgated_show, NULL); |
386 | 386 | ||
387 | static ssize_t clockgate_delay_store(struct device *dev, | ||
388 | struct device_attribute *attr, | ||
389 | const char *buf, size_t count) | ||
390 | { | ||
391 | struct gk20a_platform *platform = dev_get_drvdata(dev); | ||
392 | int clockgate_delay = 0, ret = 0; | ||
393 | |||
394 | ret = sscanf(buf, "%d", &clockgate_delay); | ||
395 | if (ret == 1 && clockgate_delay >= 0) { | ||
396 | platform->clockgate_delay = clockgate_delay; | ||
397 | pm_runtime_set_autosuspend_delay(dev, | ||
398 | platform->clockgate_delay); | ||
399 | } else | ||
400 | dev_err(dev, "Invalid clockgate delay\n"); | ||
401 | |||
402 | return count; | ||
403 | } | ||
404 | static ssize_t clockgate_delay_show(struct device *dev, | ||
405 | struct device_attribute *attr, char *buf) | ||
406 | { | ||
407 | struct gk20a_platform *platform = dev_get_drvdata(dev); | ||
408 | return snprintf(buf, PAGE_SIZE, "%d\n", platform->clockgate_delay); | ||
409 | } | ||
410 | static DEVICE_ATTR(clockgate_delay, ROOTRW, clockgate_delay_show, | ||
411 | clockgate_delay_store); | ||
412 | |||
413 | static ssize_t counters_show(struct device *dev, | 387 | static ssize_t counters_show(struct device *dev, |
414 | struct device_attribute *attr, char *buf) | 388 | struct device_attribute *attr, char *buf) |
415 | { | 389 | { |
@@ -801,7 +775,6 @@ void gk20a_remove_sysfs(struct device *dev) | |||
801 | device_remove_file(dev, &dev_attr_load); | 775 | device_remove_file(dev, &dev_attr_load); |
802 | device_remove_file(dev, &dev_attr_railgate_delay); | 776 | device_remove_file(dev, &dev_attr_railgate_delay); |
803 | device_remove_file(dev, &dev_attr_is_railgated); | 777 | device_remove_file(dev, &dev_attr_is_railgated); |
804 | device_remove_file(dev, &dev_attr_clockgate_delay); | ||
805 | #ifdef CONFIG_PM | 778 | #ifdef CONFIG_PM |
806 | device_remove_file(dev, &dev_attr_force_idle); | 779 | device_remove_file(dev, &dev_attr_force_idle); |
807 | #if defined(CONFIG_PM_GENERIC_DOMAINS) | 780 | #if defined(CONFIG_PM_GENERIC_DOMAINS) |
@@ -843,7 +816,6 @@ void gk20a_create_sysfs(struct device *dev) | |||
843 | error |= device_create_file(dev, &dev_attr_load); | 816 | error |= device_create_file(dev, &dev_attr_load); |
844 | error |= device_create_file(dev, &dev_attr_railgate_delay); | 817 | error |= device_create_file(dev, &dev_attr_railgate_delay); |
845 | error |= device_create_file(dev, &dev_attr_is_railgated); | 818 | error |= device_create_file(dev, &dev_attr_is_railgated); |
846 | error |= device_create_file(dev, &dev_attr_clockgate_delay); | ||
847 | #ifdef CONFIG_PM | 819 | #ifdef CONFIG_PM |
848 | error |= device_create_file(dev, &dev_attr_force_idle); | 820 | error |= device_create_file(dev, &dev_attr_force_idle); |
849 | #if defined(CONFIG_PM_GENERIC_DOMAINS) | 821 | #if defined(CONFIG_PM_GENERIC_DOMAINS) |