| /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/soundwire/ |
| H A D | mipi_disco.c | 1 // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) 2 // Copyright(c) 2015-17 Intel Corporation. 47 * sdw_master_read_prop() - Read Master properties 52 struct sdw_master_prop *prop = &bus->prop; in sdw_master_read_prop() local 60 device_property_read_u32(bus->dev, in sdw_master_read_prop() 61 "mipi-sdw-sw-interface-revision", in sdw_master_read_prop() 62 &prop->revision); in sdw_master_read_prop() 66 "mipi-sdw-link-%d-subproperties", bus->link_id); in sdw_master_read_prop() 68 link = device_get_named_child_node(bus->dev, name); in sdw_master_read_prop() 70 dev_err(bus->dev, "Master node %s not found\n", name); in sdw_master_read_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/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/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 | parser.y | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> 102 $$->filename, $$->lineno); 144 printd(DEBUG_PARSE, "%s:%d:config %s\n", cur_filename, cur_lineno, $2->name); 150 if (!current_entry->prompt) { 152 current_entry->filename, current_entry->linen 502 struct property *prop; global() variable 538 struct property *prop; choice_check_sanity() local 678 struct property *prop; print_symbol() local 761 struct property *prop; zconfdump() local [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 …]
|
| /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_obj(*prop); in omapdss_update_prop() 50 if (!prop) in omapdss_update_prop() 53 prop->name = "compatible"; in omapdss_update_prop() [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/samples/rust/ |
| H A D | rust_driver_platform.rs | 1 // SPDX-License-Identifier: GPL-2.0 7 //! This demonstrates how to test an ACPI-based Rust platform driver using QEMU 36 //! iasl -tc ssdt.dsl 44 //! qemu-system-x86_64 -m 512M \ 45 //! -enable-kv 134 let prop = fwnode.property_read::<CString>(name).required_by(dev)?; properties_parse() localVariable 138 let prop = fwnode.property_read_bool(c_str!("test,bool-prop")); properties_parse() localVariable 146 let prop = fwnode.property_read::<u32>(name).or(0x12); properties_parse() localVariable 155 let prop: u32 = fwnode.property_read(name).required_by(dev)?; properties_parse() localVariable 159 let prop: [i16; 4] = fwnode.property_read(name).required_by(dev)?; properties_parse() localVariable 165 let prop: KVec<i16> = fwnode.property_read_array_vec(name, 4)?.required_by(dev)?; properties_parse() localVariable 171 let prop: FwNodeReferenceArgs = child.property_get_reference_args(name, nargs, 0)?; properties_parse() localVariable [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/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->slav in sdw_mockup_pcm_hw_params() 135 struct sdw_slave_prop *prop = &slave->prop; sdw_mockup_read_prop() local [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 …]
|
| H A D | mmu.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Copyright 2016-2022 HabanaLabs, Ltd. 16 * hl_mmu_get_funcs() - get MMU functions structure 26 return &hdev->mmu_func[pgt_residency]; in hl_mmu_get_funcs() 31 struct asic_fixed_properties *prop = &hdev->asic_prop; in hl_is_dram_va() local 33 return hl_mem_area_inside_range(virt_addr, prop->dmmu.page_size, in hl_is_dram_va() 34 prop->dmmu.start_addr, in hl_is_dram_va() 35 prop->dmmu.end_addr); in hl_is_dram_va() 39 * hl_mmu_init() - initialize the MMU module. 42 * Return: 0 for success, non-zero for failure. [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()
|
| H A D | btext.c | 1 // SPDX-License-Identifier: GPL-2.0 136 * - build some kind of vgacon with it to enable early printk 137 * - move to a separate file 138 * - add a few video driver hooks to keep in sync with display 152 offset = ((unsigned long) dispDeviceBase) - base; in btext_map() 166 const u32 *prop; in btext_initialize() local 168 prop = of_get_property(np, "linux,bootx-width", NULL); in btext_initialize() 169 if (prop == NULL) in btext_initialize() 170 prop = of_get_property(np, "width", NULL); in btext_initialize() 171 if (prop == NULL) in btext_initialize() [all …]
|
| /linux/tools/testing/selftests/bpf/ |
| H A D | json_writer.c | 1 // SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) 32 for (i = 0; i < self->depth; ++i) in jsonw_indent() 33 fputs(" ", self->out); in jsonw_indent() 39 if (!self->pretty) in jsonw_eol() 42 putc('\n', self->out); in jsonw_eol() 49 if (self->sep != '\0') in jsonw_eor() 50 putc(self->sep, self->out); in jsonw_eor() 51 self->sep = ','; in jsonw_eor() 59 putc('"', self->out); in jsonw_puts() 63 fputs("\\t", self->out); in jsonw_puts() [all …]
|
| /linux/tools/bpf/bpftool/ |
| H A D | json_writer.c | 1 // SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) 32 for (i = 0; i < self->depth; ++i) in jsonw_indent() 33 fputs(" ", self->out); in jsonw_indent() 39 if (!self->pretty) in jsonw_eol() 42 putc('\n', self->out); in jsonw_eol() 49 if (self->sep != '\0') in jsonw_eor() 50 putc(self->sep, self->out); in jsonw_eor() 51 self->sep = ','; in jsonw_eor() 59 putc('"', self->out); in jsonw_puts() 63 fputs("\\t", self->out); in jsonw_puts() [all …]
|
| /linux/drivers/gpu/drm/amd/amdkfd/ |
| H A D | kfd_kernel_queue.c | 1 // SPDX-License-Identifier: GPL-2.0 OR MIT 3 * Copyright 2014-2022 Advanced Micro Devices, Inc. 37 #define PM4_COUNT_ZERO (((1 << 15) - 1) << 16) 45 struct queue_properties prop; in kq_initialize() local 51 memset(&prop, 0, sizeof(prop)); in kq_initialize() 58 kq->dev = dev; in kq_initialize() 59 kq->nop_packet = nop.u32all; in kq_initialize() 60 kq->mqd_mgr = dev->dqm->mqd_mgrs[KFD_MQD_TYPE_HIQ]; in kq_initialize() 61 if (!kq->mqd_mgr) in kq_initialize() 64 prop.doorbell_ptr = kfd_get_kernel_doorbell(dev->kfd, &prop.doorbell_off); in kq_initialize() [all …]
|
| /linux/arch/sparc/prom/ |
| H A D | tree_32.c | 1 // SPDX-License-Identifier: GPL-2.0 30 cnode = prom_nodeops->no_child(node); in __prom_getchild() 44 if ((s32)node == -1) in prom_getchild() 48 if (cnode == 0 || (s32)cnode == -1) in prom_getchild() 62 cnode = prom_nodeops->no_nextnode(node); in __prom_getsibling() 76 if ((s32)node == -1) in prom_getsibling() 80 if (sibnode == 0 || (s32)sibnode == -1) in prom_getsibling() 87 /* Return the length in bytes of property 'prop' at node 'node'. 88 * Return -1 on error. 90 int prom_getproplen(phandle node, const char *prop) in prom_getproplen() argument [all …]
|
| /linux/arch/powerpc/platforms/pseries/ |
| H A D | reconfig.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * pSeries_reconfig.c - support for dynamic reconfiguration (including PCI 26 int err = -ENOMEM; in pSeries_reconfig_add_node() 32 np->full_name = kstrdup(kbasename(path), GFP_KERNEL); in pSeries_reconfig_add_node() 33 if (!np->full_name) in pSeries_reconfig_add_node() 36 np->properties = proplist; in pSeries_reconfig_add_node() 40 np->parent = pseries_of_derive_parent(path); in pSeries_reconfig_add_node() 41 if (IS_ERR(np->parent)) { in pSeries_reconfig_add_node() 42 err = PTR_ERR(np->parent); in pSeries_reconfig_add_node() 52 of_node_put(np->parent); in pSeries_reconfig_add_node() [all …]
|
| /linux/drivers/memory/ |
| H A D | stm32-fmc2-ebi.c | 1 // SPDX-License-Identifier: GPL-2.0 210 * struct stm32_fmc2_prop - STM32 FMC2 EBI property 234 const struct stm32_fmc2_prop *prop, int cs); 237 const struct stm32_fmc2_prop *prop, 242 const struct stm32_fmc2_prop *prop, in stm32_fmc2_ebi_check_mux() argument 248 ret = regmap_read(ebi->regmap, FMC2_BCR(cs), &bcr); in stm32_fmc2_ebi_check_mux() 255 return -EINVAL; in stm32_fmc2_ebi_check_mux() 259 const struct stm32_fmc2_prop *prop, in stm32_fmc2_ebi_check_waitcfg() argument 265 ret = regmap_read(ebi->regmap, FMC2_BCR(cs), &bcr); in stm32_fmc2_ebi_check_waitcfg() 272 return -EINVAL; in stm32_fmc2_ebi_check_waitcfg() [all …]
|