| /linux/drivers/net/ethernet/mellanox/mlx5/core/ |
| H A D | hwmon.c | 86 struct mlx5_hwmon *hwmon = dev_get_drvdata(dev); in mlx5_hwmon_read() local 93 err = mlx5_hwmon_query_mtmp(hwmon->mdev, hwmon->temp_channel_desc[channel].sensor_index, in mlx5_hwmon_read() 116 struct mlx5_hwmon *hwmon = dev_get_drvdata(dev); in mlx5_hwmon_write() local 121 return mlx5_hwmon_reset_max_temp(hwmon->mdev, in mlx5_hwmon_write() 122 hwmon->temp_channel_desc[channel].sensor_index); in mlx5_hwmon_write() 147 struct mlx5_hwmon *hwmon = dev_get_drvdata(dev); in mlx5_hwmon_read_string() local 152 *str = (const char *)hwmon->temp_channel_desc[channel].sensor_name; in mlx5_hwmon_read_string() 163 static int mlx5_hwmon_init_channels_names(struct mlx5_hwmon *hwmon) in mlx5_hwmon_init_channels_names() argument 167 for (i = 0; i < hwmon->asic_platform_scount + hwmon->module_scount; i++) { in mlx5_hwmon_init_channels_names() 172 err = mlx5_hwmon_query_mtmp(hwmon->mdev, hwmon->temp_channel_desc[i].sensor_index, in mlx5_hwmon_init_channels_names() [all …]
|
| /linux/drivers/hwmon/ |
| H A D | macsmc-hwmon.c | 95 struct macsmc_hwmon *hwmon = dev_get_drvdata(dev); in macsmc_hwmon_read_label() local 99 *str = hwmon->temp.sensors[channel].label; in macsmc_hwmon_read_label() 102 *str = hwmon->volt.sensors[channel].label; in macsmc_hwmon_read_label() 105 *str = hwmon->curr.sensors[channel].label; in macsmc_hwmon_read_label() 108 *str = hwmon->power.sensors[channel].label; in macsmc_hwmon_read_label() 111 *str = hwmon->fan.fans[channel].label; in macsmc_hwmon_read_label() 271 static int macsmc_hwmon_read_fan(struct macsmc_hwmon *hwmon, u32 attr, int chan, in macsmc_hwmon_read_fan() argument 276 return macsmc_hwmon_read_key(hwmon->smc, in macsmc_hwmon_read_fan() 277 &hwmon->fan.fans[chan].now, 1, val); in macsmc_hwmon_read_fan() 279 return macsmc_hwmon_read_key(hwmon->smc, in macsmc_hwmon_read_fan() [all …]
|
| H A D | lan966x-hwmon.c | 79 struct lan966x_hwmon *hwmon = dev_get_drvdata(dev); in lan966x_hwmon_read_temp() local 83 ret = regmap_read(hwmon->regmap_pvt, PVT_SENSOR_STAT, &data); in lan966x_hwmon_read_temp() 98 struct lan966x_hwmon *hwmon = dev_get_drvdata(dev); in lan966x_hwmon_read_fan() local 102 ret = regmap_read(hwmon->regmap_fan, FAN_CNT, &data); in lan966x_hwmon_read_fan() 117 struct lan966x_hwmon *hwmon = dev_get_drvdata(dev); in lan966x_hwmon_read_pwm() local 121 ret = regmap_read(hwmon->regmap_fan, FAN_CFG, &data); in lan966x_hwmon_read_pwm() 132 struct lan966x_hwmon *hwmon = dev_get_drvdata(dev); in lan966x_hwmon_read_pwm_freq() local 137 ret = regmap_read(hwmon->regmap_fan, FAN_PWM_FREQ, &data); in lan966x_hwmon_read_pwm_freq() 146 tmp = DIV_ROUND_CLOSEST(hwmon->clk_rate, 256); in lan966x_hwmon_read_pwm_freq() 176 struct lan966x_hwmon *hwmon = dev_get_drvdata(dev); in lan966x_hwmon_write_pwm() local [all …]
|
| H A D | sparx5-temp.c | 28 static void s5_temp_enable(struct s5_hwmon *hwmon) in s5_temp_enable() argument 30 u32 val = readl(hwmon->base + TEMP_CFG); in s5_temp_enable() 31 u32 clk = clk_get_rate(hwmon->clk) / USEC_PER_SEC; in s5_temp_enable() 37 writel(val, hwmon->base + TEMP_CFG); in s5_temp_enable() 43 struct s5_hwmon *hwmon = dev_get_drvdata(dev); in s5_read() local 49 stat = readl_relaxed(hwmon->base + TEMP_STAT); in s5_read() 107 struct s5_hwmon *hwmon; in s5_temp_probe() local 109 hwmon = devm_kzalloc(&pdev->dev, sizeof(*hwmon), GFP_KERNEL); in s5_temp_probe() 110 if (!hwmon) in s5_temp_probe() 113 hwmon->base = devm_platform_ioremap_resource(pdev, 0); in s5_temp_probe() [all …]
|
| H A D | as370-hwmon.c | 31 static void init_pvt(struct as370_hwmon *hwmon) in init_pvt() argument 34 void __iomem *addr = hwmon->base + CTRL; in init_pvt() 50 struct as370_hwmon *hwmon = dev_get_drvdata(dev); in as370_hwmon_read() local 54 val = readl_relaxed(hwmon->base + STS) & BN_MASK; in as370_hwmon_read() 97 struct as370_hwmon *hwmon; in as370_hwmon_probe() local 100 hwmon = devm_kzalloc(dev, sizeof(*hwmon), GFP_KERNEL); in as370_hwmon_probe() 101 if (!hwmon) in as370_hwmon_probe() 104 hwmon->base = devm_platform_ioremap_resource(pdev, 0); in as370_hwmon_probe() 105 if (IS_ERR(hwmon->base)) in as370_hwmon_probe() 106 return PTR_ERR(hwmon->base); in as370_hwmon_probe() [all …]
|
| H A D | sl28cpld-hwmon.c | 29 struct sl28cpld_hwmon *hwmon = dev_get_drvdata(dev); in sl28cpld_hwmon_read() local 35 ret = regmap_read(hwmon->regmap, hwmon->offset + FAN_INPUT, in sl28cpld_hwmon_read() 79 struct sl28cpld_hwmon *hwmon; in sl28cpld_hwmon_probe() local 86 hwmon = devm_kzalloc(&pdev->dev, sizeof(*hwmon), GFP_KERNEL); in sl28cpld_hwmon_probe() 87 if (!hwmon) in sl28cpld_hwmon_probe() 90 hwmon->regmap = dev_get_regmap(pdev->dev.parent, NULL); in sl28cpld_hwmon_probe() 91 if (!hwmon->regmap) in sl28cpld_hwmon_probe() 94 ret = device_property_read_u32(&pdev->dev, "reg", &hwmon->offset); in sl28cpld_hwmon_probe() 99 "sl28cpld_hwmon", hwmon, in sl28cpld_hwmon_probe()
|
| H A D | cgbc-hwmon.c | 111 static int cgbc_hwmon_probe_sensors(struct device *dev, struct cgbc_hwmon_data *hwmon) in cgbc_hwmon_probe_sensors() argument 113 struct cgbc_device_data *cgbc = hwmon->cgbc; in cgbc_hwmon_probe_sensors() 114 struct cgbc_hwmon_sensor *sensor = hwmon->sensors; in cgbc_hwmon_probe_sensors() 124 hwmon->sensors = devm_kzalloc(dev, sizeof(*hwmon->sensors) * nb_sensors, GFP_KERNEL); in cgbc_hwmon_probe_sensors() 125 if (!hwmon->sensors) in cgbc_hwmon_probe_sensors() 128 sensor = hwmon->sensors; in cgbc_hwmon_probe_sensors() 191 hwmon->nb_sensors++; in cgbc_hwmon_probe_sensors() 197 static struct cgbc_hwmon_sensor *cgbc_hwmon_find_sensor(struct cgbc_hwmon_data *hwmon, in cgbc_hwmon_find_sensor() argument 203 for (i = 0; i < hwmon->nb_sensors; i++) { in cgbc_hwmon_find_sensor() 204 if (hwmon->sensors[i].type == type && hwmon->sensors[i].channel == channel) { in cgbc_hwmon_find_sensor() [all …]
|
| H A D | smpro-hwmon.c | 207 struct smpro_hwmon *hwmon = dev_get_drvdata(dev); in smpro_read_temp() local 213 ret = regmap_read(hwmon->regmap, temperature[channel].reg, &value); in smpro_read_temp() 218 ret = regmap_read(hwmon->regmap, temperature[channel].reg_ext, &value); in smpro_read_temp() 232 struct smpro_hwmon *hwmon = dev_get_drvdata(dev); in smpro_read_in() local 238 ret = regmap_read(hwmon->regmap, voltage[channel].reg, &value); in smpro_read_in() 251 struct smpro_hwmon *hwmon = dev_get_drvdata(dev); in smpro_read_curr() local 257 ret = regmap_read(hwmon->regmap, curr_sensor[channel].reg, &value); in smpro_read_curr() 270 struct smpro_hwmon *hwmon = dev_get_drvdata(dev); in smpro_read_power() local 276 ret = regmap_read(hwmon->regmap, power[channel].reg, &val); in smpro_read_power() 280 ret = regmap_read(hwmon->regmap, power[channel].reg_ext, &val_mw); in smpro_read_power() [all …]
|
| /linux/Documentation/ABI/stable/ |
| H A D | sysfs-driver-mlxreg-io | 1 What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/asic_health 10 What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/cpld1_version 11 What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/cpld2_version 20 What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/fan_dir 30 What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/cpld3_version 39 What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/jtag_enable 48 What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/select_iio 59 What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/psu1_on 60 /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/psu2_on 61 /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/pwr_cycle [all …]
|
| /linux/drivers/thermal/ |
| H A D | thermal_hwmon.c | 95 struct thermal_hwmon_device *hwmon; in thermal_hwmon_lookup_by_type() local 98 list_for_each_entry(hwmon, &thermal_hwmon_list, node) { in thermal_hwmon_lookup_by_type() 101 if (!strcmp(hwmon->type, type)) in thermal_hwmon_lookup_by_type() 102 return hwmon; in thermal_hwmon_lookup_by_type() 116 struct thermal_hwmon_device *hwmon; in thermal_add_hwmon_sysfs() local 123 hwmon = thermal_hwmon_lookup_by_type(tz); in thermal_add_hwmon_sysfs() 124 if (hwmon) { in thermal_add_hwmon_sysfs() 129 hwmon = kzalloc_obj(*hwmon); in thermal_add_hwmon_sysfs() 130 if (!hwmon) { in thermal_add_hwmon_sysfs() 135 INIT_LIST_HEAD(&hwmon->tz_list); in thermal_add_hwmon_sysfs() [all …]
|
| /linux/drivers/net/ethernet/sfc/ |
| H A D | mcdi_mon.c | 146 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); in efx_mcdi_mon_update() local 151 hwmon->dma_buf.dma_addr); in efx_mcdi_mon_update() 152 MCDI_SET_DWORD(inbuf, READ_SENSORS_EXT_IN_LENGTH, hwmon->dma_buf.len); in efx_mcdi_mon_update() 157 hwmon->last_update = jiffies; in efx_mcdi_mon_update() 165 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); in efx_mcdi_mon_get_entry() local 170 mutex_lock(&hwmon->update_lock); in efx_mcdi_mon_get_entry() 173 if (time_before(jiffies, hwmon->last_update + HZ)) in efx_mcdi_mon_get_entry() 179 *entry = ((efx_dword_t *)hwmon->dma_buf.addr)[index]; in efx_mcdi_mon_get_entry() 181 mutex_unlock(&hwmon->update_lock); in efx_mcdi_mon_get_entry() 285 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); in efx_mcdi_mon_add_attr() local [all …]
|
| /linux/drivers/net/ethernet/sfc/siena/ |
| H A D | mcdi_mon.c | 146 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); in efx_mcdi_mon_update() local 151 hwmon->dma_buf.dma_addr); in efx_mcdi_mon_update() 152 MCDI_SET_DWORD(inbuf, READ_SENSORS_EXT_IN_LENGTH, hwmon->dma_buf.len); in efx_mcdi_mon_update() 157 hwmon->last_update = jiffies; in efx_mcdi_mon_update() 165 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); in efx_mcdi_mon_get_entry() local 170 mutex_lock(&hwmon->update_lock); in efx_mcdi_mon_get_entry() 173 if (time_before(jiffies, hwmon->last_update + HZ)) in efx_mcdi_mon_get_entry() 179 *entry = ((efx_dword_t *)hwmon->dma_buf.addr)[index]; in efx_mcdi_mon_get_entry() 181 mutex_unlock(&hwmon->update_lock); in efx_mcdi_mon_get_entry() 285 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); in efx_mcdi_mon_add_attr() local [all …]
|
| /linux/Documentation/ABI/testing/ |
| H A D | sysfs-driver-intel-i915-hwmon | 1 What: /sys/bus/pci/drivers/i915/.../hwmon/hwmon<i>/in0_input 9 What: /sys/bus/pci/drivers/i915/.../hwmon/hwmon<i>/power1_max 23 What: /sys/bus/pci/drivers/i915/.../hwmon/hwmon<i>/power1_rated_max 31 What: /sys/bus/pci/drivers/i915/.../hwmon/hwmon<i>/power1_max_interval 40 What: /sys/bus/pci/drivers/i915/.../hwmon/hwmon<i>/power1_crit 53 What: /sys/bus/pci/drivers/i915/.../hwmon/hwmon<i>/curr1_crit 66 What: /sys/bus/pci/drivers/i915/.../hwmon/hwmon<i>/energy1_input 72 For i915 device level hwmon devices (name "i915") this 74 hwmon devices (name "i915_gtN") this reflects energy input 79 What: /sys/bus/pci/drivers/i915/.../hwmon/hwmon<i>/fan1_input [all …]
|
| H A D | sysfs-platform-dfl-fme | 110 What: /sys/bus/platform/devices/dfl-fme.0/hwmon/hwmonX/name 114 Description: Read-Only. Read this file to get the name of hwmon device, it 118 'dfl_fme_thermal' thermal hwmon device name 119 'dfl_fme_power' power hwmon device name 122 What: /sys/bus/platform/devices/dfl-fme.0/hwmon/hwmonX/temp1_input 129 What: /sys/bus/platform/devices/dfl-fme.0/hwmon/hwmonX/temp1_max 138 What: /sys/bus/platform/devices/dfl-fme.0/hwmon/hwmonX/temp1_crit 146 What: /sys/bus/platform/devices/dfl-fme.0/hwmon/hwmonX/temp1_emergency 155 What: /sys/bus/platform/devices/dfl-fme.0/hwmon/hwmonX/temp1_max_alarm 162 What: /sys/bus/platform/devices/dfl-fme.0/hwmon/hwmonX/temp1_crit_alarm [all …]
|
| /linux/drivers/hwmon/occ/ |
| H A D | Makefile | 2 occ-hwmon-common-objs := common.o sysfs.o 3 occ-p8-hwmon-objs := p8_i2c.o 4 occ-p9-hwmon-objs := p9_sbe.o 6 obj-$(CONFIG_SENSORS_OCC) += occ-hwmon-common.o 7 obj-$(CONFIG_SENSORS_OCC_P8_I2C) += occ-p8-hwmon.o 8 obj-$(CONFIG_SENSORS_OCC_P9_SBE) += occ-p9-hwmon.o
|
| /linux/drivers/net/ethernet/meta/fbnic/ |
| H A D | fbnic_hwmon.c | 63 fbd->hwmon = hwmon_device_register_with_info(fbd->dev, "fbnic", in fbnic_hwmon_register() 66 if (IS_ERR(fbd->hwmon)) { in fbnic_hwmon_register() 69 fbd->hwmon); in fbnic_hwmon_register() 70 fbd->hwmon = NULL; in fbnic_hwmon_register() 76 if (!IS_REACHABLE(CONFIG_HWMON) || !fbd->hwmon) in fbnic_hwmon_unregister() 79 hwmon_device_unregister(fbd->hwmon); in fbnic_hwmon_unregister() 80 fbd->hwmon = NULL; in fbnic_hwmon_unregister()
|
| /linux/arch/arm64/boot/dts/renesas/ |
| H A D | r8a779g3-sparrow-hawk-fan-argon40.dtso | 10 * # Localize hwmon sysfs directory that matches the PWM fan, 12 * r8a779g3-sparrow-hawk$ ls -1 /sys/devices/platform/pwm-fan-ext/hwmon/hwmon?/pwm?_enable 13 * /sys/devices/platform/pwm-fan-ext/hwmon/hwmon0/pwm1_enable 16 * # For details, see Linux Documentation/hwmon/pwm-fan.rst 17 * r8a779g3-sparrow-hawk$ echo 2 > /sys/devices/platform/pwm-fan-ext/hwmon/hwmon0/pwm1_enable 21 * r8a779g3-sparrow-hawk$ echo 101 > /sys/devices/platform/pwm-fan-ext/hwmon/hwmon0/pwm1
|
| /linux/drivers/net/ethernet/mellanox/mlxsw/ |
| H A D | core_hwmon.c | 46 struct mlxsw_hwmon *hwmon; member 72 struct mlxsw_hwmon *mlxsw_hwmon = mlxsw_hwmon_dev->hwmon; in mlxsw_hwmon_temp_show() 97 struct mlxsw_hwmon *mlxsw_hwmon = mlxsw_hwmon_dev->hwmon; in mlxsw_hwmon_temp_max_show() 122 struct mlxsw_hwmon *mlxsw_hwmon = mlxsw_hwmon_dev->hwmon; in mlxsw_hwmon_temp_rst_store() 159 struct mlxsw_hwmon *mlxsw_hwmon = mlxsw_hwmon_dev->hwmon; in mlxsw_hwmon_fan_rpm_show() 179 struct mlxsw_hwmon *mlxsw_hwmon = mlxsw_hwmon_dev->hwmon; in mlxsw_hwmon_fan_fault_show() 201 struct mlxsw_hwmon *mlxsw_hwmon = mlxsw_hwmon_dev->hwmon; in mlxsw_hwmon_pwm_show() 222 struct mlxsw_hwmon *mlxsw_hwmon = mlxsw_hwmon_dev->hwmon; in mlxsw_hwmon_pwm_store() 249 struct mlxsw_hwmon *mlxsw_hwmon = mlxsw_hwmon_dev->hwmon; in mlxsw_hwmon_module_temp_get() 288 struct mlxsw_hwmon *mlxsw_hwmon = mlxsw_hwmon_dev->hwmon; in mlxsw_hwmon_module_temp_fault_show() [all …]
|
| /linux/drivers/gpu/drm/nouveau/ |
| H A D | nouveau_hwmon.c | 671 struct nouveau_hwmon *hwmon; in nouveau_hwmon_init() local 681 hwmon = drm->hwmon = kzalloc_obj(*hwmon); in nouveau_hwmon_init() 682 if (!hwmon) in nouveau_hwmon_init() 684 hwmon->dev = dev; in nouveau_hwmon_init() 703 hwmon->hwmon = hwmon_dev; in nouveau_hwmon_init() 714 struct nouveau_hwmon *hwmon = nouveau_hwmon(dev); in nouveau_hwmon_fini() local 716 if (!hwmon) in nouveau_hwmon_fini() 719 if (hwmon->hwmon) in nouveau_hwmon_fini() 720 hwmon_device_unregister(hwmon->hwmon); in nouveau_hwmon_fini() 722 nouveau_drm(dev)->hwmon = NULL; in nouveau_hwmon_fini() [all …]
|
| /linux/Documentation/hwmon/ |
| H A D | sbrmi.rst | 47 Power sensors can be queried and set via the standard ``hwmon`` interface 48 on ``sysfs``, under the directory ``/sys/class/hwmon/hwmonX`` for some value 49 of ``X`` (search for the ``X`` such that ``/sys/class/hwmon/hwmonX/name`` has 74 # cat /sys/class/hwmon/hwmon1/power1_cap_max 77 # echo 180000000 > /sys/class/hwmon/hwmon1/power1_cap 78 # cat /sys/class/hwmon/hwmon1/power1_cap
|
| H A D | sch5636.rst | 20 their own custom hwmon solution based upon the SCH5636. 23 hwmon solution. The sch5636 driver runs a sanity check on loading to ensure 25 hwmon solution. 32 The Fujitsu Theseus hwmon solution also contains an integrated watchdog.
|
| H A D | hwmon-kernel-api.rst | 12 This document does not describe what a hardware monitoring (hwmon) Driver or 15 then please read the following file: Documentation/hwmon/sysfs-interface.rst. 17 For additional guidelines on how to write and improve hwmon drivers, please 18 also read Documentation/hwmon/submitting-patches.rst. 22 Each hardware monitoring driver must #include <linux/hwmon.h> and, in some 23 cases, <linux/hwmon-sysfs.h>. linux/hwmon.h declares the following 60 hwmon device does not have to be removed explicitly by the removal function. 71 All supported hwmon device registration functions only accept valid device 98 condition) occurs or clears. The parameters are the hwmon device, the sensor 140 The list of hwmon operations is defined as:: [all …]
|
| /linux/drivers/vdpa/solidrun/ |
| H A D | snet_hwmon.c | 179 struct device *hwmon; in psnet_create_hwmon() local 183 hwmon = devm_hwmon_device_register_with_info(&pdev->dev, psnet->hwmon_name, psnet, in psnet_create_hwmon() 186 if (IS_ERR(hwmon)) in psnet_create_hwmon() 187 SNET_WARN(pdev, "Failed to create SNET hwmon, error %ld\n", PTR_ERR(hwmon)); in psnet_create_hwmon()
|
| /linux/drivers/nvme/host/ |
| H A D | hwmon.c | 230 struct device *hwmon; in nvme_hwmon_init() local 252 hwmon = hwmon_device_register_with_info(dev, "nvme", in nvme_hwmon_init() 255 if (IS_ERR(hwmon)) { in nvme_hwmon_init() 257 err = PTR_ERR(hwmon); in nvme_hwmon_init() 260 ctrl->hwmon_device = hwmon; in nvme_hwmon_init()
|
| /linux/Documentation/admin-guide/laptops/ |
| H A D | alienware-wmi.rst | 57 - :ref:`HWMON <hwmon>`: 95 The name of the hwmon class device exported by this driver is "alienware_wmi" 100 grep -l "alienware_wmi" /sys/class/hwmon/hwmon*/name | sed 's|/[^/]*$||' 103 :ref:`sysfs-class-hwmon <abi_file_testing_sysfs_class_hwmon>` for more 115 through the following, custom hwmon sysfs attribute:
|