| /kernel/linux/linux-6.6/kernel/locking/ |
| D | osq_lock.c | 1 // 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 …]
|
| /kernel/linux/linux-5.10/kernel/locking/ |
| D | osq_lock.c | 1 // 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 …]
|
| /kernel/linux/linux-6.6/drivers/mtd/nand/ |
| D | ecc-mxic.c | 1 // 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 …]
|
| /kernel/linux/linux-6.6/drivers/leds/flash/ |
| D | leds-ktd2692.c | 1 // 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 …]
|
| D | leds-rt4505.c | 1 // 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 …]
|
| D | leds-mt6370-flash.c | 1 // 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 …]
|
| D | leds-mt6360.c | 1 // 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 …]
|
| /kernel/linux/linux-5.10/drivers/leds/ |
| D | leds-ktd2692.c | 1 // 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 …]
|
| /kernel/linux/linux-6.6/arch/arm64/kvm/ |
| D | debug.c | 1 // 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 …]
|
| /kernel/linux/linux-6.6/drivers/staging/media/imx/ |
| D | imx-media-fim.c | 1 // 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 …]
|
| /kernel/linux/linux-5.10/drivers/staging/media/imx/ |
| D | imx-media-fim.c | 1 // 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 71 #define icap_enabled(fim) ((fim)->icap_flags != IRQ_TYPE_NONE) 76 if (fi->denominator == 0) { in update_fim_nominal() 77 dev_dbg(fim->sd->dev, "no frame interval, FIM disabled\n"); in update_fim_nominal() 78 fim->enabled = false; in update_fim_nominal() 82 fim->nominal = DIV_ROUND_CLOSEST_ULL(1000000ULL * (u64)fi->numerator, in update_fim_nominal() [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/sunxi-ng/ |
| D | ccu_phase.c | 1 // 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 …]
|
| /kernel/linux/linux-5.10/drivers/clk/sunxi-ng/ |
| D | ccu_phase.c | 1 // 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 …]
|
| /kernel/linux/linux-5.10/sound/soc/codecs/ |
| D | wm2000.c | 1 // 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 …]
|
| /kernel/linux/linux-6.6/sound/soc/codecs/ |
| D | wm2000.c | 1 // 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 …]
|
| /kernel/linux/linux-5.10/drivers/clk/sunxi/ |
| D | clk-mod0.c | 1 // 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 …]
|
| /kernel/linux/linux-6.6/drivers/clk/sunxi/ |
| D | clk-mod0.c | 1 // 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 …]
|
| /kernel/linux/linux-5.10/drivers/net/ethernet/marvell/mvpp2/ |
| D | mvpp2_tai.c | 1 // 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 …]
|
| /kernel/linux/linux-6.6/drivers/net/ethernet/marvell/mvpp2/ |
| D | mvpp2_tai.c | 1 // 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 …]
|
| /kernel/linux/linux-5.10/drivers/thermal/ |
| D | gov_step_wise.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * step_wise.c - A step-by-step Thermal throttling governor 40 struct thermal_cooling_device *cdev = instance->cdev; in get_target_state() 49 cdev->ops->get_cur_state(cdev, &cur_state); in get_target_state() 50 next_target = instance->target; in get_target_state() 51 dev_dbg(&cdev->device, "cur_state=%ld\n", cur_state); in get_target_state() 53 if (!instance->initialized) { in get_target_state() 55 next_target = (cur_state + 1) >= instance->upper ? in get_target_state() 56 instance->upper : in get_target_state() 57 ((cur_state + 1) < instance->lower ? in get_target_state() [all …]
|
| /kernel/linux/linux-5.10/include/media/ |
| D | v4l2-ctrls.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 14 #include <media/media-request.h> 20 #include <media/mpeg2-ctrls.h> 21 #include <media/fwht-ctrls.h> 22 #include <media/h264-ctrls.h> 23 #include <media/vp8-ctrls.h> 24 #include <media/hevc-ctrls.h> 39 * union v4l2_ctrl_ptr - A pointer to a control value. 40 * @p_s32: Pointer to a 32-bit signed value. 41 * @p_s64: Pointer to a 64-bit signed value. [all …]
|
| /kernel/linux/linux-6.6/drivers/tty/serial/ |
| D | ar933x_uart.c | 1 // 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 …]
|
| /kernel/linux/linux-5.10/drivers/staging/comedi/drivers/ |
| D | ni_tiocmd.c | 1 // 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 …]
|
| /kernel/linux/linux-6.6/drivers/comedi/drivers/ |
| D | ni_tiocmd.c | 1 // 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 …]
|
| /kernel/linux/linux-6.6/include/media/ |
| D | v4l2-ctrls.h | 1 /* 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 …]
|