#include "habanalabs.h"
#include <linux/pci.h>
#include <linux/types.h>
static ssize_t clk_max_freq_mhz_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static ssize_t clk_max_freq_mhz_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static ssize_t clk_cur_freq_mhz_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RW(clk_max_freq_mhz);
static DEVICE_ATTR_RO(clk_cur_freq_mhz);
static struct attribute *hl_dev_clk_attrs[] = …;
static ssize_t vrm_ver_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(vrm_ver);
static struct attribute *hl_dev_vrm_attrs[] = …;
static ssize_t uboot_ver_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static ssize_t armcp_kernel_ver_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t armcp_ver_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static ssize_t cpld_ver_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static ssize_t cpucp_kernel_ver_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t cpucp_ver_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static ssize_t fuse_ver_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static ssize_t thermal_ver_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t fw_os_ver_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t preboot_btl_ver_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t soft_reset_store(struct device *dev,
struct device_attribute *attr, const char *buf,
size_t count)
{ … }
static ssize_t hard_reset_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static ssize_t device_type_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t pci_addr_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static ssize_t status_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static ssize_t soft_reset_cnt_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t hard_reset_cnt_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t max_power_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static ssize_t max_power_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{ … }
static ssize_t eeprom_read_handler(struct file *filp, struct kobject *kobj,
struct bin_attribute *attr, char *buf, loff_t offset,
size_t max_size)
{ … }
static ssize_t security_enabled_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t module_id_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t parent_device_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(armcp_kernel_ver);
static DEVICE_ATTR_RO(armcp_ver);
static DEVICE_ATTR_RO(cpld_ver);
static DEVICE_ATTR_RO(cpucp_kernel_ver);
static DEVICE_ATTR_RO(cpucp_ver);
static DEVICE_ATTR_RO(device_type);
static DEVICE_ATTR_RO(fuse_ver);
static DEVICE_ATTR_WO(hard_reset);
static DEVICE_ATTR_RO(hard_reset_cnt);
static DEVICE_ATTR_RW(max_power);
static DEVICE_ATTR_RO(pci_addr);
static DEVICE_ATTR_RO(preboot_btl_ver);
static DEVICE_ATTR_WO(soft_reset);
static DEVICE_ATTR_RO(soft_reset_cnt);
static DEVICE_ATTR_RO(status);
static DEVICE_ATTR_RO(thermal_ver);
static DEVICE_ATTR_RO(uboot_ver);
static DEVICE_ATTR_RO(fw_os_ver);
static DEVICE_ATTR_RO(security_enabled);
static DEVICE_ATTR_RO(module_id);
static DEVICE_ATTR_RO(parent_device);
static struct bin_attribute bin_attr_eeprom = …;
static struct attribute *hl_dev_attrs[] = …;
static struct bin_attribute *hl_dev_bin_attrs[] = …;
static struct attribute_group hl_dev_attr_group = …;
static struct attribute_group hl_dev_clks_attr_group;
static struct attribute_group hl_dev_vrm_attr_group;
static const struct attribute_group *hl_dev_attr_groups[] = …;
static struct attribute *hl_dev_inference_attrs[] = …;
static struct attribute_group hl_dev_inference_attr_group = …;
static const struct attribute_group *hl_dev_inference_attr_groups[] = …;
void hl_sysfs_add_dev_clk_attr(struct hl_device *hdev, struct attribute_group *dev_clk_attr_grp)
{ … }
void hl_sysfs_add_dev_vrm_attr(struct hl_device *hdev, struct attribute_group *dev_vrm_attr_grp)
{ … }
int hl_sysfs_init(struct hl_device *hdev)
{ … }
void hl_sysfs_fini(struct hl_device *hdev)
{ … }