Home
last modified time | relevance | path

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

12345678910>>...35

/openbmc/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 …]
/openbmc/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
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 …]
/openbmc/linux/drivers/platform/x86/intel/uncore-frequency/
H A 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 …]
/openbmc/linux/drivers/ptp/
H A 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 …]
/openbmc/linux/Documentation/userspace-api/netlink/
H A 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 …]
/openbmc/linux/Documentation/netlink/
H A 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 …]
H A 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 …]
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
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 …]
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
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.
36 uapi-header:
[all …]
/openbmc/linux/drivers/gpu/drm/i915/
H A 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 …]
/openbmc/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 Dabituguru.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * abituguru.c Copyright (c) 2005-2006 Hans de Goede <hdegoede@redhat.com>
23 #include <linux/hwmon-sysfs.h>
32 /* max nr of sensors in bank1, a bank1 sensor can be in, temp or nc */
35 * Warning if you increase one of the 2 MAX defines below to 10 or higher you
38 /* max nr of sensors in bank2, currently mb's with max 6 fans are known */
40 /* max nr of pwm outputs, currently mb's with max 5 pwm outputs are known */
44 #define ABIT_UGURU_VOLT_HIGH_ALARM_ENABLE 0x02 /* volt over max */
47 #define ABIT_UGURU_VOLT_HIGH_ALARM_FLAG 0x20 /* volt is over max */
64 * of the time it will reach this status within 30 - 90 ISA reads, and thus we
[all …]
H A Dadt7475.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * adt7475 - Thermal sensor driver for the ADT7475 chip and derivatives
4 * Copyright (C) 2007-2008, Advanced Micro Devices, Inc.
17 #include <linux/hwmon-sysfs.h>
18 #include <linux/hwmon-vid.h>
28 #define MAX 2 macro
36 * These are unique identifiers for the sysfs functions - unlike the
232 if (!(data->config5 & CONFIG5_TWOSCOMP)) { in temp2reg()
233 val = clamp_val(val, -64000, 191000); in temp2reg()
236 val = clamp_val(val, -128000, 127000); in temp2reg()
[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 …]
/openbmc/linux/tools/net/ynl/
H A 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 …]
H A Dynl-gen-c.py2 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
15 def c_upper(name): argument
16 return name.upper().replace('-', '_')
19 def c_lower(name): argument
20 return name.lower().replace('-', '_')
25 return 'ys->family_id'
30 … return f"mnl_cb_run2(ys->rx_buf, len, 0, 0, {cb}, {data},{ind}ynl_cb_array, NLMSG_MIN_TYPE)"
32 return f"mnl_cb_run2(ys->rx_buf, len, ys->seq, ys->portid,{ind}{cb}, {data},{ind}" + \
37 def __init__(self, family, attr_set, attr, value): argument
38 super().__init__(family, attr_set, attr, value)
[all …]
/openbmc/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 …]
/openbmc/linux/drivers/staging/greybus/
H A 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 …]
/openbmc/linux/drivers/hwmon/occ/
H A Dcommon.c1 // SPDX-License-Identifier: GPL-2.0+
7 #include <linux/hwmon-sysfs.h>
106 u16 max; member
116 u16 max; member
125 u8 name[4]; member
144 cmd[4] = occ->poll_cmd_data; /* data */ in occ_poll()
149 rc = occ->send_cmd(occ, cmd, sizeof(cmd), &occ->resp, sizeof(occ->resp)); in occ_poll()
151 occ->last_error = rc; in occ_poll()
152 if (occ->error_count++ > OCC_ERROR_COUNT_THRESHOLD) in occ_poll()
153 occ->error = rc; in occ_poll()
[all …]
/openbmc/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 …]
/openbmc/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 …]
/openbmc/linux/tools/net/ynl/generated/
H A Dethtool-user.c1 // SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
2 /* Do not edit directly, auto-generated from: */
4 /* YNL-GEN user source */
5 /* YNL-ARG --user-header linux/ethtool_netlink.h --exclude-op stats-get */
9 #include "ethtool-user.h"
20 [ETHTOOL_MSG_STRSET_GET] = "strset-get",
21 [ETHTOOL_MSG_LINKINFO_GET] = "linkinfo-get",
22 [3] = "linkinfo-ntf",
23 [ETHTOOL_MSG_LINKMODES_GET] = "linkmodes-get",
24 [5] = "linkmodes-ntf",
[all …]
/openbmc/linux/drivers/pci/
H A Dslot.c1 // SPDX-License-Identifier: GPL-2.0
4 * Copyright (C) 2006-2009 Hewlett-Packard Development Company, L.P.
19 struct attribute *attr, char *buf) in pci_slot_attr_show() argument
22 struct pci_slot_attribute *attribute = to_pci_slot_attr(attr); in pci_slot_attr_show()
23 return attribute->show ? attribute->show(slot, buf) : -EIO; in pci_slot_attr_show()
27 struct attribute *attr, const char *buf, size_t len) in pci_slot_attr_store() argument
30 struct pci_slot_attribute *attribute = to_pci_slot_attr(attr); in pci_slot_attr_store()
31 return attribute->store ? attribute->store(slot, buf, len) : -EIO; in pci_slot_attr_store()
41 if (slot->number == 0xff) in address_read_file()
43 pci_domain_nr(slot->bus), in address_read_file()
[all …]
/openbmc/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"
76 {0x0000, 19, -1}, /* diagnostics */
77 /* handled by kernel: dell-laptop */
85 u16 max; member
121 /* handled by kernel: dell-laptop */
137 case -1: /* Completed with error */ in dell_smbios_error()
138 return -EIO; in dell_smbios_error()
139 case -2: /* Function not supported */ in dell_smbios_error()
[all …]

12345678910>>...35