Home
last modified time | relevance | path

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

12345678910>>...23

/linux/drivers/firmware/efi/
H A 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
85 static struct esre_attribute *to_attr(struct attribute *attr) in to_attr() argument
87 return container_of(attr, struct esre_attribute, attr); in to_attr()
94 struct esre_attribute *attr = to_attr(_attr); in esre_attr_show() local
96 return attr->show(entry, buf); in esre_attr_show()
108 efi_guid_to_str(&entry->esre.esre1->fw_class, str); in fw_class_show()
112 return str - buf; in fw_class_show()
117 #define esre_attr_decl(name, size, fmt) \ argument
[all …]
/linux/arch/powerpc/platforms/powernv/
H A 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 …]
/linux/drivers/gpu/drm/xe/
H A Dxe_hw_engine_class_sysfs.c1 // SPDX-License-Identifier: MIT
20 * xe_hw_engine_timeout_in_range - Helper to check if timeout is in range
23 * @max: max value of valid range
25 * This helper helps to validate if timeout is in min-max range of HW engine
30 bool xe_hw_engine_timeout_in_range(u64 timeout, u64 min, u64 max) in xe_hw_engine_timeout_in_range() argument
32 return timeout >= min && timeout <= max; in xe_hw_engine_timeout_in_range()
41 struct attribute *attr, in xe_hw_engine_class_sysfs_attr_show() argument
46 ssize_t ret = -EIO; in xe_hw_engine_class_sysfs_attr_show()
48 kattr = container_of(attr, struct kobj_attribute, attr); in xe_hw_engine_class_sysfs_attr_show()
49 if (kattr->show) { in xe_hw_engine_class_sysfs_attr_show()
[all …]
/linux/Documentation/netlink/specs/
H A Dnlctrl.yaml1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
2 ---
3 name: nlctrl
4 protocol: genetlink-legacy
5 uapi-header: linux/genetlink.h
8 genetlink meta-family that exposes information about all genetlink
12 -
13 name: op-flags
15 enum-name:
17 - admin-perm
[all …]
/linux/tools/net/ynl/pyynl/
H A Dynl_gen_c.py2 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
19 def c_upper(name): argument
20 return name.upper().replace('-', '_')
23 def c_lower(name): argument
24 return name.lower().replace('-', '_')
27 def limit_to_number(name): argument
29 Turn a string limit like u32-max or s64-min into its numerical value
31 if name[0] == 'u' and name.endswith('-min'):
33 width = int(name[1:-4])
34 if name[0] == 's':
[all …]
H A Dethtool.py2 # SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
17 Verify and convert command-line arguments to the ynl-compatible request.
20 valid_attrs.remove('header') # not user-provided
28 attr = args[i]
30 print(f'expected value for \'{attr}\'')
68 print_speed(name, value) global() argument
109 bits_to_dict(attr) global() argument
[all...]
/linux/drivers/gpu/drm/i915/
H A Di915_hwmon.c1 // SPDX-License-Identifier: MIT
7 #include <linux/hwmon-sysfs.h>
21 * SF_* - scale factors for particular quantities according to hwmon spec.
22 * - voltage - millivolts
23 * - power - microwatts
24 * - curr - milliamperes
25 * - energy - microjoules
26 * - time - milliseconds
61 char name[12]; member
81 struct i915_hwmon *hwmon = ddat->hwmon; in hwm_locked_with_pm_intel_uncore_rmw()
[all …]
/linux/Documentation/netlink/
H A 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
9 name:
11 pattern: ^[0-9a-z-]+$
12 name-cap:
14 pattern: ^[0-9a-zA-Z-]+$
18 len-or-define:
20 pattern: ^[0-9A-Za-z_-]+( - 1)?$
[all …]
H A Dgenetlink.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
9 name:
11 pattern: ^[0-9a-z-]+$
15 len-or-define:
17 pattern: ^[0-9A-Za-z_-]+( - 1)?$
19 len-or-limit:
20 # literal int, const name, or limit based on fixed-width type
[all …]
/linux/drivers/hwmon/
H A 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 …]
H A 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 …]
H A Dlm77.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * lm77.c - Part of lm_sensors, Linux kernel modules for hardware
21 #include <linux/hwmon-sysfs.h>
65 #define LM77_TEMP_MIN (-55000)
83 * All registers are word-sized, except for the configuration register.
84 * The LM77 uses the high-byte first convention.
105 struct i2c_client *client = data->client; in lm77_update_device()
108 mutex_lock(&data->update_lock); in lm77_update_device()
110 if (time_after(jiffies, data->last_updated + HZ + HZ / 2) in lm77_update_device()
111 || !data->valid) { in lm77_update_device()
[all …]
H A Dltc2992.c1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 * LTC2992 - Dual Wide Range Power Monitor
108 #define LTC2992_GPIO_BIT(x) (LTC2992_GPIO_NR - (x) - 1)
121 u8 max; member
135 .max = LTC2992_G1_MAX,
147 .max = LTC2992_G2_MAX,
159 .max = LTC2992_G3_MAX,
171 .max = LTC2992_G4_MAX,
194 ret = regmap_bulk_read(st->regmap, addr, regvals, reg_len); in ltc2992_read_reg()
200 val |= regvals[reg_len - i - 1] << (i * 8); in ltc2992_read_reg()
[all …]
/linux/net/netfilter/ipset/
H A 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 …]
/linux/drivers/staging/greybus/
H A 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 …]
H A Dlight.c1 // SPDX-License-Identifier: GPL-2.0
11 #include <linux/led-class-flash.h>
15 #include <media/v4l2-flash-led-class.h>
45 char *name; member
69 return channel->light->glights->connection; in get_conn_from_channel()
74 return light->glights->connection; in get_conn_from_light()
79 return !!(channel->mode & (GB_CHANNEL_MODE_FLASH | GB_CHANNEL_MODE_TORCH in is_channel_flash()
92 return &channel->fled.led_cdev; in get_channel_cdev()
101 for (i = 0; i < light->channels_count; i++) { in get_channel_from_mode()
102 channel = &light->channels[i]; in get_channel_from_mode()
[all …]
/linux/tools/testing/selftests/mqueue/
H A Dmq_open_tests.c42 " path Path name of the message queue to create\n"
59 mqd_t queue = -1;
68 static inline void test_queue(struct mq_attr *attr, struct mq_attr *result);
69 static inline int test_queue_fail(struct mq_attr *attr, struct mq_attr *result);
87 if (seteuid(0) == -1) in shutdown()
90 if (queue != -1) in shutdown()
123 shutdown(4, "Error reading /proc entry", __LINE__ - 1); in get()
134 __LINE__ - 1); in set()
138 __LINE__ - 1); in set()
144 shutdown(6, "getrlimit()", __LINE__ - 1); in getr()
[all …]
/linux/drivers/firmware/efi/stmm/
H A Dmm_communication.h1 /* SPDX-License-Identifier: GPL-2.0+ */
4 * in OP-TEE. Most of the structs and defines resemble the EDK2 naming.
16 * Secure Partition running at Secure-EL0
22 * Defined in OP-TEE, this UUID is used to identify the pseudo-TA.
23 * OP-TEE is using big endian GUIDs while UEFI uses little endian ones
34 * struct efi_mm_communicate_header - Header used for SMM variable communication
56 #define ARM_SVC_SPM_RET_NOT_SUPPORTED -1
57 #define ARM_SVC_SPM_RET_INVALID_PARAMS -2
58 #define ARM_SVC_SPM_RET_DENIED -3
59 #define ARM_SVC_SPM_RET_NO_MEMORY -5
[all …]
/linux/drivers/nvdimm/
H A Ddimm_devs.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright(c) 2013-2015 Intel Corporation. All rights reserved.
14 #include "nd-core.h"
29 if (!nvdimm->cmd_mask || in nvdimm_check_config_data()
30 !test_bit(ND_CMD_GET_CONFIG_DATA, &nvdimm->cmd_mask)) { in nvdimm_check_config_data()
31 if (test_bit(NDD_LABELING, &nvdimm->flags)) in nvdimm_check_config_data()
32 return -ENXIO; in nvdimm_check_config_data()
34 return -ENOTTY; in nvdimm_check_config_data()
45 return -EINVAL; in validate_dimm()
47 rc = nvdimm_check_config_data(ndd->dev); in validate_dimm()
[all …]
/linux/drivers/platform/x86/dell/
H A Ddell-smbios-base.c1 // SPDX-License-Identifier: GPL-2.0-only
10 * Copyright (C) 2005-2014 Dell Inc.
23 #include "dell-smbios.h"
77 {0x0000, 19, -1}, /* diagnostics */
78 /* handled by kernel: dell-laptop */
87 u16 max; member
123 /* handled by kernel: dell-laptop */
139 case -1: /* Completed with error */ in dell_smbios_error()
140 return -EIO; in dell_smbios_error()
141 case -2: /* Function not supported */ in dell_smbios_error()
[all …]
/linux/drivers/mtd/parsers/
H A Dqcomsmempart.c1 // SPDX-License-Identifier: GPL-2.0-only
28 * struct smem_flash_pentry - SMEM Flash partition entry
29 * @name: Name of the partition
32 * @attr: Flags for this partition
35 char name[SMEM_FLASH_PTABLE_NAME_SIZE]; member
38 u8 attr; member
42 * struct smem_flash_ptable - SMEM Flash partition table
66 char *name, *c; in parse_qcomsmem_part() local
69 && mtd->type == MTD_NORFLASH) { in parse_qcomsmem_part()
71 mtd->name); in parse_qcomsmem_part()
[all …]
/linux/arch/powerpc/platforms/pseries/
H A Dplpks-secvar.c1 // SPDX-License-Identifier: GPL-2.0-only
24 #define PLPKS_CONFIG_ATTR(name, fmt, func) \ argument
25 static ssize_t name##_show(struct kobject *kobj, \
26 struct kobj_attribute *attr, \
31 static struct kobj_attribute attr_##name = __ATTR_RO(name)
41 &attr_version.attr,
42 &attr_max_object_size.attr,
43 &attr_total_size.attr,
44 &attr_used_space.attr,
45 &attr_supported_policies.attr,
[all …]
/linux/kernel/
H A Dparams.c1 // SPDX-License-Identifier: GPL-2.0-or-later
20 /* Protects all built-in parameters, modules use their own param_lock */
23 /* Use the module's mutex, or if built-in use the built-in mutex */
25 #define KPARAM_MUTEX(mod) ((mod) ? &(mod)->param_lock : &param_lock)
57 list_add(&p->list, &kmalloced_params); in kmalloc_parameter()
60 return p->val; in kmalloc_parameter()
70 if (p->val == param) { in maybe_kfree_parameter()
71 list_del(&p->list); in maybe_kfree_parameter()
81 if (c == '-') in dash2underscore()
104 if (kp->flags & KERNEL_PARAM_FL_HWPARAM && in param_check_unsafe()
[all …]
/linux/lib/kunit/
H A Dattributes.c1 // SPDX-License-Identifier: GPL-2.0
13 * PRINT_ALWAYS - attribute is printed for every test case and suite if set
14 * PRINT_SUITE - attribute is printed for every suite if set but not for test cases
15 * PRINT_NEVER - attribute is never printed
24 * struct kunit_attr - represents a test attribute and holds flexible
27 * @name: name of test attribute, eg. speed
37 const char *name; member
39 const char *(*to_string)(void *attr, bool *to_free);
40 int (*filter)(void *attr, const char *input, int *err);
51 static const char *attr_enum_to_string(void *attr, const char * const str_list[], bool *to_free) in attr_enum_to_string() argument
[all …]
/linux/mm/damon/
H A Dsysfs-schemes.c1 // SPDX-License-Identifier: GPL-2.0
11 #include "sysfs-common.h"
34 sysfs_region->kobj = (struct kobject){}; in damon_sysfs_scheme_region_alloc()
35 sysfs_region->ar = region->ar; in damon_sysfs_scheme_region_alloc()
36 sysfs_region->nr_accesses = region->nr_accesses_bp / 10000; in damon_sysfs_scheme_region_alloc()
37 sysfs_region->age = region->age; in damon_sysfs_scheme_region_alloc()
38 INIT_LIST_HEAD(&sysfs_region->list); in damon_sysfs_scheme_region_alloc()
42 static ssize_t start_show(struct kobject *kobj, struct kobj_attribute *attr, in start_show() argument
48 return sysfs_emit(buf, "%lu\n", region->ar.start); in start_show()
51 static ssize_t end_show(struct kobject *kobj, struct kobj_attribute *attr, in end_show() argument
[all …]

12345678910>>...23