search for: hwmon_dev

Displaying 20 results from an estimated 46 matches for "hwmon_dev".

2016 Feb 20
0
[PATCH v4 5/6] hwmon: don't require therm to be valid to get any data
...eau_hwmon.c index c4f77f5..a630192 100644 --- a/drm/nouveau/nouveau_hwmon.c +++ b/drm/nouveau/nouveau_hwmon.c @@ -643,9 +643,6 @@ nouveau_hwmon_init(struct drm_device *dev) return -ENOMEM; hwmon->dev = dev; - if (!therm || !therm->attr_get || !therm->attr_set) - return -ENODEV; - hwmon_dev = hwmon_device_register(&dev->pdev->dev); if (IS_ERR(hwmon_dev)) { ret = PTR_ERR(hwmon_dev); @@ -659,26 +656,28 @@ nouveau_hwmon_init(struct drm_device *dev) if (ret) goto error; - /* if the card has a working thermal sensor */ - if (nvkm_therm_temp_get(therm) >= 0) { - re...
2017 Apr 26
9
[PATCH v5 0/5] replace hwmon_device_register for hwmon_device_register_with_info
...t and add return within switch due to fallthrough * Add Signed-off-by to all commits v3 -> v4: * Rever const to struct attribute. Kbuild complains. v4 -> v5: * Drops a check for attr_set in "nouveau_temp_is_visible". This patchseries replaces the deprecated hwmon_device_register function with the new one hwmon_device_register_with_info. It also does some cleanup. Oscar Salvador (5): nouveau_hwmon: Add config for all sensors and their settings nouveau_hwmon: Add nouveau_hwmon_ops structure with .is_visible/.read_string nouveau_hwmon: Remove old code,...
2017 Apr 26
0
[PATCH v5 3/5] nouveau_hwmon: Remove old code, add .write/.read operations
...t nouveau_drm *drm = nouveau_drm(dev); struct nvkm_therm *therm = nvxx_therm(&drm->client.device); - struct nvkm_volt *volt = nvxx_volt(&drm->client.device); - struct nvkm_iccsense *iccsense = nvxx_iccsense(&drm->client.device); struct nouveau_hwmon *hwmon; struct device *hwmon_dev; int ret = 0; @@ -953,79 +801,16 @@ nouveau_hwmon_init(struct drm_device *dev) return -ENOMEM; hwmon->dev = dev; - hwmon_dev = hwmon_device_register(dev->dev); + hwmon_dev = hwmon_device_register_with_info(dev->dev, "nouveau", dev, + &nouveau_chip_info, NULL);...
2017 Apr 13
0
[PATCH 2/4] nouveau_hwmon: migrate to hwmon_device_register_with_info
...t nouveau_drm *drm = nouveau_drm(dev); struct nvkm_therm *therm = nvxx_therm(&drm->client.device); - struct nvkm_volt *volt = nvxx_volt(&drm->client.device); - struct nvkm_iccsense *iccsense = nvxx_iccsense(&drm->client.device); struct nouveau_hwmon *hwmon; struct device *hwmon_dev; int ret = 0; @@ -943,78 +877,16 @@ nouveau_hwmon_init(struct drm_device *de return -ENOMEM; hwmon->dev = dev; - hwmon_dev = hwmon_device_register(dev->dev); + hwmon_dev = hwmon_device_register_with_info(dev->dev, "nouveau", dev, + &nouveau_chip_info, NULL); i...
2017 Apr 11
2
[PATCH 1/1] nouveau_hwmon: migrate to hwmon_device_register_with_info
Hi, this patch replaces the old hwmon_device_register with the new hwmon_device_register_with_info. I've tested it on my laptop with a GeForceGT 425M and it doesn't break anything. --- linux/drivers/gpu/drm/nouveau/nouveau_hwmon.c.orig 2017-04-11 18:27:15.477623009 +0200 +++ linux/drivers/gpu/drm/nouveau/nouveau_hwmon.c 2017-04-1...
2017 Apr 17
9
[PATCH v2 0/5] replace hwmon_device_register for hwmon_device_register_with_info
Hi! This patchseries replaces the deprecated hwmon_device_register function with the new one hwmon_device_register_with_info. It also does some cleanup. Here is the list of patches and what they do: 1/ Adds config structures for all sensors and their possible settings. This patch and the next one are just preparing the code for what it comes. 2/...
2017 May 08
5
[PATCH v6 0/5] replace hwmon_device_register for hwmon_device_register_with_info
...ouveau_power_is_visible function * Expose temperature attrs as RW again * Get rid of nouveau_hwmon_set_pwm1/_enable and implement the code inside nouveau_pwm_write * Get rid of nouveau_hwmon_set_temp_* and implement the code inside nouveau_temp_write This patchseries replaces the deprecated hwmon_device_register function with the new one hwmon_device_register_with_info. It also does some cleanup. Oscar Salvador (5): nouveau/hwmon: Add config for all sensors and their settings nouveau/hwmon: Add nouveau_hwmon_ops structure with .is_visible/.read_string nouveau/hwmon: Remove old code,...
2016 Oct 25
1
[PATCH 3/3] hwmon: expose power_max and power_crit
...= { > + .attrs = hwmon_power_caps_attributes, > +}; > #endif > > int > @@ -728,8 +763,16 @@ nouveau_hwmon_init(struct drm_device *dev) > if (iccsense && iccsense->data_valid && !list_empty(&iccsense->rails)) { > ret = sysfs_create_group(&hwmon_dev->kobj, > &hwmon_power_attrgroup); > + > if (ret) > goto error; > + > + if (iccsense->power_w_max && iccsense->power_w_crit) { > + ret = sysfs_create_group(&hwmon_dev->kobj, > + &hwmon_power_caps_attrgroup); > + if (...
2017 Apr 22
6
[PATCH v4 0/5] replace hwmon_device_register for hwmon_device_register_with_info
...eep temp attrs as read only v2 -> v3: * Code fix-ups: struct and string as const and add return within switch due to fallthrough * Add Signed-off-by to all commits v3 -> v4: * Rever const to struct attribute. Kbuild complains. This patchseries replaces the deprecated hwmon_device_register function with the new one hwmon_device_register_with_info. It also does some cleanup. Oscar Salvador (5): nouveau_hwmon: Add config for all sensors and their settings nouveau_hwmon: Add nouveau_hwmon_ops structure with .is_visible/.read_string nouveau_hwmon: Remove old code,...
2017 Apr 21
6
[PATCH v3 0/5] replace hwmon_device_register for hwmon_device_register_with_info
Hi, this is version v3 with some fix-ups: Versions: v1 -> v2: * Keep temp attrs as read only v2 -> v3: * Code fix-ups: struct and string as const and add return within switch due to fallthrough * Add Signed-off-by to all commits This patchseries replaces the deprecated hwmon_device_register function with the new one hwmon_device_register_with_info. It also does some cleanup. Here is the list of patches and what they do: 1/ Adds config structures for all sensors and their possible settings. This patch and the next one are just preparing the code for what it comes. 2/...
2017 May 18
7
[PATCH v8 0/5] replace hwmon_device_register for hwmon_device_register_with_info
...* Get rid of nouveau_hwmon_set_temp_* and implement the code inside nouveau_temp_write v6 -> v7: * Got rid of all dummy functions that only had a return, and moved code into the switch statements. v7 -> v8: * Fix warnings This patchseries replaces the deprecated hwmon_device_register function with the new one hwmon_device_register_with_info. It also does some cleanup. Oscar Salvador (5): nouveau/hwmon: Add config for all sensors and their settings nouveau/hwmon: Add nouveau_hwmon_ops structure with .is_visible/.read_string nouveau/hwmon: Remove old code,...
2017 May 16
7
[PATCH v7 0/5] replace hwmon_device_register for hwmon_device_register_with_info
...le and implement the code inside nouveau_pwm_write * Get rid of nouveau_hwmon_set_temp_* and implement the code inside nouveau_temp_write v6 -> v7: * Got rid of all dummy functions that only had a return, and moved code into the switch statements. This patchseries replaces the deprecated hwmon_device_register function with the new one hwmon_device_register_with_info. It also does some cleanup. Oscar Salvador (5): nouveau/hwmon: Add config for all sensors and their settings nouveau/hwmon: Add nouveau_hwmon_ops structure with .is_visible/.read_string nouveau/hwmon: Remove old code,...
2016 Mar 02
0
[PATCH] hwmon: fix crash on non-PCI platforms
...eletion(-) diff --git a/drm/nouveau/nouveau_hwmon.c b/drm/nouveau/nouveau_hwmon.c index 3fa1e78e4ece..67edd2f5b71a 100644 --- a/drm/nouveau/nouveau_hwmon.c +++ b/drm/nouveau/nouveau_hwmon.c @@ -640,7 +640,7 @@ nouveau_hwmon_init(struct drm_device *dev) return -ENOMEM; hwmon->dev = dev; - hwmon_dev = hwmon_device_register(&dev->pdev->dev); + hwmon_dev = hwmon_device_register(dev->dev); if (IS_ERR(hwmon_dev)) { ret = PTR_ERR(hwmon_dev); NV_ERROR(drm, "Unable to register hwmon device: %d\n", ret); -- 2.7.2
2017 Apr 13
0
[PATCH 3/4] nouveau_hwmon: migrate to hwmon_device_register_with_info
This patch creates special group attributes for special attrs like "*auto_point*". We check if we need them, and if we do, we set them up in special_groups structure, that then we pass to hwmon_device_register_with_info. --- linux/drivers/gpu/drm/nouveau/nouveau_hwmon.c.orig 2017-04-13 10:13:26.331391326 +0200 +++ linux/drivers/gpu/drm/nouveau/nouveau_hwmon.c 2017-04-13 10:15:02.274073273 +0200 @@ -417,6 +417,23 @@ nouveau_hwmon_get_power1_crit(struct nou return iccsense->power_w_crit;...
2017 Apr 17
0
[PATCH v2 4/5] nouveau_hwmon: Add support for auto_point attributes
This patch creates a special group attributes for attrs like "*auto_point*". We check if we have support for them, and if we do, we gather them all in an attribute_group's structure which is the parameter regarding special groups of hwmon_device_register_with_info. --- drivers/gpu/drm/nouveau/nouveau_hwmon.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c index 538bf67..655ae11 100644 --- a/drivers/gpu/drm...
2017 Apr 21
0
[PATCH v3 4/5] nouveau_hwmon: Add support for auto_point attributes
This patch creates a special group attributes for attrs like "*auto_point*". We check if we have support for them, and if we do, we gather them all in an attribute_group's structure which is the parameter regarding special groups of hwmon_device_register_with_info. Signed-off-by: Oscar Salvador <osalvador.vilardaga at gmail.com> --- drivers/gpu/drm/nouveau/nouveau_hwmon.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/no...
2017 Apr 26
0
[PATCH v5 4/5] nouveau_hwmon: Add support for auto_point attributes
This patch creates a special group attributes for attrs like "*auto_point*". We check if we have support for them, and if we do, we gather them all in an attribute_group's structure which is the parameter regarding special groups of hwmon_device_register_with_info. Signed-off-by: Oscar Salvador <osalvador.vilardaga at gmail.com> --- drivers/gpu/drm/nouveau/nouveau_hwmon.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nou...
2009 Nov 19
2
[RFC] nouveau: Add basic i2c sensor chip support
...veau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index e33fdd3..bf0330e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h @@ -581,6 +581,9 @@ struct drm_nouveau_private { struct backlight_device *backlight; bool acpi_dsm; + struct device *hwmon_dev; + int (*get_gpu_temperature)(struct drm_device *dev); + struct nouveau_channel *evo; struct { diff --git a/drivers/gpu/drm/nouveau/nouveau_reg.h b/drivers/gpu/drm/nouveau/nouveau_reg.h index 3a5f43a..0b02a99 100644 --- a/drivers/gpu/drm/nouveau/nouveau_reg.h +++ b/drivers/gpu/drm/nouveau/nou...
2017 Apr 12
0
[PATCH 1/1] nouveau_hwmon: migrate to hwmon_device_register_with_info
...is. And it isn't bisectable. If there are clean ups here, please do it in a seperate patch. I highly doubt that it all has to be done within one single big patch. 2017-04-11 18:54 GMT+02:00 Oscar Salvador <osalvador.vilardaga at gmail.com>: > Hi, > > this patch replaces the old hwmon_device_register with the new > hwmon_device_register_with_info. > I've tested it on my laptop with a GeForceGT 425M and it doesn't break anything. > > > --- linux/drivers/gpu/drm/nouveau/nouveau_hwmon.c.orig 2017-04-11 18:27:15.477623009 +0200 > +++ linux/drivers/gpu/drm/nouv...
2016 Feb 20
12
[PATCH v4 0/6] Suppor for various power sensors on GF100+
This is a complete rework from the first version I sent out. Now the implementation is more centered around the power_rails we find in the SENSE table instead of extdev centered. This makes the implementation a lot easier and straightforward. I've added support for the INA219, INA209 and INA3221 sensors found on multiple Fermi and Kepler cards. The power consumption is also exported via