/linux/scripts/dtc/ |
H A D | checks.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 12 fprintf(stderr, "=== %s: ", (c)->name); \ 63 struct property *prop, in check_msg() argument 71 if (!(c->warn && (quiet < 1)) && !(c->error && (quiet < 2))) in check_msg() 74 if (prop && prop->srcpos) in check_msg() 75 pos = prop->srcpos; in check_msg() 76 else if (node && node->srcpos) in check_msg() 77 pos = node->srcpos; in check_msg() 83 } else if (streq(dti->outname, "-")) { in check_msg() 86 xasprintf(&str, "%s", dti->outname); in check_msg() [all …]
|
H A D | livetree.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 19 if (streq(new->label, label)) { in add_label() 20 new->deleted = 0; in add_label() 26 new->label = label; in add_label() 27 new->next = *labels; in add_label() 36 label->deleted = 1; in delete_labels() 46 new->name = xstrdup(name); in build_property() 47 new->val = val; in build_property() 48 new->srcpos = srcpos_copy(srcpos); in build_property() 59 new->name = xstrdup(name); in build_property_delete() [all …]
|
H A D | treesource.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 22 yyin = current_srcfile->f; in dt_from_source() 51 const char *end = s + len - 1; in write_propval_string() 142 static void add_string_markers(struct property *prop) in add_string_markers() argument 144 int l, len = prop->val.len; in add_string_markers() 145 const char *p = prop->val.val; in add_string_markers() 151 m->offset = l; in add_string_markers() 152 m->type = TYPE_STRING; in add_string_markers() 153 m->ref = NULL; in add_string_markers() 154 m->next = NULL; in add_string_markers() [all …]
|
/linux/arch/powerpc/mm/ |
H A D | drmem.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 27 last_lmb = &drmem_info->lmbs[drmem_info->n_lmbs - 1]; in drmem_lmb_memory_max() 28 return last_lmb->base_addr + drmem_lmb_size(); in drmem_lmb_memory_max() 37 return lmb->flags & ~DRMEM_LMB_RESERVED; in drmem_lmb_flags() 40 static struct property *clone_property(struct property *prop, u32 prop_sz) in clone_property() argument 48 new_prop->name = kstrdup(prop->name, GFP_KERNEL); in clone_property() 49 new_prop->value = kzalloc(prop_sz, GFP_KERNEL); in clone_property() 50 if (!new_prop->name || !new_prop->value) { in clone_property() 51 kfree(new_prop->name); in clone_property() 52 kfree(new_prop->value); in clone_property() [all …]
|
/linux/drivers/staging/greybus/ |
H A D | power_supply.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright 2014-2015 Google Inc. 6 * Copyright 2014-2015 Linaro Ltd. 18 enum power_supply_property prop; member 63 #define POWER_SUPPLY_PROP_VOLTAGE_BOOT -1 66 #define POWER_SUPPLY_PROP_CURRENT_BOOT -1 69 #define POWER_SUPPLY_PROP_CALIBRATE -1 76 * back-off exponential 82 enum power_supply_property prop; member 85 struct gb_power_supply_prop *prop); [all …]
|
/linux/drivers/base/test/ |
H A D | property-entry-test.c | 1 // SPDX-License-Identifier: GPL-2.0 13 PROPERTY_ENTRY_U8("prop-u8", 8), in pe_test_uints() 14 PROPERTY_ENTRY_U16("prop-u16", 16), in pe_test_uints() 15 PROPERTY_ENTRY_U32("prop-u32", 32), in pe_test_uints() 16 PROPERTY_ENTRY_U64("prop-u64", 64), in pe_test_uints() 30 error = fwnode_property_count_u8(node, "prop-u8"); in pe_test_uints() 33 error = fwnode_property_read_u8(node, "prop-u8", &val_u8); in pe_test_uints() 37 error = fwnode_property_read_u8_array(node, "prop-u8", array_u8, 1); in pe_test_uints() 41 error = fwnode_property_read_u8_array(node, "prop-u8", array_u8, 2); in pe_test_uints() 44 error = fwnode_property_read_u8(node, "no-prop-u8", &val_u8); in pe_test_uints() [all …]
|
/linux/drivers/gpu/drm/ |
H A D | drm_mode_config.c | 32 #include <linux/dma-resv.h> 78 * drm_mode_getresources - get graphics configuration 107 return -EOPNOTSUPP; in drm_mode_getresources() 109 mutex_lock(&file_priv->fbs_lock); in drm_mode_getresources() 111 fb_id = u64_to_user_ptr(card_res->fb_id_ptr); in drm_mode_getresources() 112 list_for_each_entry(fb, &file_priv->fbs, filp_head) { in drm_mode_getresources() 113 if (count < card_res->count_fbs && in drm_mode_getresources() 114 put_user(fb->base.id, fb_id + count)) { in drm_mode_getresources() 115 mutex_unlock(&file_priv->fbs_lock); in drm_mode_getresources() 116 return -EFAULT; in drm_mode_getresources() [all …]
|
/linux/scripts/kconfig/ |
H A D | menu.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> 22 * menu_next - return the next menu entry with depth-first traversal 24 * @root: root of the sub-tree to traverse. If NULL is given, the traveral 30 if (menu->list) in menu_next() 31 return menu->list; in menu_next() 33 while (menu != root && !menu->next) in menu_next() 34 menu = menu->parent; in menu_next() 39 return menu->next; in menu_next() 46 fprintf(stderr, "%s:%d:warning: ", menu->filename, menu->lineno); in menu_warn() [all …]
|
H A D | symbol.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> 47 enum symbol_type type = sym->type; in sym_get_type() 74 * sym_get_prompt_menu - get the menu entry with a prompt 84 list_for_each_entry(m, &sym->menus, link) in sym_get_prompt_menu() 85 if (m->prompt) in sym_get_prompt_menu() 92 * sym_get_choice_menu - get the parent choice menu if present 111 menu = menu->parent; in sym_get_choice_menu() 112 } while (menu && !menu->sym); in sym_get_choice_menu() 114 if (menu && menu->sym && sym_is_choice(menu->sym)) in sym_get_choice_menu() [all …]
|
H A D | parser.y | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> 101 $$->filename, $$->lineno); 143 printd(DEBUG_PARSE, "%s:%d:config %s\n", cur_filename, cur_lineno, $2->name); 149 if (!current_entry->prompt) { 151 current_entry->filename, current_entry->lineno); 155 if (current_entry->sym->type != S_BOOLEAN) { 157 current_entry->filename, current_entry->lineno); 166 if (list_empty(¤t_entry->sym->choice_link)) 167 list_add_tail(¤t_entry->sym->choice_link, [all …]
|
/linux/tools/testing/selftests/power_supply/ |
H A D | helpers.sh | 2 # SPDX-License-Identifier: GPL-2.0 12 PROP="$1" 15 PROP_PATH="$SYSFS_SUPPLIES"/"$DEVNAME"/"$PROP" 16 TEST_NAME="$DEVNAME".sysfs."$PROP" 18 if [ -z "$VALUE" ]; then 19 ktap_test_result "$TEST_NAME" [ -f "$PROP_PATH" ] 21 ktap_test_result "$TEST_NAME" grep -q "$VALUE" "$PROP_PATH" 30 *[!0-9]* ) return ;; # Not a number 57 PROP=$1 59 PROP_PATH="$SYSFS_SUPPLIES"/"$DEVNAME"/"$PROP" [all …]
|
/linux/drivers/video/fbdev/omap2/omapfb/dss/ |
H A D | omapdss-boot-init.c | 1 // SPDX-License-Identifier: GPL-2.0-only 9 * DT-data in generic manner, we convert the compatible strings of the panel and 10 * encoder nodes from "panel-foo" to "omapdss,panel-foo". This way we can have 32 static int __init omapdss_count_strings(const struct property *prop) in omapdss_count_strings() argument 34 const char *p = prop->value; in omapdss_count_strings() 38 for (i = 0; total < prop->length; total += l, p += l, i++) in omapdss_count_strings() 47 struct property *prop; in omapdss_update_prop() local 49 prop = kzalloc(sizeof(*prop), GFP_KERNEL); in omapdss_update_prop() 50 if (!prop) in omapdss_update_prop() 53 prop->name = "compatible"; in omapdss_update_prop() [all …]
|
/linux/drivers/of/ |
H A D | dynamic.c | 1 // SPDX-License-Identifier: GPL-2.0 28 * of_node_get() - Increment refcount of a node 37 kobject_get(&node->kobj); in of_node_get() 43 * of_node_put() - Decrement refcount of a node 50 kobject_put(&node->kobj); in of_node_put() 77 #define _do_print(func, prefix, action, node, prop, ...) ({ \ argument 78 func("changeset: " prefix "%-15s %pOF%s%s\n", \ 80 prop ? ":" : "", prop ? prop->name : ""); \ 90 of_changeset_action_debug("notify: ", action, pr->dn, pr->prop); in of_reconfig_notify() 97 * of_reconfig_get_state_change() - Returns new state of device [all …]
|
H A D | resolver.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2012 Pantelis Antoniou <panto@antoniou-consulting.com> 32 if (node->phandle != OF_PHANDLE_ILLEGAL && in live_tree_max_phandle() 33 node->phandle > phandle) in live_tree_max_phandle() 34 phandle = node->phandle; in live_tree_max_phandle() 45 const struct property *prop; in adjust_overlay_phandles() local 49 if (overlay->phandle != 0 && overlay->phandle != OF_PHANDLE_ILLEGAL) in adjust_overlay_phandles() 50 overlay->phandle += phandle_delta; in adjust_overlay_phandles() 53 for_each_property_of_node(overlay, prop) { in adjust_overlay_phandles() 55 if (of_prop_cmp(prop->name, "phandle") && in adjust_overlay_phandles() [all …]
|
/linux/drivers/input/ |
H A D | touchscreen.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Generic helper functions for touchscreens and other two-dimensional 39 if (!test_bit(axis, dev->absbit)) { in touchscreen_set_params() 40 dev_warn(&dev->dev, in touchscreen_set_params() 46 absinfo = &dev->absinfo[axis]; in touchscreen_set_params() 47 absinfo->minimum = min; in touchscreen_set_params() 48 absinfo->maximum = max; in touchscreen_set_params() 49 absinfo->fuzz = fuzz; in touchscreen_set_params() 53 * touchscreen_parse_properties - parse common touchscreen properties 56 * single-touch or multi-touch axes [all …]
|
/linux/drivers/platform/x86/amd/pmf/ |
H A D | sps.c | 1 // SPDX-License-Identifier: GPL-2.0 8 * Author: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> 64 pr_debug("Static Slider Data - BEGIN\n"); in amd_pmf_dump_sps_defaults() 68 pr_debug("--- Source:%s Mode:%s ---\n", amd_pmf_source_as_str(i), in amd_pmf_dump_sps_defaults() 70 pr_debug("SPL: %u mW\n", data->prop[i][j].spl); in amd_pmf_dump_sps_defaults() 71 pr_debug("SPPT: %u mW\n", data->prop[i][j].sppt); in amd_pmf_dump_sps_defaults() 72 pr_debug("SPPT_ApuOnly: %u mW\n", data->prop[i][j].sppt_apu_only); in amd_pmf_dump_sps_defaults() 73 pr_debug("FPPT: %u mW\n", data->prop[i][j].fppt); in amd_pmf_dump_sps_defaults() 74 pr_debug("STTMinLimit: %u mW\n", data->prop[i][j].stt_min); in amd_pmf_dump_sps_defaults() 76 data->prop[i][j].stt_skin_temp[STT_TEMP_APU]); in amd_pmf_dump_sps_defaults() [all …]
|
/linux/fs/openpromfs/ |
H A D | inode.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Copyright (C) 1996-1999 Jakub Jelinek (jakub@redhat.com) 34 struct property *prop; member 69 struct property *prop = f->private; in property_show() local 73 len = prop->length; in property_show() 74 pval = prop->value; in property_show() 84 len -= n + 1; in property_show() 92 len--; in property_show() 103 len -= 4; in property_show() 150 BUG_ON(oi->type != op_inode_prop); in property_open() [all …]
|
/linux/arch/powerpc/platforms/83xx/ |
H A D | usb_834x.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 26 const void *prop, *dr_mode; in mpc834x_usb_cfg() local 30 return -ENOMEM; in mpc834x_usb_cfg() 38 np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr"); in mpc834x_usb_cfg() 42 prop = of_get_property(np, "phy_type", NULL); in mpc834x_usb_cfg() 44 if (prop && in mpc834x_usb_cfg() 45 (!strcmp(prop, "utmi") || !strcmp(prop, "utmi_wide"))) { in mpc834x_usb_cfg() 49 } else if (prop && !strcmp(prop, "serial")) { in mpc834x_usb_cfg() 57 } else if (prop && !strcmp(prop, "ulpi")) { in mpc834x_usb_cfg() 64 np = of_find_compatible_node(NULL, NULL, "fsl-usb2-mph"); in mpc834x_usb_cfg() [all …]
|
/linux/drivers/power/supply/ |
H A D | power_supply_hwmon.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * power_supply_hwmon.c - power supply hwmon support. 34 return -EINVAL; in power_supply_hwmon_in_to_property() 48 return -EINVAL; in power_supply_hwmon_curr_to_property() 60 return -EINVAL; in power_supply_hwmon_power_to_property() 94 return -EINVAL; in power_supply_hwmon_temp_to_property() 111 return -EINVAL; in power_supply_hwmon_to_property() 143 for (i = 0; i < attr_list->n_attrs; ++i) { in power_supply_hwmon_has_input() 144 int prop = power_supply_hwmon_to_property(type, in power_supply_hwmon_has_input() local 145 attr_list->attrs[i], channel); in power_supply_hwmon_has_input() [all …]
|
/linux/sound/soc/codecs/ |
H A D | sdw-mockup.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // sdw-mockup.c -- a mockup SoundWire codec for tests where only the host 59 struct snd_soc_component *component = dai->component; in sdw_mockup_pcm_hw_params() 67 return -EINVAL; in sdw_mockup_pcm_hw_params() 69 if (!sdw_mockup->slave) in sdw_mockup_pcm_hw_params() 70 return -EINVAL; in sdw_mockup_pcm_hw_params() 75 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in sdw_mockup_pcm_hw_params() 80 ret = sdw_stream_add_slave(sdw_mockup->slave, &stream_config, in sdw_mockup_pcm_hw_params() 83 dev_err(dai->dev, "Unable to configure port\n"); in sdw_mockup_pcm_hw_params() 91 struct snd_soc_component *component = dai->component; in sdw_mockup_pcm_hw_free() [all …]
|
/linux/drivers/accel/habanalabs/common/mmu/ |
H A D | mmu_v2_hr.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Copyright 2020-2022 HabanaLabs, Ltd. 17 hash_for_each_possible(ctx->hr_mmu_phys_hash, pgt_info, node, in hl_mmu_v2_hr_get_pgt_info() 19 if (phys_hop_addr == pgt_info->phys_addr) in hl_mmu_v2_hr_get_pgt_info() 28 hash_add(ctx->hr_mmu_phys_hash, &pgt_info->node, phys_addr); in hl_mmu_v2_hr_add_pgt_info() 33 return &ctx->hdev->mmu_priv.hr.mmu_asid_hop0[ctx->asid]; in hl_mmu_v2_hr_get_hop0_pgt_info() 37 * hl_mmu_v2_hr_init() - initialize the MMU module. 41 * - Create a pool of pages for pgt_infos. 42 * - Create a shadow table for pgt 44 * Return: 0 for success, non-zero for failure. [all …]
|
H A D | mmu_v1.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Copyright 2016-2019 HabanaLabs, Ltd. 20 mask = mmu_prop->hop_masks[hop_idx]; in get_hop_pte_addr() 21 shift = mmu_prop->hop_shifts[hop_idx]; in get_hop_pte_addr() 23 ctx->hdev->asic_prop.mmu_pte_size * ((virt_addr & mask) >> shift); in get_hop_pte_addr() 28 struct hl_device *hdev = ctx->hdev; in dram_default_mapping_init() 29 struct asic_fixed_properties *prop = &hdev->asic_prop; in dram_default_mapping_init() local 34 if ((!prop->dram_supports_virtual_memory) || in dram_default_mapping_init() 35 (!hdev->dram_default_page_mapping) || in dram_default_mapping_init() 36 (ctx->asid == HL_KERNEL_ASID_ID)) in dram_default_mapping_init() [all …]
|
/linux/scripts/dtc/libfdt/ |
H A D | fdt_rw.c | 1 // SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) 3 * libfdt - Flat Device Tree manipulation 32 return -FDT_ERR_BADVERSION; in fdt_rw_probe_() 35 return -FDT_ERR_BADLAYOUT; in fdt_rw_probe_() 58 size_t soff = p - (char *)fdt; in fdt_splice_() 61 return -FDT_ERR_BADOFFSET; in fdt_splice_() 63 return -FDT_ERR_BADOFFSET; in fdt_splice_() 64 if (dsize - oldlen + newlen > fdt_totalsize(fdt)) in fdt_splice_() 65 return -FDT_ERR_NOSPACE; in fdt_splice_() 66 memmove(p + newlen, p + oldlen, ((char *)fdt + dsize) - (p + oldlen)); in fdt_splice_() [all …]
|
/linux/arch/powerpc/kernel/ |
H A D | prom_parse.c | 1 // SPDX-License-Identifier: GPL-2.0 16 const __be32 *prop; in of_parse_dma_window() local 22 prop = of_get_property(dn, "ibm,#dma-address-cells", NULL); in of_parse_dma_window() 23 if (!prop) in of_parse_dma_window() 24 prop = of_get_property(dn, "#address-cells", NULL); in of_parse_dma_window() 26 cells = prop ? of_read_number(prop, 1) : of_n_addr_cells(dn); in of_parse_dma_window() 31 prop = of_get_property(dn, "ibm,#dma-size-cells", NULL); in of_parse_dma_window() 32 cells = prop ? of_read_number(prop, 1) : of_n_size_cells(dn); in of_parse_dma_window()
|
/linux/arch/sparc/kernel/ |
H A D | prom_32.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 * Copyright (C) 1996-2005 Paul Mackerras. 67 regs = rprop->value; in sparc32_path_component() 70 regs->which_io, regs->phys_addr); in sparc32_path_component() 78 struct property *prop; in sbus_path_component() local 80 prop = of_find_property(dp, "reg", NULL); in sbus_path_component() 81 if (!prop) in sbus_path_component() 84 regs = prop->value; in sbus_path_component() 87 regs->which_io, in sbus_path_component() 88 regs->phys_addr); in sbus_path_component() [all …]
|