| /kernel/linux/linux-5.10/tools/testing/selftests/timers/ |
| D | valid-adjtimex.c | 9 * Usage: valid-adjtimex 12 * $ gcc valid-adjtimex.c -o valid-adjtimex -lrt 43 int clock_adjtime(clockid_t id, struct timex *tx) in clock_adjtime() argument 45 return syscall(__NR_clock_adjtime, id, tx); in clock_adjtime() 52 struct timex tx; in clear_time_state() local 55 tx.modes = ADJ_STATUS; in clear_time_state() 56 tx.status = 0; in clear_time_state() 57 ret = adjtimex(&tx); in clear_time_state() 66 -499<<16, 67 -450<<16, [all …]
|
| D | change_skew.c | 6 * NOTE: This is a meta-test which cranks the ADJ_FREQ knob and 8 * that the raw_skew, inconsistency-check and nanosleep tests be 12 * $ gcc change_skew.c -o change_skew -lrt 38 struct timex tx; in change_skew_test() local 41 tx.modes = ADJ_FREQUENCY; in change_skew_test() 42 tx.freq = ppm << 16; in change_skew_test() 44 ret = adjtimex(&tx); in change_skew_test() 46 printf("Error adjusting freq\n"); in change_skew_test() 51 ret |= system("./inconsistency-check"); in change_skew_test() 60 struct timex tx; in main() local [all …]
|
| /kernel/linux/linux-6.6/tools/testing/selftests/timers/ |
| D | valid-adjtimex.c | 9 * Usage: valid-adjtimex 12 * $ gcc valid-adjtimex.c -o valid-adjtimex -lrt 40 int clock_adjtime(clockid_t id, struct timex *tx) in clock_adjtime() argument 42 return syscall(__NR_clock_adjtime, id, tx); in clock_adjtime() 49 struct timex tx; in clear_time_state() local 52 tx.modes = ADJ_STATUS; in clear_time_state() 53 tx.status = 0; in clear_time_state() 54 ret = adjtimex(&tx); in clear_time_state() 65 -499 * SHIFTED_PPM, 66 -450 * SHIFTED_PPM, [all …]
|
| D | change_skew.c | 6 * NOTE: This is a meta-test which cranks the ADJ_FREQ knob and 8 * that the raw_skew, inconsistency-check and nanosleep tests be 12 * $ gcc change_skew.c -o change_skew -lrt 38 struct timex tx; in change_skew_test() local 41 tx.modes = ADJ_FREQUENCY; in change_skew_test() 42 tx.freq = ppm << 16; in change_skew_test() 44 ret = adjtimex(&tx); in change_skew_test() 46 printf("Error adjusting freq\n"); in change_skew_test() 51 ret |= system("./inconsistency-check"); in change_skew_test() 60 struct timex tx; in main() local [all …]
|
| /kernel/linux/linux-6.6/sound/soc/fsl/ |
| D | fsl_esai.c | 1 // SPDX-License-Identifier: GPL-2.0 17 #include "imx-pcm.h" 25 * struct fsl_esai_soc_data - soc specific data 33 * struct fsl_esai - ESAI private data 45 * @fifo_depth: depth of tx/rx FIFO 48 * @tx_mask: slot mask for TX 50 * @channels: channel num for tx or rx 56 * @synchronous: if using tx/rx synchronous mode 101 struct platform_device *pdev = esai_priv->pdev; in esai_isr() 105 regmap_read(esai_priv->regmap, REG_ESAI_ESR, &esr); in esai_isr() [all …]
|
| D | fsl_sai.c | 1 // SPDX-License-Identifier: GPL-2.0+ 5 // Copyright 2012-2015 Freescale Semiconductor, Inc. 23 #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h> 27 #include "imx-pcm.h" 45 * fsl_sai_dir_is_synced - Check if stream is synced by the opposite stream 56 int adir = (dir == TX) ? RX : TX; in fsl_sai_dir_is_synced() 59 return !sai->synchronous[dir] && sai->synchronous[adir]; in fsl_sai_dir_is_synced() 66 if (sai->is_pdm_mode) { in fsl_sai_get_pins_state() 69 state = pinctrl_lookup_state(sai->pinctrl, "dsd512"); in fsl_sai_get_pins_state() 73 state = pinctrl_lookup_state(sai->pinctrl, "dsd"); in fsl_sai_get_pins_state() [all …]
|
| D | fsl_xcvr.c | 1 // SPDX-License-Identifier: GPL-2.0 18 #include "imx-pcm.h" 61 * HDMI2.1 spec defines 6- and 12-channels layout for one bit audio 99 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; in fsl_xcvr_arc_mode_put() 100 unsigned int *item = ucontrol->value.enumerated.item; in fsl_xcvr_arc_mode_put() 102 xcvr->arc_mode = snd_soc_enum_item_to_val(e, item[0]); in fsl_xcvr_arc_mode_put() 113 ucontrol->value.enumerated.item[0] = xcvr->arc_mode; in fsl_xcvr_arc_mode_get() 133 uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES; in fsl_xcvr_type_capds_bytes_info() 134 uinfo->count = FSL_XCVR_CAPDS_SIZE; in fsl_xcvr_type_capds_bytes_info() 145 memcpy(ucontrol->value.bytes.data, xcvr->cap_ds, FSL_XCVR_CAPDS_SIZE); in fsl_xcvr_capds_get() [all …]
|
| /kernel/linux/linux-5.10/sound/soc/fsl/ |
| D | fsl_esai.c | 1 // SPDX-License-Identifier: GPL-2.0 17 #include "imx-pcm.h" 25 * struct fsl_esai_soc_data - soc specific data 35 * struct fsl_esai - ESAI private data 47 * @fifo_depth: depth of tx/rx FIFO 50 * @tx_mask: slot mask for TX 52 * @channels: channel num for tx or rx 58 * @synchronous: if using tx/rx synchronous mode 106 struct platform_device *pdev = esai_priv->pdev; in esai_isr() 110 regmap_read(esai_priv->regmap, REG_ESAI_ESR, &esr); in esai_isr() [all …]
|
| D | fsl_sai.c | 1 // SPDX-License-Identifier: GPL-2.0+ 5 // Copyright 2012-2015 Freescale Semiconductor, Inc. 21 #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h> 24 #include "imx-pcm.h" 41 * fsl_sai_dir_is_synced - Check if stream is synced by the opposite stream 52 int adir = (dir == TX) ? RX : TX; in fsl_sai_dir_is_synced() 55 return !sai->synchronous[dir] && sai->synchronous[adir]; in fsl_sai_dir_is_synced() 61 unsigned int ofs = sai->soc_data->reg_offset; in fsl_sai_isr() 62 struct device *dev = &sai->pdev->dev; in fsl_sai_isr() 73 /* Tx IRQ */ in fsl_sai_isr() [all …]
|
| /kernel/linux/linux-5.10/drivers/media/rc/ |
| D | ite-cir.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 * skeleton provided by the nuvoton-cir driver. 10 * The lirc_it87 driver was originally written by Hans-Gunter Lutke Uphues 13 * <jimbo-lirc@edwardsclan.net>. 16 * <spmf2004-lirc@yahoo.fr> in 2008. 29 #include <media/rc-core.h> 32 #include "ite-cir.h" 41 /* low limit for RX carrier freq, Hz, 0 for no RX demodulation */ 46 /* high limit for RX carrier freq, Hz, 0 for no RX demodulation */ 51 /* override tx carrier frequency */ [all …]
|
| D | winbond-cir.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * winbond-cir.c - Driver for the Consumer IR functionality of Winbond 12 * Copyright (C) 2009 - 2011 David Härdeman <david@hardeman.nu> 26 * o Wake-On-CIR functionality 44 #include <media/rc-core.h> 46 #define DRVNAME "winbond-cir" 48 /* CEIR Wake-Up Registers, relative to data->wbase */ 60 /* CEIR Enhanced Functionality Registers, relative to data->ebase */ 67 /* SP3 Banked Registers, relative to data->sbase */ 71 #define WBCIR_REG_SP3_TXDATA 0x00 /* FIFO TX data (w) */ [all …]
|
| /kernel/linux/linux-6.6/drivers/media/rc/ |
| D | ite-cir.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 * skeleton provided by the nuvoton-cir driver. 10 * The lirc_it87 driver was originally written by Hans-Gunter Lutke Uphues 13 * <jimbo-lirc@edwardsclan.net>. 16 * <spmf2004-lirc@yahoo.fr> in 2008. 29 #include <media/rc-core.h> 32 #include "ite-cir.h" 42 static int model_number = -1; 47 /* HW-independent code functions */ 50 static inline bool ite_is_high_carrier_freq(unsigned int freq) in ite_is_high_carrier_freq() argument [all …]
|
| D | winbond-cir.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * winbond-cir.c - Driver for the Consumer IR functionality of Winbond 12 * Copyright (C) 2009 - 2011 David Härdeman <david@hardeman.nu> 26 * o Wake-On-CIR functionality 44 #include <media/rc-core.h> 46 #define DRVNAME "winbond-cir" 48 /* CEIR Wake-Up Registers, relative to data->wbase */ 60 /* CEIR Enhanced Functionality Registers, relative to data->ebase */ 67 /* SP3 Banked Registers, relative to data->sbase */ 71 #define WBCIR_REG_SP3_TXDATA 0x00 /* FIFO TX data (w) */ [all …]
|
| /kernel/linux/linux-5.10/drivers/gpu/drm/meson/ |
| D | meson_vclk.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 21 * - CVBS 27MHz generator via the VCLK2 to the VENCI and VDAC blocks 22 * - HDMI Pixel Clocks generation 26 * - Genenate Pixel clocks for 2K/4K 10bit formats 33 * | | | | | |--ENCI 34 * | HDMI PLL |-| PLL_DIV |--- VCLK--| |--ENCL 35 * |__________| |_________| \ | MUX |--ENCP 36 * --VCLK2-| |--VDAC 37 * |_____|--HDMI-TX 140 regmap_update_bits(priv->hhi, HHI_VID_PLL_CLK_DIV, VID_PLL_EN, 0); in meson_vid_pll_set() [all …]
|
| /kernel/linux/linux-6.6/drivers/gpu/drm/meson/ |
| D | meson_vclk.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 21 * - CVBS 27MHz generator via the VCLK2 to the VENCI and VDAC blocks 22 * - HDMI Pixel Clocks generation 26 * - Genenate Pixel clocks for 2K/4K 10bit formats 33 * | | | | | |--ENCI 34 * | HDMI PLL |-| PLL_DIV |--- VCLK--| |--ENCL 35 * |__________| |_________| \ | MUX |--ENCP 36 * --VCLK2-| |--VDAC 37 * |_____|--HDMI-TX 140 regmap_update_bits(priv->hhi, HHI_VID_PLL_CLK_DIV, VID_PLL_EN, 0); in meson_vid_pll_set() [all …]
|
| /kernel/linux/linux-5.10/drivers/ptp/ |
| D | ptp_clock.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 13 #include <linux/posix-clock.h> 38 return PTP_MAX_TIMESTAMPS - queue_cnt(q) - 1; in queue_free() 49 seconds = div_u64_rem(src->timestamp, 1000000000, &remainder); in enqueue_external_timestamp() 51 spin_lock_irqsave(&queue->lock, flags); in enqueue_external_timestamp() 53 dst = &queue->buf[queue->tail]; in enqueue_external_timestamp() 54 dst->index = src->index; in enqueue_external_timestamp() 55 dst->t.sec = seconds; in enqueue_external_timestamp() 56 dst->t.nsec = remainder; in enqueue_external_timestamp() 60 WRITE_ONCE(queue->head, (queue->head + 1) % PTP_MAX_TIMESTAMPS); in enqueue_external_timestamp() [all …]
|
| /kernel/linux/linux-6.6/drivers/media/radio/ |
| D | radio-keene.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 13 #include <media/v4l2-device.h> 14 #include <media/v4l2-ioctl.h> 15 #include <media/v4l2-ctrls.h> 16 #include <media/v4l2-event.h> 57 u8 tx; member 69 /* Set frequency (if non-0), PA, mute and turn on/off the FM transmitter. */ 70 static int keene_cmd_main(struct keene_device *radio, unsigned freq, bool play) in keene_cmd_main() argument 72 unsigned short freq_send = freq ? (freq - 76 * 16000) / 800 : 0; in keene_cmd_main() 75 radio->buffer[0] = 0x00; in keene_cmd_main() [all …]
|
| /kernel/linux/linux-5.10/drivers/media/radio/ |
| D | radio-keene.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 13 #include <media/v4l2-device.h> 14 #include <media/v4l2-ioctl.h> 15 #include <media/v4l2-ctrls.h> 16 #include <media/v4l2-event.h> 57 u8 tx; member 69 /* Set frequency (if non-0), PA, mute and turn on/off the FM transmitter. */ 70 static int keene_cmd_main(struct keene_device *radio, unsigned freq, bool play) in keene_cmd_main() argument 72 unsigned short freq_send = freq ? (freq - 76 * 16000) / 800 : 0; in keene_cmd_main() 75 radio->buffer[0] = 0x00; in keene_cmd_main() [all …]
|
| /kernel/linux/linux-5.10/drivers/firmware/arm_scmi/ |
| D | perf.c | 1 // SPDX-License-Identifier: GPL-2.0 8 #define pr_fmt(fmt) "SCMI Notifications PERF - " fmt 13 #include <linux/io-64-nonatomic-hi-lo.h> 190 attr = t->rx.buf; in scmi_perf_attributes_get() 194 u16 flags = le16_to_cpu(attr->flags); in scmi_perf_attributes_get() 196 pi->num_domains = le16_to_cpu(attr->num_domains); in scmi_perf_attributes_get() 197 pi->power_scale_mw = POWER_SCALE_IN_MILLIWATT(flags); in scmi_perf_attributes_get() 198 pi->stats_addr = le32_to_cpu(attr->stats_addr_low) | in scmi_perf_attributes_get() 199 (u64)le32_to_cpu(attr->stats_addr_high) << 32; in scmi_perf_attributes_get() 200 pi->stats_size = le32_to_cpu(attr->stats_size); in scmi_perf_attributes_get() [all …]
|
| /kernel/linux/linux-5.10/drivers/tty/serial/ |
| D | ip22zilog.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 31 #define BRG_TO_BPS(brg, freq) ((freq) / 2 / ((brg) + 2)) argument 32 #define BPS_TO_BRG(bps, freq) ((((freq) + (bps)) / (2 * (bps))) - 2) argument 66 #define RES_Tx_CRC 0x80 /* Reset Tx CRC Checker */ 72 #define TxINT_ENAB 0x2 /* Tx Int Enable */ 124 #define TxCRC_ENAB 0x1 /* Tx CRC Enable */ 126 #define SDLC_CRC 0x4 /* SDLC/CRC-16 */ 127 #define TxENAB 0x8 /* Tx Enable */ 129 #define Tx5 0x0 /* Tx 5 bits (or less)/character */ 130 #define Tx7 0x20 /* Tx 7 bits/character */ [all …]
|
| D | zs.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 38 * Per-SCC state for locking and the interrupt handler. 52 #define ZS_BRG_TO_BPS(brg, freq) ((freq) / 2 / ((brg) + 2)) argument 53 #define ZS_BPS_TO_BRG(bps, freq) ((((freq) + (bps)) / (2 * (bps))) - 2) argument 87 #define RES_Tx_CRC 0x80 /* Reset Tx CRC Checker */ 90 /* Write Register 1 (Tx/Rx/Ext Int Enable and WAIT/DMA Commands) */ 92 #define TxINT_ENAB 0x2 /* Tx Int Enable */ 142 #define TxCRC_ENAB 0x1 /* Tx CRC Enable */ 144 #define SDLC_CRC 0x4 /* SDLC/CRC-16 */ 145 #define TxENAB 0x8 /* Tx Enable */ [all …]
|
| /kernel/linux/linux-6.6/drivers/tty/serial/ |
| D | ip22zilog.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 31 #define BRG_TO_BPS(brg, freq) ((freq) / 2 / ((brg) + 2)) argument 32 #define BPS_TO_BRG(bps, freq) ((((freq) + (bps)) / (2 * (bps))) - 2) argument 66 #define RES_Tx_CRC 0x80 /* Reset Tx CRC Checker */ 72 #define TxINT_ENAB 0x2 /* Tx Int Enable */ 124 #define TxCRC_ENAB 0x1 /* Tx CRC Enable */ 126 #define SDLC_CRC 0x4 /* SDLC/CRC-16 */ 127 #define TxENAB 0x8 /* Tx Enable */ 129 #define Tx5 0x0 /* Tx 5 bits (or less)/character */ 130 #define Tx7 0x20 /* Tx 7 bits/character */ [all …]
|
| D | zs.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 38 * Per-SCC state for locking and the interrupt handler. 52 #define ZS_BRG_TO_BPS(brg, freq) ((freq) / 2 / ((brg) + 2)) argument 53 #define ZS_BPS_TO_BRG(bps, freq) ((((freq) + (bps)) / (2 * (bps))) - 2) argument 87 #define RES_Tx_CRC 0x80 /* Reset Tx CRC Checker */ 90 /* Write Register 1 (Tx/Rx/Ext Int Enable and WAIT/DMA Commands) */ 92 #define TxINT_ENAB 0x2 /* Tx Int Enable */ 142 #define TxCRC_ENAB 0x1 /* Tx CRC Enable */ 144 #define SDLC_CRC 0x4 /* SDLC/CRC-16 */ 145 #define TxENAB 0x8 /* Tx Enable */ [all …]
|
| /kernel/linux/linux-5.10/drivers/media/radio/wl128x/ |
| D | fmdrv_v4l2.c | 1 // SPDX-License-Identifier: GPL-2.0-only 29 /* -- V4L2 RADIO (/dev/radioX) device file operation interfaces --- */ 43 return -EIO; in fm_v4l2_fops_read() 46 if (mutex_lock_interruptible(&fmdev->mutex)) in fm_v4l2_fops_read() 47 return -ERESTARTSYS; in fm_v4l2_fops_read() 67 mutex_unlock(&fmdev->mutex); in fm_v4l2_fops_read() 71 /* Write TX RDS data */ 80 rds.text[sizeof(rds.text) - 1] = '\0'; in fm_v4l2_fops_write() 84 return -EFAULT; in fm_v4l2_fops_write() 87 if (mutex_lock_interruptible(&fmdev->mutex)) in fm_v4l2_fops_write() [all …]
|
| /kernel/linux/linux-6.6/drivers/media/radio/wl128x/ |
| D | fmdrv_v4l2.c | 1 // SPDX-License-Identifier: GPL-2.0-only 29 /* -- V4L2 RADIO (/dev/radioX) device file operation interfaces --- */ 43 return -EIO; in fm_v4l2_fops_read() 46 if (mutex_lock_interruptible(&fmdev->mutex)) in fm_v4l2_fops_read() 47 return -ERESTARTSYS; in fm_v4l2_fops_read() 67 mutex_unlock(&fmdev->mutex); in fm_v4l2_fops_read() 71 /* Write TX RDS data */ 80 rds.text[sizeof(rds.text) - 1] = '\0'; in fm_v4l2_fops_write() 84 return -EFAULT; in fm_v4l2_fops_write() 87 if (mutex_lock_interruptible(&fmdev->mutex)) in fm_v4l2_fops_write() [all …]
|