Commit be028a36 authored by Oded Gabbay's avatar Oded Gabbay

habanalabs: rename dev_attr_grp to dev_clk_attr_grp

In this attribute group we are only adding clocks. This is in
preparation for adding a device specific attribute group which is
not related to clocks.
Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
parent 7ae439a0
...@@ -1286,8 +1286,7 @@ struct hl_asic_funcs { ...@@ -1286,8 +1286,7 @@ struct hl_asic_funcs {
bool user_address, u64 val); bool user_address, u64 val);
int (*debugfs_read_dma)(struct hl_device *hdev, u64 addr, u32 size, int (*debugfs_read_dma)(struct hl_device *hdev, u64 addr, u32 size,
void *blob_addr); void *blob_addr);
void (*add_device_attr)(struct hl_device *hdev, void (*add_device_attr)(struct hl_device *hdev, struct attribute_group *dev_clk_attr_grp);
struct attribute_group *dev_attr_grp);
void (*handle_eqe)(struct hl_device *hdev, void (*handle_eqe)(struct hl_device *hdev,
struct hl_eq_entry *eq_entry); struct hl_eq_entry *eq_entry);
void* (*get_events_stat)(struct hl_device *hdev, bool aggregate, void* (*get_events_stat)(struct hl_device *hdev, bool aggregate,
...@@ -3106,7 +3105,7 @@ int hl_set_power(struct hl_device *hdev, int sensor_index, u32 attr, long value) ...@@ -3106,7 +3105,7 @@ int hl_set_power(struct hl_device *hdev, int sensor_index, u32 attr, long value)
int hl_get_power(struct hl_device *hdev, int sensor_index, u32 attr, long *value); int hl_get_power(struct hl_device *hdev, int sensor_index, u32 attr, long *value);
int hl_fw_get_clk_rate(struct hl_device *hdev, u32 *cur_clk, u32 *max_clk); int hl_fw_get_clk_rate(struct hl_device *hdev, u32 *cur_clk, u32 *max_clk);
void hl_fw_set_pll_profile(struct hl_device *hdev); void hl_fw_set_pll_profile(struct hl_device *hdev);
void hl_sysfs_add_dev_clk_attr(struct hl_device *hdev, struct attribute_group *dev_attr_grp); void hl_sysfs_add_dev_clk_attr(struct hl_device *hdev, struct attribute_group *dev_clk_attr_grp);
void hw_sob_get(struct hl_hw_sob *hw_sob); void hw_sob_get(struct hl_hw_sob *hw_sob);
void hw_sob_put(struct hl_hw_sob *hw_sob); void hw_sob_put(struct hl_hw_sob *hw_sob);
......
...@@ -426,9 +426,9 @@ static const struct attribute_group *hl_dev_inference_attr_groups[] = { ...@@ -426,9 +426,9 @@ static const struct attribute_group *hl_dev_inference_attr_groups[] = {
NULL, NULL,
}; };
void hl_sysfs_add_dev_clk_attr(struct hl_device *hdev, struct attribute_group *dev_attr_grp) void hl_sysfs_add_dev_clk_attr(struct hl_device *hdev, struct attribute_group *dev_clk_attr_grp)
{ {
dev_attr_grp->attrs = hl_dev_clk_attrs; dev_clk_attr_grp->attrs = hl_dev_clk_attrs;
} }
int hl_sysfs_init(struct hl_device *hdev) int hl_sysfs_init(struct hl_device *hdev)
......
/* SPDX-License-Identifier: GPL-2.0 /* SPDX-License-Identifier: GPL-2.0
* *
* Copyright 2016-2019 HabanaLabs, Ltd. * Copyright 2016-2022 HabanaLabs, Ltd.
* All Rights Reserved. * All Rights Reserved.
* *
*/ */
...@@ -217,8 +217,7 @@ u64 goya_get_max_power(struct hl_device *hdev); ...@@ -217,8 +217,7 @@ u64 goya_get_max_power(struct hl_device *hdev);
void goya_set_max_power(struct hl_device *hdev, u64 value); void goya_set_max_power(struct hl_device *hdev, u64 value);
void goya_set_pll_profile(struct hl_device *hdev, enum hl_pll_frequency freq); void goya_set_pll_profile(struct hl_device *hdev, enum hl_pll_frequency freq);
void goya_add_device_attr(struct hl_device *hdev, void goya_add_device_attr(struct hl_device *hdev, struct attribute_group *dev_clk_attr_grp);
struct attribute_group *dev_attr_grp);
int goya_cpucp_info_get(struct hl_device *hdev); int goya_cpucp_info_get(struct hl_device *hdev);
int goya_debug_coresight(struct hl_device *hdev, struct hl_ctx *ctx, void *data); int goya_debug_coresight(struct hl_device *hdev, struct hl_ctx *ctx, void *data);
void goya_halt_coresight(struct hl_device *hdev, struct hl_ctx *ctx); void goya_halt_coresight(struct hl_device *hdev, struct hl_ctx *ctx);
......
...@@ -350,7 +350,7 @@ static DEVICE_ATTR_RW(pm_mng_profile); ...@@ -350,7 +350,7 @@ static DEVICE_ATTR_RW(pm_mng_profile);
static DEVICE_ATTR_RW(tpc_clk); static DEVICE_ATTR_RW(tpc_clk);
static DEVICE_ATTR_RO(tpc_clk_curr); static DEVICE_ATTR_RO(tpc_clk_curr);
static struct attribute *goya_dev_attrs[] = { static struct attribute *goya_clk_dev_attrs[] = {
&dev_attr_high_pll.attr, &dev_attr_high_pll.attr,
&dev_attr_ic_clk.attr, &dev_attr_ic_clk.attr,
&dev_attr_ic_clk_curr.attr, &dev_attr_ic_clk_curr.attr,
...@@ -362,8 +362,7 @@ static struct attribute *goya_dev_attrs[] = { ...@@ -362,8 +362,7 @@ static struct attribute *goya_dev_attrs[] = {
NULL, NULL,
}; };
void goya_add_device_attr(struct hl_device *hdev, void goya_add_device_attr(struct hl_device *hdev, struct attribute_group *dev_clk_attr_grp)
struct attribute_group *dev_attr_grp)
{ {
dev_attr_grp->attrs = goya_dev_attrs; dev_clk_attr_grp->attrs = goya_clk_dev_attrs;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment