Home
last modified time | relevance | path

Searched refs:hwmon (Results 1 – 25 of 136) sorted by relevance

123456

/Linux-v4.19/drivers/hwmon/
Djz4740-hwmon.c41 struct jz4740_hwmon *hwmon = data; in jz4740_hwmon_irq() local
43 complete(&hwmon->read_completion); in jz4740_hwmon_irq()
50 struct jz4740_hwmon *hwmon = dev_get_drvdata(dev); in in0_input_show() local
51 struct platform_device *pdev = hwmon->pdev; in in0_input_show()
52 struct completion *completion = &hwmon->read_completion; in in0_input_show()
57 mutex_lock(&hwmon->lock); in in0_input_show()
61 enable_irq(hwmon->irq); in in0_input_show()
62 hwmon->cell->enable(pdev); in in0_input_show()
67 val = readw(hwmon->base) & 0xfff; in in0_input_show()
74 hwmon->cell->disable(pdev); in in0_input_show()
[all …]
Dda9052-hwmon.c72 static inline int input_tsireg_to_mv(struct da9052_hwmon *hwmon, int value) in input_tsireg_to_mv() argument
74 return DIV_ROUND_CLOSEST(value * hwmon->tsiref_mv, 1023); in input_tsireg_to_mv()
93 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); in da9052_read_vddout() local
96 mutex_lock(&hwmon->hwmon_lock); in da9052_read_vddout()
98 ret = da9052_enable_vddout_channel(hwmon->da9052); in da9052_read_vddout()
102 vdd = da9052_reg_read(hwmon->da9052, DA9052_VDD_RES_REG); in da9052_read_vddout()
108 ret = da9052_disable_vddout_channel(hwmon->da9052); in da9052_read_vddout()
112 mutex_unlock(&hwmon->hwmon_lock); in da9052_read_vddout()
116 da9052_disable_vddout_channel(hwmon->da9052); in da9052_read_vddout()
118 mutex_unlock(&hwmon->hwmon_lock); in da9052_read_vddout()
[all …]
Dnsa320-hwmon.c80 struct nsa320_hwmon *hwmon = dev_get_drvdata(dev); in nsa320_hwmon_update() local
82 mutex_lock(&hwmon->update_lock); in nsa320_hwmon_update()
84 mcu_data = hwmon->mcu_data; in nsa320_hwmon_update()
86 if (time_after(jiffies, hwmon->last_updated + HZ) || mcu_data == 0) { in nsa320_hwmon_update()
87 gpiod_set_value(hwmon->act, 1); in nsa320_hwmon_update()
92 gpiod_set_value(hwmon->clk, 0); in nsa320_hwmon_update()
94 gpiod_set_value(hwmon->clk, 1); in nsa320_hwmon_update()
96 if (gpiod_get_value(hwmon->data)) in nsa320_hwmon_update()
100 gpiod_set_value(hwmon->act, 0); in nsa320_hwmon_update()
107 hwmon->mcu_data = mcu_data; in nsa320_hwmon_update()
[all …]
Dda9055-hwmon.c60 static int da9055_adc_manual_read(struct da9055_hwmon *hwmon, in da9055_adc_manual_read() argument
67 struct da9055 *da9055 = hwmon->da9055; in da9055_adc_manual_read()
72 mutex_lock(&hwmon->irq_lock); in da9055_adc_manual_read()
82 if (!wait_for_completion_timeout(&hwmon->done, in da9055_adc_manual_read()
107 mutex_unlock(&hwmon->irq_lock); in da9055_adc_manual_read()
113 struct da9055_hwmon *hwmon = irq_data; in da9055_auxadc_irq() local
115 complete(&hwmon->done); in da9055_auxadc_irq()
146 struct da9055_hwmon *hwmon = dev_get_drvdata(dev); in da9055_read_auto_ch() local
150 mutex_lock(&hwmon->hwmon_lock); in da9055_read_auto_ch()
152 ret = da9055_enable_auto_mode(hwmon->da9055, channel); in da9055_read_auto_ch()
[all …]
Ds3c-hwmon.c71 struct s3c_hwmon *hwmon, int channel) in s3c_hwmon_read_ch() argument
75 ret = mutex_lock_interruptible(&hwmon->lock); in s3c_hwmon_read_ch()
81 ret = s3c_adc_read(hwmon->client, channel); in s3c_hwmon_read_ch()
82 mutex_unlock(&hwmon->lock); in s3c_hwmon_read_ch()
167 struct s3c_hwmon *hwmon = platform_get_drvdata(to_platform_device(dev)); in s3c_hwmon_ch_show() local
174 ret = s3c_hwmon_read_ch(dev, hwmon, sen_attr->index); in s3c_hwmon_ch_show()
278 struct s3c_hwmon *hwmon; in s3c_hwmon_probe() local
287 hwmon = devm_kzalloc(&dev->dev, sizeof(struct s3c_hwmon), GFP_KERNEL); in s3c_hwmon_probe()
288 if (hwmon == NULL) in s3c_hwmon_probe()
291 platform_set_drvdata(dev, hwmon); in s3c_hwmon_probe()
[all …]
DMakefile6 obj-$(CONFIG_HWMON) += hwmon.o
7 obj-$(CONFIG_HWMON_VID) += hwmon-vid.o
49 obj-$(CONFIG_SENSORS_ARM_SCMI) += scmi-hwmon.o
50 obj-$(CONFIG_SENSORS_ARM_SCPI) += scpi-hwmon.o
55 obj-$(CONFIG_SENSORS_DA9052_ADC)+= da9052-hwmon.o
56 obj-$(CONFIG_SENSORS_DA9055)+= da9055-hwmon.o
57 obj-$(CONFIG_SENSORS_DELL_SMM) += dell-smm-hwmon.o
88 obj-$(CONFIG_SENSORS_JZ4740) += jz4740-hwmon.o
139 obj-$(CONFIG_SENSORS_NSA320) += nsa320-hwmon.o
146 obj-$(CONFIG_SENSORS_RASPBERRYPI_HWMON) += raspberrypi-hwmon.o
[all …]
Dpwm-fan.c212 struct device *hwmon; in pwm_fan_probe() local
243 hwmon = devm_hwmon_device_register_with_groups(&pdev->dev, "pwmfan", in pwm_fan_probe()
245 if (IS_ERR(hwmon)) { in pwm_fan_probe()
247 ret = PTR_ERR(hwmon); in pwm_fan_probe()
/Linux-v4.19/drivers/thermal/
Dthermal_hwmon.c89 struct thermal_hwmon_device *hwmon; in thermal_hwmon_lookup_by_type() local
92 list_for_each_entry(hwmon, &thermal_hwmon_list, node) in thermal_hwmon_lookup_by_type()
93 if (!strcmp(hwmon->type, tz->type)) { in thermal_hwmon_lookup_by_type()
95 return hwmon; in thermal_hwmon_lookup_by_type()
104 thermal_hwmon_lookup_temp(const struct thermal_hwmon_device *hwmon, in thermal_hwmon_lookup_temp() argument
110 list_for_each_entry(temp, &hwmon->tz_list, hwmon_node) in thermal_hwmon_lookup_temp()
128 struct thermal_hwmon_device *hwmon; in thermal_add_hwmon_sysfs() local
133 hwmon = thermal_hwmon_lookup_by_type(tz); in thermal_add_hwmon_sysfs()
134 if (hwmon) { in thermal_add_hwmon_sysfs()
139 hwmon = kzalloc(sizeof(*hwmon), GFP_KERNEL); in thermal_add_hwmon_sysfs()
[all …]
/Linux-v4.19/drivers/net/ethernet/sfc/
Dmcdi_mon.c149 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); in efx_mcdi_mon_update() local
154 hwmon->dma_buf.dma_addr); in efx_mcdi_mon_update()
155 MCDI_SET_DWORD(inbuf, READ_SENSORS_EXT_IN_LENGTH, hwmon->dma_buf.len); in efx_mcdi_mon_update()
160 hwmon->last_update = jiffies; in efx_mcdi_mon_update()
168 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); in efx_mcdi_mon_get_entry() local
173 mutex_lock(&hwmon->update_lock); in efx_mcdi_mon_get_entry()
176 if (time_before(jiffies, hwmon->last_update + HZ)) in efx_mcdi_mon_get_entry()
182 *entry = ((efx_dword_t *)hwmon->dma_buf.addr)[index]; in efx_mcdi_mon_get_entry()
184 mutex_unlock(&hwmon->update_lock); in efx_mcdi_mon_get_entry()
288 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); in efx_mcdi_mon_add_attr() local
[all …]
/Linux-v4.19/Documentation/ABI/stable/
Dsysfs-driver-mlxreg-io1 What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/
12 What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/
24 What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/select_iio
35 What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/psu1_on
36 /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/psu2_on
37 /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/pwr_cycle
38 /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/pwr_down
57 What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/
/Linux-v4.19/drivers/gpu/drm/nouveau/
Dnouveau_hwmon.c714 struct nouveau_hwmon *hwmon; in nouveau_hwmon_init() local
724 hwmon = drm->hwmon = kzalloc(sizeof(*hwmon), GFP_KERNEL); in nouveau_hwmon_init()
725 if (!hwmon) in nouveau_hwmon_init()
727 hwmon->dev = dev; in nouveau_hwmon_init()
746 hwmon->hwmon = hwmon_dev; in nouveau_hwmon_init()
757 struct nouveau_hwmon *hwmon = nouveau_hwmon(dev); in nouveau_hwmon_fini() local
759 if (!hwmon) in nouveau_hwmon_fini()
762 if (hwmon->hwmon) in nouveau_hwmon_fini()
763 hwmon_device_unregister(hwmon->hwmon); in nouveau_hwmon_fini()
765 nouveau_drm(dev)->hwmon = NULL; in nouveau_hwmon_fini()
[all …]
Dnouveau_hwmon.h30 struct device *hwmon; member
36 return nouveau_drm(dev)->hwmon; in nouveau_hwmon()
/Linux-v4.19/Documentation/hwmon/
Dhwmon-kernel-api.txt12 This document does not describe what a hardware monitoring (hwmon) Driver or
15 then please read the following file: Documentation/hwmon/sysfs-interface.
17 For additional guidelines on how to write and improve hwmon drivers, please
18 also read Documentation/hwmon/submitting-patches.
22 Each hardware monitoring driver must #include <linux/hwmon.h> and, in most
23 cases, <linux/hwmon-sysfs.h>. linux/hwmon.h declares the following
54 The name parameter is a pointer to the hwmon device name. The registration
58 allocated hwmon device. The pointer can be retrieved by the driver using
59 dev_get_drvdata() on the hwmon device pointer. The groups parameter is
61 hwmon_device_register_with_groups creates the hwmon device with name attribute
[all …]
Dsch563617 their own custom hwmon solution based upon the SCH5636.
20 hwmon solution. The sch5636 driver runs a sanity check on loading to ensure
22 hwmon solution.
29 The Fujitsu Theseus hwmon solution also contains an integrated watchdog.
Dmlxreg-fan38 the system configuration and creates FAN/PWM hwmon objects and a cooling
45 The driver exposes the fan to the user space through the hwmon's and
48 /sys files in hwmon subsystem
Dsubmitting-patches5 drivers for the hwmon subsystem. Following these suggestions will greatly
41 * Make sure the documentation in Documentation/hwmon/<driver_name> is up to
63 * Document the driver in Documentation/hwmon/<driver_name>.
106 discouraged as it is known to cause trouble with other (non-hwmon) I2C
120 the hwmon subsystem.
124 hwmon subsystem. Try using devm_add_action() instead of a remove function if
136 Standard attributes are specified in Documentation/hwmon/sysfs-interface.
Dabituguru311 it to behave as a hwmon IC. There are many different revisions of the
35 succeed. If the uGuru can't be read the actual hwmon
36 driver will not load and thus no hwmon device will get
/Linux-v4.19/Documentation/devicetree/bindings/hwmon/
Dapm-xgene-hwmon.txt1 APM X-Gene hwmon driver
6 - compatible : should be "apm,xgene-slimpro-hwmon"
12 compatible = "apm,xgene-slimpro-hwmon";
/Linux-v4.19/drivers/net/ethernet/mellanox/mlxsw/
Dcore_hwmon.c19 struct mlxsw_hwmon *hwmon; member
41 struct mlxsw_hwmon *mlxsw_hwmon = mlwsw_hwmon_attr->hwmon; in mlxsw_hwmon_temp_show()
63 struct mlxsw_hwmon *mlxsw_hwmon = mlwsw_hwmon_attr->hwmon; in mlxsw_hwmon_temp_max_show()
85 struct mlxsw_hwmon *mlxsw_hwmon = mlwsw_hwmon_attr->hwmon; in mlxsw_hwmon_temp_rst_store()
111 struct mlxsw_hwmon *mlxsw_hwmon = mlwsw_hwmon_attr->hwmon; in mlxsw_hwmon_fan_rpm_show()
130 struct mlxsw_hwmon *mlxsw_hwmon = mlwsw_hwmon_attr->hwmon; in mlxsw_hwmon_pwm_show()
150 struct mlxsw_hwmon *mlxsw_hwmon = mlwsw_hwmon_attr->hwmon; in mlxsw_hwmon_pwm_store()
224 mlxsw_hwmon_attr->hwmon = mlxsw_hwmon; in mlxsw_hwmon_attr_add()
/Linux-v4.19/drivers/platform/mellanox/
Dmlxreg-io.c37 struct device *hwmon; member
218 priv->hwmon = devm_hwmon_device_register_with_groups(&pdev->dev, in mlxreg_io_probe()
222 if (IS_ERR(priv->hwmon)) { in mlxreg_io_probe()
224 PTR_ERR(priv->hwmon)); in mlxreg_io_probe()
225 return PTR_ERR(priv->hwmon); in mlxreg_io_probe()
Dmlxreg-hotplug.c87 struct device *hwmon; member
106 kobject_uevent(&priv->hwmon->kobj, KOBJ_CHANGE); in mlxreg_hotplug_device_create()
144 kobject_uevent(&priv->hwmon->kobj, KOBJ_CHANGE); in mlxreg_hotplug_device_destroy()
654 priv->hwmon = devm_hwmon_device_register_with_groups(&pdev->dev, in mlxreg_hotplug_probe()
656 if (IS_ERR(priv->hwmon)) { in mlxreg_hotplug_probe()
658 PTR_ERR(priv->hwmon)); in mlxreg_hotplug_probe()
659 return PTR_ERR(priv->hwmon); in mlxreg_hotplug_probe()
/Linux-v4.19/arch/arm/boot/dts/
Daspeed-bmc-arm-centriq2400-rep.dts20 iio-hwmon {
21 compatible = "iio-hwmon";
26 iio-hwmon-battery {
27 compatible = "iio-hwmon";
Daspeed-bmc-opp-lanyang.dts77 iio-hwmon {
78 compatible = "iio-hwmon";
85 iio-hwmon-battery {
86 compatible = "iio-hwmon";
Daspeed-bmc-intel-s2600wf.dts31 iio-hwmon {
32 compatible = "iio-hwmon";
/Linux-v4.19/drivers/input/touchscreen/
Dsun4i-ts.c248 struct device *hwmon; in sun4i_ts_probe() local
363 hwmon = devm_hwmon_device_register_with_groups(ts->dev, "sun4i_ts", in sun4i_ts_probe()
365 if (IS_ERR(hwmon)) in sun4i_ts_probe()
366 return PTR_ERR(hwmon); in sun4i_ts_probe()

123456