Home
last modified time | relevance | path

Searched +full:attr +full:- +full:max +full:- +full:name (Results 1 – 25 of 1058) sorted by relevance

12345678910>>...43

/kernel/linux/linux-5.10/drivers/firmware/efi/
Desrt.c1 // SPDX-License-Identifier: GPL-2.0+
6 * through the sysfs file system. The ESRT provides a read-only catalog of
76 struct attribute attr; member
87 static struct esre_attribute *to_attr(struct attribute *attr) in to_attr() argument
89 return container_of(attr, struct esre_attribute, attr); in to_attr()
96 struct esre_attribute *attr = to_attr(_attr); in esre_attr_show() local
100 return -EACCES; in esre_attr_show()
102 return attr->show(entry, buf); in esre_attr_show()
114 efi_guid_to_str(&entry->esre.esre1->fw_class, str); in fw_class_show()
118 return str - buf; in fw_class_show()
[all …]
/kernel/liteos_m/testsuites/unittest/posix/src/mqueue/
Dmqueue_func_test.c2 * Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
3 * Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
15 * 3. Neither the name of the copyright holder nor the names of its contributors may be used
44 const int MQ_NAME_LEN = 64; // mqueue name len
53 const int MAX_MQ_NUMBER = LOSCFG_BASE_IPC_QUEUE_LIMIT - 1; // max mqueue number
54 const int MAX_MQ_NAME_LEN = 256; // max mqueue name length
55 const int MAX_MQ_MSG_SIZE = 65530; // max mqueue message size
57 // return n: 0 < n <= max
58 static unsigned int GetRandom(unsigned int max) in GetRandom() argument
60 if (max == 0 || max == 1) { in GetRandom()
[all …]
/kernel/linux/linux-6.6/drivers/firmware/efi/
Desrt.c1 // SPDX-License-Identifier: GPL-2.0+
6 * through the sysfs file system. The ESRT provides a read-only catalog of
76 struct attribute attr; member
87 static struct esre_attribute *to_attr(struct attribute *attr) in to_attr() argument
89 return container_of(attr, struct esre_attribute, attr); in to_attr()
96 struct esre_attribute *attr = to_attr(_attr); in esre_attr_show() local
98 return attr->show(entry, buf); in esre_attr_show()
110 efi_guid_to_str(&entry->esre.esre1->fw_class, str); in fw_class_show()
114 return str - buf; in fw_class_show()
119 #define esre_attr_decl(name, size, fmt) \ argument
[all …]
/kernel/linux/linux-5.10/arch/powerpc/platforms/powernv/
Dopal-powercap.c1 // SPDX-License-Identifier: GPL-2.0-or-later
8 #define pr_fmt(fmt) "opal-powercap: " fmt
22 struct kobj_attribute attr; member
30 static ssize_t powercap_show(struct kobject *kobj, struct kobj_attribute *attr, in powercap_show() argument
33 struct powercap_attr *pcap_attr = container_of(attr, in powercap_show()
34 struct powercap_attr, attr); in powercap_show()
49 ret = opal_get_powercap(pcap_attr->handle, token, (u32 *)__pa(&pcap)); in powercap_show()
55 ret = -EIO; in powercap_show()
62 ret = -EIO; in powercap_show()
68 ret = -EIO; in powercap_show()
[all …]
/kernel/linux/linux-6.6/arch/powerpc/platforms/powernv/
Dopal-powercap.c1 // SPDX-License-Identifier: GPL-2.0-or-later
8 #define pr_fmt(fmt) "opal-powercap: " fmt
22 struct kobj_attribute attr; member
30 static ssize_t powercap_show(struct kobject *kobj, struct kobj_attribute *attr, in powercap_show() argument
33 struct powercap_attr *pcap_attr = container_of(attr, in powercap_show()
34 struct powercap_attr, attr); in powercap_show()
49 ret = opal_get_powercap(pcap_attr->handle, token, (u32 *)__pa(&pcap)); in powercap_show()
55 ret = -EIO; in powercap_show()
62 ret = -EIO; in powercap_show()
68 ret = -EIO; in powercap_show()
[all …]
/kernel/linux/linux-6.6/drivers/platform/x86/intel/uncore-frequency/
Duncore-frequency-common.c1 // SPDX-License-Identifier: GPL-2.0
10 #include "uncore-frequency-common.h"
22 static int (*uncore_read)(struct uncore_data *data, unsigned int *min, unsigned int *max);
26 static ssize_t show_domain_id(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in show_domain_id() argument
28 struct uncore_data *data = container_of(attr, struct uncore_data, domain_id_kobj_attr); in show_domain_id()
30 return sprintf(buf, "%u\n", data->domain_id); in show_domain_id()
33 static ssize_t show_fabric_cluster_id(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in show_fabric_cluster_id() argument
35 struct uncore_data *data = container_of(attr, struct uncore_data, fabric_cluster_id_kobj_attr); in show_fabric_cluster_id()
37 return sprintf(buf, "%u\n", data->cluster_id); in show_fabric_cluster_id()
40 static ssize_t show_package_id(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in show_package_id() argument
[all …]
/kernel/linux/linux-6.6/drivers/ptp/
Dptp_sysfs.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * PTP 1588 clock support - sysfs interface.
14 struct device_attribute *attr, char *page) in clock_name_show() argument
17 return sysfs_emit(page, "%s\n", ptp->info->name); in clock_name_show()
22 struct device_attribute *attr, in max_phase_adjustment_show() argument
27 return snprintf(page, PAGE_SIZE - 1, "%d\n", in max_phase_adjustment_show()
28 ptp->info->getmaxphase(ptp->info)); in max_phase_adjustment_show()
32 #define PTP_SHOW_INT(name, var) \ argument
34 struct device_attribute *attr, char *page) \
37 return snprintf(page, PAGE_SIZE-1, "%d\n", ptp->info->var); \
[all …]
/kernel/linux/linux-5.10/drivers/hwmon/
Dabx500.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) ST-Ericsson 2010 - 2013
19 #include <linux/hwmon-sysfs.h>
37 data->work_active = true; in schedule_monitor()
38 schedule_delayed_work(&data->work, DEFAULT_MONITOR_DELAY); in schedule_monitor()
44 for (i = 0; i < data->monitored_sensors; i++) in threshold_updated()
45 if (data->max[i] != 0 || data->min[i] != 0) { in threshold_updated()
50 dev_dbg(&data->pdev->dev, "No active thresholds.\n"); in threshold_updated()
51 cancel_delayed_work_sync(&data->work); in threshold_updated()
52 data->work_active = false; in threshold_updated()
[all …]
Dsmm665.c1 // SPDX-License-Identifier: GPL-2.0-only
22 #include <linux/hwmon-sysfs.h>
115 /* Voltage A-F and VDD */
127 (((int)(adc) - 0x400) * 1000 / 4))
179 struct i2c_client *client = data->cmdreg; in smm665_read_adc()
194 * Then do a two-byte read transaction. in smm665_read_adc()
197 if (rv != -ENXIO) { in smm665_read_adc()
200 * (per Documentation/i2c/fault-codes.rst). in smm665_read_adc()
203 dev_dbg(&client->dev, in smm665_read_adc()
205 return (rv < 0) ? rv : -EIO; in smm665_read_adc()
[all …]
Demc6w201.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * emc6w201.c - Hardware monitoring driver for the SMSC EMC6W201
13 #include <linux/hwmon-sysfs.h>
39 enum subfeature { input, min, max }; enumerator
42 * Per-device data
59 * Locking: must be called with data->update_lock held
68 dev_err(&client->dev, "%d-bit %s failed at 0x%02x\n", in emc6w201_read16()
77 * Write 16-bit value to LSB and MSB registers
78 * Locking: must be called with data->update_lock held
88 dev_err(&client->dev, "%d-bit %s failed at 0x%02x\n", in emc6w201_write16()
[all …]
Dmenf21bmc_hwmon.c1 // SPDX-License-Identifier: GPL-2.0-or-later
16 #include <linux/hwmon-sysfs.h>
59 if (time_after(jiffies, drv_data->last_update + HZ) in menf21bmc_hwmon_update()
60 || !drv_data->valid) { in menf21bmc_hwmon_update()
62 val = i2c_smbus_read_word_data(drv_data->i2c_client, in menf21bmc_hwmon_update()
68 drv_data->in_val[i] = val; in menf21bmc_hwmon_update()
70 drv_data->last_update = jiffies; in menf21bmc_hwmon_update()
71 drv_data->valid = true; in menf21bmc_hwmon_update()
82 val = i2c_smbus_read_word_data(drv_data->i2c_client, in menf21bmc_hwmon_get_volt_limits()
87 drv_data->in_min[i] = val; in menf21bmc_hwmon_get_volt_limits()
[all …]
/kernel/linux/linux-6.6/Documentation/userspace-api/netlink/
Dc-code-gen.rst1 .. SPDX-License-Identifier: BSD-3-Clause
9 allowed in older families by the ``genetlink-c`` protocol level,
12 For brevity this document refers to ``name`` properties of various
13 objects by the object type. For example ``$attr`` is the value
14 of ``name`` in an attribute, and ``$family`` is the name of the
15 family (the global ``name`` property).
17 The upper case is used to denote literal values, e.g. ``$family-CMD``
22 and with dashes (``-``) replaced by underscores (``_``).
24 If the constructed name is a C keyword, an extra underscore is
25 appended (``do`` -> ``do_``).
[all …]
/kernel/linux/linux-6.6/Documentation/netlink/
Dgenetlink-c.yaml1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
3 ---
4 $id: http://kernel.org/schemas/netlink/genetlink-c.yaml#
5 $schema: https://json-schema.org/draft-07/schema
12 len-or-define:
14 pattern: ^[0-9A-Za-z_]+( - 1)?$
21 required: [ name, doc, attribute-sets, operations ]
24 name:
25 description: Name of the genetlink family.
35 enum: [ genetlink, genetlink-c ]
[all …]
Dgenetlink-legacy.yaml1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
3 ---
4 $id: http://kernel.org/schemas/netlink/genetlink-legacy.yaml#
5 $schema: https://json-schema.org/draft-07/schema
12 len-or-define:
14 pattern: ^[0-9A-Za-z_]+( - 1)?$
21 required: [ name, doc, attribute-sets, operations ]
24 name:
25 description: Name of the genetlink family.
35 enum: [ genetlink, genetlink-c, genetlink-legacy ] # Trim
[all …]
Dnetlink-raw.yaml1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
3 ---
4 $id: http://kernel.org/schemas/netlink/netlink-raw.yaml#
5 $schema: https://json-schema.org/draft-07/schema
12 len-or-define:
14 pattern: ^[0-9A-Za-z_]+( - 1)?$
21 required: [ name, doc, attribute-sets, operations ]
24 name:
25 description: Name of the netlink family.
31 enum: [ netlink-raw ] # Trim
[all …]
/kernel/linux/linux-5.10/drivers/platform/x86/
Dintel-uncore-frequency.c1 // SPDX-License-Identifier: GPL-2.0
22 #include <asm/intel-family.h>
28 * struct uncore_data - Encapsulate all uncore data
51 /* Max instances for uncore data, one for each die */
65 struct attribute attr; member
67 struct attribute *attr, char *buf);
69 struct attribute *attr, const char *c, ssize_t count);
82 struct attribute *attr, \
87 data->member_name); \
94 /* Common function to read MSR 0x620 and read min/max */
[all …]
/kernel/linux/linux-6.6/drivers/gpu/drm/i915/
Di915_hwmon.c1 // SPDX-License-Identifier: MIT
7 #include <linux/hwmon-sysfs.h>
19 * SF_* - scale factors for particular quantities according to hwmon spec.
20 * - voltage - millivolts
21 * - power - microwatts
22 * - curr - milliamperes
23 * - energy - microjoules
24 * - time - milliseconds
51 char name[12]; member
71 struct i915_hwmon *hwmon = ddat->hwmon; in hwm_locked_with_pm_intel_uncore_rmw()
[all …]
/kernel/linux/linux-6.6/drivers/hwmon/
Demc6w201.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * emc6w201.c - Hardware monitoring driver for the SMSC EMC6W201
13 #include <linux/hwmon-sysfs.h>
39 enum subfeature { input, min, max }; enumerator
42 * Per-device data
59 * Locking: must be called with data->update_lock held
68 dev_err(&client->dev, "%d-bit %s failed at 0x%02x\n", in emc6w201_read16()
77 * Write 16-bit value to LSB and MSB registers
78 * Locking: must be called with data->update_lock held
88 dev_err(&client->dev, "%d-bit %s failed at 0x%02x\n", in emc6w201_write16()
[all …]
Dmenf21bmc_hwmon.c1 // SPDX-License-Identifier: GPL-2.0-or-later
16 #include <linux/hwmon-sysfs.h>
59 if (time_after(jiffies, drv_data->last_update + HZ) in menf21bmc_hwmon_update()
60 || !drv_data->valid) { in menf21bmc_hwmon_update()
62 val = i2c_smbus_read_word_data(drv_data->i2c_client, in menf21bmc_hwmon_update()
68 drv_data->in_val[i] = val; in menf21bmc_hwmon_update()
70 drv_data->last_update = jiffies; in menf21bmc_hwmon_update()
71 drv_data->valid = true; in menf21bmc_hwmon_update()
82 val = i2c_smbus_read_word_data(drv_data->i2c_client, in menf21bmc_hwmon_get_volt_limits()
87 drv_data->in_min[i] = val; in menf21bmc_hwmon_get_volt_limits()
[all …]
/kernel/linux/linux-6.6/tools/net/ynl/
Dethtool.py2 # SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
14 Verify and convert command-line arguments to the ynl-compatible request.
17 valid_attrs.remove('header') # not user-provided
25 attr = args[i]
27 print(f'expected value for \'{attr}\'')
30 if attr not in valid_attrs:
31 print(f'invalid attribute \'{attr}\', expected: {valid_attrs}')
37 req[attr] = val
41 Pretty-print a set of fields from the reply. desc specifies the
49 field, name, tp = spec
[all …]
/kernel/linux/linux-6.6/drivers/staging/greybus/
Dloopback.c1 // SPDX-License-Identifier: GPL-2.0
35 u32 max; member
102 .name = "gb_loopback",
106 /* Min/max values in jiffies */
123 struct device_attribute *attr, \
127 return sprintf(buf, "%u\n", gb->field); \
131 #define gb_loopback_ro_stats_attr(name, field, type) \ argument
132 static ssize_t name##_##field##_show(struct device *dev, \
133 struct device_attribute *attr, \
137 /* Report 0 for min and max if no transfer succeeded */ \
[all …]
/kernel/linux/linux-5.10/drivers/staging/greybus/
Dloopback.c1 // SPDX-License-Identifier: GPL-2.0
35 u32 max; member
102 .name = "gb_loopback",
107 /* Min/max values in jiffies */
124 struct device_attribute *attr, \
128 return sprintf(buf, "%u\n", gb->field); \
132 #define gb_loopback_ro_stats_attr(name, field, type) \ argument
133 static ssize_t name##_##field##_show(struct device *dev, \
134 struct device_attribute *attr, \
138 /* Report 0 for min and max if no transfer succeeded */ \
[all …]
/kernel/linux/linux-5.10/net/netfilter/ipset/
Dip_set_core.c1 // SPDX-License-Identifier: GPL-2.0-only
2 /* Copyright (C) 2000-2002 Joakim Axelsson <gozem@linux.nu>
4 * Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@netfilter.org>
31 ip_set_id_t ip_set_max; /* max number of sets */
61 ip_set_dereference((inst)->ip_set_list)[id]
63 rcu_dereference_raw((inst)->ip_set_list)[id]
87 find_set_type(const char *name, u8 family, u8 revision) in find_set_type() argument
93 if (STRNCMP(type->name, name) && in find_set_type()
94 (type->family == family || in find_set_type()
95 type->family == NFPROTO_UNSPEC) && in find_set_type()
[all …]
/kernel/linux/linux-6.6/net/netfilter/ipset/
Dip_set_core.c1 // SPDX-License-Identifier: GPL-2.0-only
2 /* Copyright (C) 2000-2002 Joakim Axelsson <gozem@linux.nu>
4 * Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@netfilter.org>
31 ip_set_id_t ip_set_max; /* max number of sets */
57 rcu_dereference_protected((inst)->ip_set_list, \
60 (inst)->is_deleted)
64 rcu_dereference_raw((inst)->ip_set_list)[id]
88 find_set_type(const char *name, u8 family, u8 revision) in find_set_type() argument
94 if (STRNCMP(type->name, name) && in find_set_type()
95 (type->family == family || in find_set_type()
[all …]
/kernel/linux/linux-5.10/drivers/hwmon/occ/
Dcommon.c1 // SPDX-License-Identifier: GPL-2.0+
7 #include <linux/hwmon-sysfs.h>
97 u16 max; member
107 u16 max; member
116 u8 name[4]; member
127 u16 checksum = occ->poll_cmd_data + occ->seq_no + 1; in occ_poll()
132 cmd[0] = occ->seq_no++; /* sequence number */ in occ_poll()
136 cmd[4] = occ->poll_cmd_data; /* data */ in occ_poll()
142 rc = occ->send_cmd(occ, cmd); in occ_poll()
144 occ->last_error = rc; in occ_poll()
[all …]

12345678910>>...43