search for: attribute_group

Displaying 20 results from an estimated 251 matches for "attribute_group".

2012 Feb 17
0
[PATCH] linux-2.6.18/drivers/xen/: constify all instances of "struct attribute_group"
...e functions these get passed to have been taking pointers to const since at least 2.6.16. Signed-off-by: Jan Beulich <jbeulich@suse.com> --- a/drivers/xen/balloon/sysfs.c +++ b/drivers/xen/balloon/sysfs.c @@ -97,7 +97,7 @@ static struct attribute *balloon_info_at NULL }; -static struct attribute_group balloon_info_group = { +static const struct attribute_group balloon_info_group = { .name = "info", .attrs = balloon_info_attrs, }; --- a/drivers/xen/blkback/xenbus.c +++ b/drivers/xen/blkback/xenbus.c @@ -136,7 +136,7 @@ static struct attribute *vbdstat_attrs[] NULL }; -static s...
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
2016 Oct 25
1
[PATCH 3/3] hwmon: expose power_max and power_crit
...truct attribute *hwmon_power_attributes[] = { > NULL > }; > > +static struct attribute *hwmon_power_caps_attributes[] = { > + &sensor_dev_attr_power1_max.dev_attr.attr, > + &sensor_dev_attr_power1_crit.dev_attr.attr, > + NULL > +}; > + > static const struct attribute_group hwmon_default_attrgroup = { > .attrs = hwmon_default_attributes, > }; > @@ -657,6 +689,9 @@ static const struct attribute_group hwmon_in0_attrgroup = { > static const struct attribute_group hwmon_power_attrgroup = { > .attrs = hwmon_power_attributes, > }; > +static const...
2017 Apr 13
3
[PATCH 0/4] nouveau_hwmon: migrate to hwmon_device_register_with_info
...sensors with their possible config values. Just to prepare for the next patches --- linux/drivers/gpu/drm/nouveau/nouveau_hwmon.c.orig 2017-04-12 19:18:09.638073562 +0200 +++ linux/drivers/gpu/drm/nouveau/nouveau_hwmon.c 2017-04-12 19:19:44.244797202 +0200 @@ -692,6 +692,78 @@ static const struct attribute_group hwmo static const struct attribute_group hwmon_power_caps_attrgroup = { .attrs = hwmon_power_caps_attributes, }; + +static const u32 nouveau_config_chip[] = { + HWMON_C_UPDATE_INTERVAL, + 0 +}; + +static const u32 nouveau_config_in[] = { + HWMON_I_INPUT | HWMON_I_MIN | HWMON_I_MAX | HWMON_I_LAB...
2016 Oct 24
0
[PATCH 3/3] hwmon: expose power_max and power_crit
...ate.dev_attr.attr, @@ -639,6 +665,12 @@ static struct attribute *hwmon_power_attributes[] = { NULL }; +static struct attribute *hwmon_power_caps_attributes[] = { + &sensor_dev_attr_power1_max.dev_attr.attr, + &sensor_dev_attr_power1_crit.dev_attr.attr, + NULL +}; + static const struct attribute_group hwmon_default_attrgroup = { .attrs = hwmon_default_attributes, }; @@ -657,6 +689,9 @@ static const struct attribute_group hwmon_in0_attrgroup = { static const struct attribute_group hwmon_power_attrgroup = { .attrs = hwmon_power_attributes, }; +static const struct attribute_group hwmon_power...
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/dr...
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(...
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(-...
2016 Feb 20
0
[PATCH v4 4/6] hwmon: add power consumption
...ttr_name.dev_attr.attr, &sensor_dev_attr_update_rate.dev_attr.attr, @@ -579,6 +601,11 @@ static struct attribute *hwmon_in0_attributes[] = { NULL }; +static struct attribute *hwmon_power_attributes[] = { + &sensor_dev_attr_power1_input.dev_attr.attr, + NULL +}; + static const struct attribute_group hwmon_default_attrgroup = { .attrs = hwmon_default_attributes, }; @@ -594,6 +621,9 @@ static const struct attribute_group hwmon_pwm_fan_attrgroup = { static const struct attribute_group hwmon_in0_attrgroup = { .attrs = hwmon_in0_attributes, }; +static const struct attribute_group hwmon_power...
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/ Now everything goes through
2017 Apr 19
1
[PATCH v2 1/5] nouveau_hwmon: Add config for all sensors and their settings
...sertions(+) > > diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c > index 23b1670..24b40c5 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c > +++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c > @@ -692,6 +692,78 @@ static const struct attribute_group hwmon_power_attrgroup = { > static const struct attribute_group hwmon_power_caps_attrgroup = { > .attrs = hwmon_power_caps_attributes, > }; > + > +static const u32 nouveau_config_chip[] = { > + HWMON_C_UPDATE_INTERVAL, > + 0 > +}; > + > +static co...
2017 Apr 26
9
[PATCH v5 0/5] replace hwmon_device_register for hwmon_device_register_with_info
This v5 drops a check for attr_set. 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 v3 -> v4: * Rever const to struct attribute. Kbuild complains. v4 -> v5: * Drops a check for attr_set in
2023 Apr 07
3
[PATCH 1/2] drm/i915: constify pointers to hwmon_channel_info
...4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwmon.c index 596dd2c07010..87b527a54272 100644 --- a/drivers/gpu/drm/i915/i915_hwmon.c +++ b/drivers/gpu/drm/i915/i915_hwmon.c @@ -267,7 +267,7 @@ static const struct attribute_group *hwm_groups[] = { NULL }; -static const struct hwmon_channel_info *hwm_info[] = { +static const struct hwmon_channel_info * const hwm_info[] = { HWMON_CHANNEL_INFO(in, HWMON_I_INPUT), HWMON_CHANNEL_INFO(power, HWMON_P_MAX | HWMON_P_RATED_MAX | HWMON_P_CRIT), HWMON_CHANNEL_INFO(energy, HW...
2017 Apr 11
2
[PATCH 1/1] nouveau_hwmon: migrate to hwmon_device_register_with_info
..._dev_attr_update_rate.dev_attr.attr, +static struct attribute *pwm_fan_sensor_attrs[] = { + &sensor_dev_attr_pwm1_min.dev_attr.attr, + &sensor_dev_attr_pwm1_max.dev_attr.attr, NULL }; -static struct attribute *hwmon_temp_attributes[] = { - &sensor_dev_attr_temp1_input.dev_attr.attr, +ATTRIBUTE_GROUPS(pwm_fan_sensor); + +static struct attribute *temp1_auto_point_sensor_attrs[] = { &sensor_dev_attr_temp1_auto_point1_pwm.dev_attr.attr, &sensor_dev_attr_temp1_auto_point1_temp.dev_attr.attr, &sensor_dev_attr_temp1_auto_point1_temp_hyst.dev_attr.attr, - &sensor_dev_attr_temp1_m...
2017 Apr 13
0
[PATCH 3/4] nouveau_hwmon: migrate to hwmon_device_register_with_info
...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; } +static struct attribute *pwm_fan_sensor_attrs[] = { + &sensor_dev_attr_pwm1_min.dev_attr.attr, + &sensor_dev_attr_pwm1_max.dev_attr.attr, + NULL +}; +ATTRIBUTE_GROUPS(pwm_fan_sensor); + +static struct attribute *temp1_auto_point_sensor_attrs[] = { + &sensor_dev_attr_temp1_auto_point1_pwm.dev_attr.attr, + &sensor_dev_attr_temp1_auto_point1_temp.dev_attr.attr, + &sensor_dev_attr_temp1_auto_point1_temp_hyst.dev_attr.attr, + NULL +}; +ATTRIBUTE_GROUPS(t...
2016 Jun 30
2
[PATCH v2 00/12] gendisk: Generate uevent after attribute available
...he > driverfs_dev removal. Let's just pass the array of attributes to > a disk_add variant and solve the issue for real. I thought about that. Its usage is more compact compared to this series, but is also more code and less flexible IMO. For example, we need at least two variants, for attribute_group and device_attribute separately, right? Fam
2016 Aug 17
0
[PATCH 09/15] virtio-blk: Pass attribute group to device_add_disk
...lk_queue_depth, uint, 0444); +static struct attribute *virtblk_attrs_ro[] = { + &dev_attr_serial.attr, + &dev_attr_cache_type_ro.attr, + NULL +}; + +static struct attribute *virtblk_attrs_rw[] = { + &dev_attr_serial.attr, + &dev_attr_cache_type_rw.attr, + NULL +}; + +static struct attribute_group virtblk_attr_group_ro = { + .attrs = virtblk_attrs_ro, +}; + +static struct attribute_group virtblk_attr_group_rw = { + .attrs = virtblk_attrs_rw, +}; + static int virtblk_probe(struct virtio_device *vdev) { struct virtio_blk *vblk; @@ -560,6 +580,7 @@ static int virtblk_probe(struct virtio_d...
2016 Jun 30
2
[PATCH v2 00/12] gendisk: Generate uevent after attribute available
...he > driverfs_dev removal. Let's just pass the array of attributes to > a disk_add variant and solve the issue for real. I thought about that. Its usage is more compact compared to this series, but is also more code and less flexible IMO. For example, we need at least two variants, for attribute_group and device_attribute separately, right? Fam
2017 May 08
5
[PATCH v6 0/5] replace hwmon_device_register for hwmon_device_register_with_info
This v6 fixes some comments pointed out by Martin Peres. 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 v3 -> v4: * Rever const to struct attribute. Kbuild complains. v4 -> v5: * Drops a check for
2017 Apr 22
6
[PATCH v4 0/5] replace hwmon_device_register for hwmon_device_register_with_info
Kbuild sent me an e-mail due to a fixup I introduced in v3. It complains due to an incompatible pointer type and it doesn't build. This version reverts it. 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 v3 -> v4: