Home
last modified time | relevance | path

Searched +full:lock +full:- +full:step (Results 1 – 25 of 949) sorted by relevance

12345678910>>...38

/openbmc/linux/kernel/locking/
H A Dosq_lock.c1 // SPDX-License-Identifier: GPL-2.0
7 * An MCS like lock especially tailored for optimistic spinning for sleeping
8 * lock implementations (mutex, rwsem, etc).
27 return node->cpu - 1; in node_cpu()
32 int cpu_nr = encoded_cpu_val - 1; in decode_cpu()
38 * Get a stable @node->next pointer, either for unlock() or unqueue() purposes.
39 * Can return NULL in case we were the last queued and we updated @lock instead.
42 osq_wait_next(struct optimistic_spin_queue *lock, in osq_wait_next() argument
55 old = prev ? prev->cpu : OSQ_UNLOCKED_VAL; in osq_wait_next()
58 if (atomic_read(&lock->tail) == curr && in osq_wait_next()
[all …]
/openbmc/linux/drivers/mtd/nand/
H A Decc-mxic.c1 // SPDX-License-Identifier: GPL-2.0
10 #include <linux/dma-mapping.h>
19 #include <linux/mtd/nand-ecc-mxic.h>
94 struct mutex lock; member
126 struct nand_ecc_engine *eng = nand->ecc.engine; in nand_to_mxic()
128 if (eng->integration == NAND_ECC_ENGINE_INTEGRATION_EXTERNAL) in nand_to_mxic()
140 if (section < 0 || section >= ctx->steps) in mxic_ecc_ooblayout_ecc()
141 return -ERANGE; in mxic_ecc_ooblayout_ecc()
143 oobregion->offset = (section * ctx->oob_step_sz) + ctx->meta_sz; in mxic_ecc_ooblayout_ecc()
144 oobregion->length = ctx->parity_sz; in mxic_ecc_ooblayout_ecc()
[all …]
/openbmc/linux/drivers/leds/flash/
H A Dleds-rt4505.c1 // SPDX-License-Identifier: GPL-2.0-only
6 #include <linux/led-class-flash.h>
11 #include <media/v4l2-flash-led-class.h>
47 struct mutex lock; member
60 mutex_lock(&priv->lock); in rt4505_torch_brightness_set()
63 ret = regmap_update_bits(priv->regmap, in rt4505_torch_brightness_set()
65 (level - 1) << RT4505_ITORCH_SHIFT); in rt4505_torch_brightness_set()
72 ret = regmap_update_bits(priv->regmap, RT4505_REG_ENABLE, in rt4505_torch_brightness_set()
76 mutex_unlock(&priv->lock); in rt4505_torch_brightness_set()
88 mutex_lock(&priv->lock); in rt4505_torch_brightness_get()
[all …]
H A Dleds-ktd2692.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * LED driver : leds-ktd2692.c
12 #include <linux/led-class-flash.h>
30 #define GET_TIMEOUT_OFFSET(timeout, step) ((timeout) / (step)) argument
79 struct mutex lock; member
97 gpiod_direction_output(led->ctrl_gpio, KTD2692_HIGH); in ktd2692_expresswire_start()
103 gpiod_direction_output(led->ctrl_gpio, KTD2692_LOW); in ktd2692_expresswire_reset()
109 gpiod_direction_output(led->ctrl_gpio, KTD2692_LOW); in ktd2692_expresswire_end()
111 gpiod_direction_output(led->ctrl_gpio, KTD2692_HIGH); in ktd2692_expresswire_end()
134 gpiod_direction_output(led->ctrl_gpio, KTD2692_LOW); in ktd2692_expresswire_set_bit()
[all …]
H A Dleds-mt6370-flash.c1 // SPDX-License-Identifier: GPL-2.0-only
15 #include <linux/led-class-flash.h>
22 #include <media/v4l2-flash-led-class.h>
43 #define MT6370_FLCSEN_MASK(_id) BIT(MT6370_LED_FLASH2 - (_id))
79 struct mutex lock; member
90 struct mt6370_priv *priv = led->priv; in mt6370_torch_brightness_set()
91 u32 led_enable_mask = led->led_no == MT6370_LED_JOINT ? MT6370_FLCSEN_MASK_ALL : in mt6370_torch_brightness_set()
92 MT6370_FLCSEN_MASK(led->led_no); in mt6370_torch_brightness_set()
98 mutex_lock(&priv->lock); in mt6370_torch_brightness_set()
104 if (priv->fled_strobe_used) { in mt6370_torch_brightness_set()
[all …]
H A Dleds-mt6360.c1 // SPDX-License-Identifier: GPL-2.0-only
8 #include <linux/led-class-flash.h>
9 #include <linux/led-class-multicolor.h>
15 #include <media/v4l2-flash-led-class.h>
29 #define MT6360_ISNK_ENMASK(_led_no) BIT(7 - (_led_no))
39 #define MT6360_REG_FLEDBASE(_id) (0x372 + 4 * (_id - MT6360_LED_FLASH1))
49 #define MT6360_FLCSEN_MASK(_id) BIT(MT6360_LED_FLASH2 - _id)
89 struct mutex lock; member
102 struct mt6360_priv *priv = led->priv; in mt6360_mc_brightness_set()
106 mutex_lock(&priv->lock); in mt6360_mc_brightness_set()
[all …]
H A Dleds-max77693.c1 // SPDX-License-Identifier: GPL-2.0-only
11 #include <linux/led-class-flash.h>
13 #include <linux/mfd/max77693-common.h>
14 #include <linux/mfd/max77693-private.h>
20 #include <media/v4l2-flash-led-class.h>
78 struct mutex lock; member
96 /* bitmask of FLED outputs use state (bit 0. - FLED1, bit 1. - FLED2) */
109 return (ua - FLASH_IOUT_MIN) / FLASH_IOUT_STEP; in max77693_led_iout_to_reg()
114 return (us - FLASH_TIMEOUT_MIN) / FLASH_TIMEOUT_STEP; in max77693_flash_timeout_to_reg()
127 sub_leds[sub_led->fled_id]); in sub_led_to_led()
[all …]
/openbmc/linux/arch/arm64/kvm/
H A Ddebug.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2015 - Linaro Ltd
12 #include <asm/debug-monitors.h>
36 * When single-step is enabled by userspace, we tweak PSTATE.SS on every
38 * for the vcpu after the single-step is disabled.
44 vcpu->arch.guest_debug_preserved.mdscr_el1 = val; in save_guest_debug_regs()
47 vcpu->arch.guest_debug_preserved.mdscr_el1); in save_guest_debug_regs()
49 vcpu->arch.guest_debug_preserved.pstate_ss = in save_guest_debug_regs()
55 u64 val = vcpu->arch.guest_debug_preserved.mdscr_el1; in restore_guest_debug_regs()
62 if (vcpu->arch.guest_debug_preserved.pstate_ss) in restore_guest_debug_regs()
[all …]
/openbmc/linux/drivers/staging/media/imx/
H A Dimx-media-fim.c1 // SPDX-License-Identifier: GPL-2.0+
13 #include <media/v4l2-ctrls.h>
14 #include <media/v4l2-subdev.h>
16 #include "imx-media.h"
50 spinlock_t lock; /* protect control values */ member
73 return fim->icap_flags != IRQ_TYPE_NONE; in icap_enabled()
79 if (fi->denominator == 0) { in update_fim_nominal()
80 dev_dbg(fim->sd->dev, "no frame interval, FIM disabled\n"); in update_fim_nominal()
81 fim->enabled = false; in update_fim_nominal()
85 fim->nominal = DIV_ROUND_CLOSEST_ULL(1000000ULL * (u64)fi->numerator, in update_fim_nominal()
[all …]
/openbmc/linux/drivers/clk/sunxi-ng/
H A Dccu_phase.c1 // SPDX-License-Identifier: GPL-2.0-or-later
4 * Maxime Ripard <maxime.ripard@free-electrons.com>
7 #include <linux/clk-provider.h>
18 u16 step, parent_div; in ccu_phase_get_phase() local
22 reg = readl(phase->common.base + phase->common.reg); in ccu_phase_get_phase()
23 delay = (reg >> phase->shift); in ccu_phase_get_phase()
24 delay &= (1 << phase->width) - 1; in ccu_phase_get_phase()
32 return -EINVAL; in ccu_phase_get_phase()
37 return -EINVAL; in ccu_phase_get_phase()
42 return -EINVAL; in ccu_phase_get_phase()
[all …]
/openbmc/linux/drivers/clk/sunxi/
H A Dclk-mod0.c1 // SPDX-License-Identifier: GPL-2.0-or-later
9 #include <linux/clk-provider.h>
15 #include "clk-factors.h"
18 * sun4i_a10_get_mod0_factors() - calculates m, n factors for MOD0-style clocks
29 if (req->rate > req->parent_rate) in sun4i_a10_get_mod0_factors()
30 req->rate = req->parent_rate; in sun4i_a10_get_mod0_factors()
32 div = DIV_ROUND_UP(req->parent_rate, req->rate); in sun4i_a10_get_mod0_factors()
45 req->rate = (req->parent_rate >> calcp) / calcm; in sun4i_a10_get_mod0_factors()
46 req->m = calcm - 1; in sun4i_a10_get_mod0_factors()
47 req->p = calcp; in sun4i_a10_get_mod0_factors()
[all …]
/openbmc/linux/drivers/net/ethernet/marvell/mvpp2/
H A Dmvpp2_tai.c1 // SPDX-License-Identifier: GPL-2.0
12 * field will be performed - whether it is a set, increment, decrement
16 * - PTP_PULSE_OUT (PTP_EVENT_REQ MPP)
22 * - PTP_CLK_OUT (PTP_TRIG_GEN MPP)
25 * initially, but if you specify a non-round second interval, it won't,
27 * - PTP_PCLK_OUT
30 * limited by the TOD step size. Its period is defined by the PCLK_CCC
60 spinlock_t lock; member
92 ts->tv_sec = (u64)mvpp2_tai_read(base + 0) << 32 | in mvpp22_tai_read_ts()
96 ts->tv_nsec = mvpp2_tai_read(base + 12) << 16 | in mvpp22_tai_read_ts()
[all …]
/openbmc/linux/sound/soc/codecs/
H A Dwm2000.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * wm2000.c -- WM2000 ALSA Soc Audio driver
5 * Copyright 2008-2011 Wolfson Microelectronics PLC.
13 * system-specific calibration information. If supplied as a
14 * sequence of ASCII-encoded hexidecimal bytes this can be converted
17 * perl -e 'while (<>) { s/[\r\n]+// ; printf("%c", hex($_)); }'
78 struct mutex lock; member
85 return regmap_write(wm2000->regmap, reg, value); in wm2000_write()
90 struct i2c_client *i2c = wm2000->i2c; in wm2000_reset()
96 wm2000->anc_mode = ANC_OFF; in wm2000_reset()
[all …]
/openbmc/linux/drivers/tty/serial/
H A Dar933x_uart.c1 // SPDX-License-Identifier: GPL-2.0
3 * Atheros AR933X SoC built-in UART driver
31 #include <asm/mach-ath79/ar933x_uart.h>
35 #define DRIVER_NAME "ar933x-uart"
60 return readl(up->port.membase + offset); in ar933x_uart_read()
66 writel(value, up->port.membase + offset); in ar933x_uart_write()
98 up->ier |= AR933X_UART_INT_TX_EMPTY; in ar933x_uart_start_tx_interrupt()
99 ar933x_uart_write(up, AR933X_UART_INT_EN_REG, up->ier); in ar933x_uart_start_tx_interrupt()
104 up->ier &= ~AR933X_UART_INT_TX_EMPTY; in ar933x_uart_stop_tx_interrupt()
105 ar933x_uart_write(up, AR933X_UART_INT_EN_REG, up->ier); in ar933x_uart_stop_tx_interrupt()
[all …]
/openbmc/linux/drivers/comedi/drivers/
H A Dni_tiocmd.c1 // SPDX-License-Identifier: GPL-2.0+
11 * Author: J.P. Mellor <jpmellor@rose-hulman.edu>,
19 * This module is not used directly by end-users. Rather, it
26 * DAQ 660x Register-Level Programmer Manual (NI 370505A-01)
27 * DAQ 6601/6602 User Manual (NI 322137B-01)
28 * 340934b.pdf DAQ-STC reference manual
41 struct ni_gpct_device *counter_dev = counter->counter_dev; in ni_tio_configure_dma()
42 unsigned int cidx = counter->counter_index; in ni_tio_configure_dma()
57 switch (counter_dev->variant) { in ni_tio_configure_dma()
78 struct ni_gpct *counter = s->private; in ni_tio_input_inttrig()
[all …]
/openbmc/linux/include/media/
H A Dv4l2-ctrls.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
14 #include <media/media-request.h>
29 * union v4l2_ctrl_ptr - A pointer to a control value.
30 * @p_s32: Pointer to a 32-bit signed value.
31 * @p_s64: Pointer to a 64-bit signed value.
32 * @p_u8: Pointer to a 8-bit unsigned value.
33 * @p_u16: Pointer to a 16-bit unsigned value.
34 * @p_u32: Pointer to a 32-bit unsigned value.
97 * v4l2_ctrl_ptr_create() - Helper function to return a v4l2_ctrl_ptr from a
109 * struct v4l2_ctrl_ops - The control operations that the driver has to provide.
[all …]
/openbmc/linux/arch/mips/sgi-ip22/
H A Dip22-mc.c1 // SPDX-License-Identifier: GPL-2.0
3 * ip22-mc.c: Routines for manipulating SGI Memory Controller.
6 * Copyright (C) 1999 Andrew R. Baker (andrewb@uab.edu) - Indigo2 changes
7 * Copyright (C) 2003 Ladislav Michl (ladis@linux-mips.org)
8 * Copyright (C) 2004 Peter Fuerst (pf@net.alphadv.de) - IP28
30 …return (memconfig & SGIMC_MCONFIG_BASEADDR) << ((sgimc->systemid & SGIMC_SYSID_MASKREV) >= 5 ? 24 … in get_bank_addr()
35 …return ((memconfig & SGIMC_MCONFIG_RMASK) + 0x0100) << ((sgimc->systemid & SGIMC_SYSID_MASKREV) >=… in get_bank_size()
40 unsigned int res = bank > 1 ? sgimc->mconfig1 : sgimc->mconfig0; in get_bank_config()
84 (int) sgimc->systemid & SGIMC_SYSID_MASKREV); in sgimc_init()
90 /* Step 0: Make sure we turn off the watchdog in case it's in sgimc_init()
[all …]
/openbmc/linux/drivers/media/v4l2-core/
H A Dv4l2-ctrls-core.c1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright (C) 2010-2021 Hans Verkuil <hverkuil-cisco@xs4all.nl>
11 #include <media/v4l2-ctrls.h>
12 #include <media/v4l2-event.h>
13 #include <media/v4l2-fwnode.h>
15 #include "v4l2-ctrls-priv.h"
23 ev->type = V4L2_EVENT_CTRL; in fill_event()
24 ev->id = ctrl->id; in fill_event()
25 ev->u.ctrl.changes = changes; in fill_event()
26 ev->u.ctrl.type = ctrl->type; in fill_event()
[all …]
/openbmc/linux/drivers/thermal/
H A Dgov_step_wise.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * step_wise.c - A step-by-step Thermal throttling governor
33 struct thermal_cooling_device *cdev = instance->cdev; in get_target_state()
42 cdev->ops->get_cur_state(cdev, &cur_state); in get_target_state()
43 next_target = instance->target; in get_target_state()
44 dev_dbg(&cdev->device, "cur_state=%ld\n", cur_state); in get_target_state()
46 if (!instance->initialized) { in get_target_state()
48 next_target = clamp((cur_state + 1), instance->lower, instance->upper); in get_target_state()
58 next_target = clamp((cur_state + 1), instance->lower, instance->upper); in get_target_state()
61 if (cur_state <= instance->lower) in get_target_state()
[all …]
/openbmc/linux/arch/powerpc/platforms/cell/spufs/
H A Dspu_utils.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * utils.h: Utilities for SPU-side of the context switch operation.
12 * 64-bit safe EA.
20 * 128-bit register template.
36 * Declare storage for 8-byte aligned DMA list.
51 ((char *)(&(dummy->_field)) - (char *)(&(dummy->gprs[0].slot[0])))
58 /* Save, Step 4: in set_event_mask()
59 * Restore, Step 1: in set_event_mask()
70 /* Save, Step 5: in set_tag_mask()
71 * Restore, Step 2: in set_tag_mask()
[all …]
/openbmc/linux/sound/soc/fsl/
H A Dfsl_audmix.h1 /* SPDX-License-Identifier: GPL-2.0 */
20 #define FSL_AUDMIX_ATSTPUP0 0x210 /* Attenuation step up factor */
21 #define FSL_AUDMIX_ATSTPDN0 0x214 /* Attenuation step down factor */
22 #define FSL_AUDMIX_ATSTPTGT0 0x218 /* Attenuation step target */
24 #define FSL_AUDMIX_ATSTP0 0x220 /* Attenuation step number */
28 #define FSL_AUDMIX_ATSTPUP1 0x230 /* Attenuation step up factor */
29 #define FSL_AUDMIX_ATSTPDN1 0x234 /* Attenuation step down factor */
30 #define FSL_AUDMIX_ATSTPTGT1 0x238 /* Attenuation step target */
32 #define FSL_AUDMIX_ATSTP1 0x240 /* Attenuation step number */
79 /* AUDMIX Attenuation Step Up Factor Register */
[all …]
/openbmc/linux/Documentation/devicetree/bindings/remoteproc/
H A Dxlnx,zynqmp-r5fss.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/remoteproc/xlnx,zynqmp-r5fss.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Ben Levinsky <ben.levinsky@amd.com>
11 - Tanmay Shah <tanmay.shah@amd.com>
14 The Xilinx platforms include a pair of Cortex-R5F processors (RPU) for
15 real-time processing based on the Cortex-R5F processor core from ARM.
16 The Cortex-R5F processor implements the Arm v7-R architecture and includes a
17 floating-point unit that implements the Arm VFPv3 instruction set.
[all …]
/openbmc/linux/drivers/dma/
H A Dsprd-dma.c4 * SPDX-License-Identifier: GPL-2.0
8 #include <linux/dma-mapping.h>
9 #include <linux/dma/sprd-dma.h>
22 #include "virt-dma.h"
41 #define SPRD_DMA_GLB_REQ_UID(uid) (0x4 * ((uid) - 1))
149 /* define the DMA transfer step type */
233 return container_of(schan, struct sprd_dma_dev, channels[c->chan_id]); in to_sprd_dma_dev()
244 u32 orig = readl(sdev->glb_base + reg); in sprd_dma_glb_update()
248 writel(tmp, sdev->glb_base + reg); in sprd_dma_glb_update()
254 u32 orig = readl(schan->chn_base + reg); in sprd_dma_chn_update()
[all …]
/openbmc/linux/arch/sparc/kernel/
H A Diommu.c1 // SPDX-License-Identifier: GPL-2.0
13 #include <linux/dma-map-ops.h>
15 #include <linux/iommu-helper.h>
17 #include <asm/iommu-common.h>
29 ((STC)->strbuf_ctxmatch_base + ((CTX) << 3))
31 (*((STC)->strbuf_flushflag) = 0UL)
33 (*((STC)->strbuf_flushflag) != 0UL)
49 /* Must be invoked under the IOMMU lock. */
53 if (iommu->iommu_flushinv) { in iommu_flushall()
54 iommu_write(iommu->iommu_flushinv, ~(u64)0); in iommu_flushall()
[all …]
/openbmc/linux/drivers/crypto/qce/
H A Dcore.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2010-2014, The Linux Foundation. All rights reserved.
7 #include <linux/dma-mapping.h>
47 ops->unregister_algs(qce); in qce_unregister_algs()
54 int i, j, ret = -ENODEV; in qce_register_algs()
58 ret = ops->register_algs(qce); in qce_register_algs()
60 for (j = i - 1; j >= 0; j--) in qce_register_algs()
61 ops->unregister_algs(qce); in qce_register_algs()
71 int ret = -EINVAL, i; in qce_handle_request()
73 u32 type = crypto_tfm_alg_type(async_req->tfm); in qce_handle_request()
[all …]

12345678910>>...38