/Linux-v5.4/drivers/hid/ |
D | hid-picolcd.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * Copyright (C) 2010-2012 by Bruno Prémont <bonbons@linux-vserver.org> * 27 #define REPORT_LED_STATE 0x81 /* LCD: OUT[1] */ 28 #define REPORT_BRIGHTNESS 0x91 /* LCD: OUT[1] */ 29 #define REPORT_CONTRAST 0x92 /* LCD: OUT[1] */ 30 #define REPORT_RESET 0x93 /* LCD: OUT[2] */ 31 #define REPORT_LCD_CMD 0x94 /* LCD: OUT[63] */ 32 #define REPORT_LCD_DATA 0x95 /* LCD: OUT[63] */ 33 #define REPORT_LCD_CMD_DATA 0x96 /* LCD: OUT[63] */ 34 #define REPORT_EE_READ 0xa3 /* LCD: OUT[63] */ [all …]
|
/Linux-v5.4/drivers/media/usb/dvb-usb/ |
D | ttusb2.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * (e.g. Pinnacle 400e DVB-S USB2.0). 7 * Copyright (C) 2005-6 Patrick Boettcher <pb@linuxtv.de> 9 * see Documentation/media/dvb-drivers/dvb-usb.rst for more information 16 * always to messages (out/in) 17 * out message: 18 * 0xaa <id> <cmdbyte> <datalen> <data...> 21 * 0x55 <id> <cmdbyte> <datalen> <data...> 27 /* out data: <byte>[28] 31 /* out data: nothing */ [all …]
|
/Linux-v5.4/drivers/media/platform/mtk-vcodec/ |
D | venc_vpu_if.c | 1 // SPDX-License-Identifier: GPL-2.0 11 static void handle_enc_init_msg(struct venc_vpu_inst *vpu, void *data) in handle_enc_init_msg() argument 13 struct venc_vpu_ipi_msg_init *msg = data; in handle_enc_init_msg() 15 vpu->inst_addr = msg->vpu_inst_addr; in handle_enc_init_msg() 16 vpu->vsi = vpu_mapping_dm_addr(vpu->dev, msg->vpu_inst_addr); in handle_enc_init_msg() 19 static void handle_enc_encode_msg(struct venc_vpu_inst *vpu, void *data) in handle_enc_encode_msg() argument 21 struct venc_vpu_ipi_msg_enc *msg = data; in handle_enc_encode_msg() 23 vpu->state = msg->state; in handle_enc_encode_msg() 24 vpu->bs_size = msg->bs_size; in handle_enc_encode_msg() 25 vpu->is_key_frm = msg->is_key_frm; in handle_enc_encode_msg() [all …]
|
/Linux-v5.4/drivers/net/ethernet/intel/igb/ |
D | e1000_phy.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 2007 - 2018 Intel Corporation. */ 31 * igb_check_reset_block - Check if PHY reset is blocked 48 * igb_get_phy_id - Retrieve the PHY ID and revision 56 struct e1000_phy_info *phy = &hw->phy; in igb_get_phy_id() 61 if ((hw->mac.type == e1000_i210) || (hw->mac.type == e1000_i211)) in igb_get_phy_id() 62 phy->ops.write_reg(hw, I347AT4_PAGE_SELECT, 0); in igb_get_phy_id() 64 ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id); in igb_get_phy_id() 66 goto out; in igb_get_phy_id() 68 phy->id = (u32)(phy_id << 16); in igb_get_phy_id() [all …]
|
/Linux-v5.4/arch/x86/crypto/ |
D | sha1_ssse3_glue.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 12 * Copyright (c) Jean-Francois Dive <jef@linuxbe.org> 30 typedef void (sha1_transform_fn)(u32 *digest, const char *data, 33 static int sha1_update(struct shash_desc *desc, const u8 *data, in sha1_update() argument 39 (sctx->count % SHA1_BLOCK_SIZE) + len < SHA1_BLOCK_SIZE) in sha1_update() 40 return crypto_sha1_update(desc, data, len); in sha1_update() 46 sha1_base_do_update(desc, data, len, in sha1_update() 53 static int sha1_finup(struct shash_desc *desc, const u8 *data, in sha1_finup() argument 54 unsigned int len, u8 *out, sha1_transform_fn *sha1_xform) in sha1_finup() argument 57 return crypto_sha1_finup(desc, data, len, out); in sha1_finup() [all …]
|
D | sha256_ssse3_glue.c | 24 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 44 asmlinkage void sha256_transform_ssse3(u32 *digest, const char *data, 46 typedef void (sha256_transform_fn)(u32 *digest, const char *data, u64 rounds); 48 static int _sha256_update(struct shash_desc *desc, const u8 *data, in _sha256_update() argument 54 (sctx->count % SHA256_BLOCK_SIZE) + len < SHA256_BLOCK_SIZE) in _sha256_update() 55 return crypto_sha256_update(desc, data, len); in _sha256_update() 61 sha256_base_do_update(desc, data, len, in _sha256_update() 68 static int sha256_finup(struct shash_desc *desc, const u8 *data, in sha256_finup() argument 69 unsigned int len, u8 *out, sha256_transform_fn *sha256_xform) in sha256_finup() argument 72 return crypto_sha256_finup(desc, data, len, out); in sha256_finup() [all …]
|
D | crc32c-intel_glue.c | 1 // SPDX-License-Identifier: GPL-2.0-only 7 * Intel(R) 64 and IA-32 Architectures Software Developer's Manual 8 * Volume 2A: Instruction Set Reference, A-M 48 static u32 crc32c_intel_le_hw_byte(u32 crc, unsigned char const *data, size_t length) in crc32c_intel_le_hw_byte() argument 50 while (length--) { in crc32c_intel_le_hw_byte() 54 :"0"(crc), "c"(*data) in crc32c_intel_le_hw_byte() 56 data++; in crc32c_intel_le_hw_byte() 68 while (iquotient--) { in crc32c_intel_le_hw() 96 return -EINVAL; in crc32c_intel_setkey() 104 u32 *mctx = crypto_shash_ctx(desc->tfm); in crc32c_intel_init() [all …]
|
D | sha512_ssse3_glue.c | 22 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 42 asmlinkage void sha512_transform_ssse3(u64 *digest, const char *data, 45 typedef void (sha512_transform_fn)(u64 *digest, const char *data, u64 rounds); 47 static int sha512_update(struct shash_desc *desc, const u8 *data, in sha512_update() argument 53 (sctx->count[0] % SHA512_BLOCK_SIZE) + len < SHA512_BLOCK_SIZE) in sha512_update() 54 return crypto_sha512_update(desc, data, len); in sha512_update() 60 sha512_base_do_update(desc, data, len, in sha512_update() 67 static int sha512_finup(struct shash_desc *desc, const u8 *data, in sha512_finup() argument 68 unsigned int len, u8 *out, sha512_transform_fn *sha512_xform) in sha512_finup() argument 71 return crypto_sha512_finup(desc, data, len, out); in sha512_finup() [all …]
|
D | crct10dif-pclmul_glue.c | 4 * T10 Data Integrity Field CRC16 Crypto Transform using PCLMULQDQ Instructions 19 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 27 #include <linux/crc-t10dif.h> 47 ctx->crc = 0; in chksum_init() 52 static int chksum_update(struct shash_desc *desc, const u8 *data, in chksum_update() argument 59 ctx->crc = crc_t10dif_pcl(ctx->crc, data, length); in chksum_update() 62 ctx->crc = crc_t10dif_generic(ctx->crc, data, length); in chksum_update() 66 static int chksum_final(struct shash_desc *desc, u8 *out) in chksum_final() argument 70 *(__u16 *)out = ctx->crc; in chksum_final() 74 static int __chksum_finup(__u16 crc, const u8 *data, unsigned int len, u8 *out) in __chksum_finup() argument [all …]
|
/Linux-v5.4/drivers/staging/fwserial/ |
D | dma_fifo.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * DMA-able FIFO implementation 22 fifo->corrupt = !!(condition); \ 23 WARN(fifo->corrupt, format); \ 31 return check - (lo + 1) < (hi - 1) - lo; in addr_check() 36 * @fifo: address of in-place "struct dma_fifo" object 41 INIT_LIST_HEAD(&fifo->pending); in dma_fifo_init() 45 * dma_fifo_alloc - initialize and allocate dma_fifo 46 * @fifo: address of in-place "struct dma_fifo" object 64 return -EINVAL; in dma_fifo_alloc() [all …]
|
/Linux-v5.4/drivers/infiniband/hw/mlx5/ |
D | mad.c | 2 * Copyright (c) 2013-2015, Mellanox Technologies. All rights reserved. 14 * - Redistributions of source code must retain the above 18 * - Redistributions in binary form must reproduce the above 28 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 49 if (in_mad->mad_hdr.mgmt_class != IB_MGMT_CLASS_SUBN_LID_ROUTED && in can_do_mad_ifc() 50 in_mad->mad_hdr.mgmt_class != IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) in can_do_mad_ifc() 52 return dev->mdev->port_caps[port_num - 1].has_smi; in can_do_mad_ifc() 63 return -EPERM; in mlx5_MAD_IFC() 73 return mlx5_cmd_mad_ifc(dev->mdev, in_mad, response_mad, op_modifier, in mlx5_MAD_IFC() 84 slid = in_wc ? ib_lid_cpu16(in_wc->slid) : be16_to_cpu(IB_LID_PERMISSIVE); in process_mad() [all …]
|
/Linux-v5.4/lib/ |
D | kfifo.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 21 return (fifo->mask + 1) - (fifo->in - fifo->out); in kfifo_unused() 33 fifo->in = 0; in __kfifo_alloc() 34 fifo->out = 0; in __kfifo_alloc() 35 fifo->esize = esize; in __kfifo_alloc() 38 fifo->data = NULL; in __kfifo_alloc() 39 fifo->mask = 0; in __kfifo_alloc() 40 return -EINVAL; in __kfifo_alloc() 43 fifo->data = kmalloc_array(esize, size, gfp_mask); in __kfifo_alloc() 45 if (!fifo->data) { in __kfifo_alloc() [all …]
|
/Linux-v5.4/fs/nfs/ |
D | nfs42xdr.c | 1 // SPDX-License-Identifier: GPL-2.0 156 encode_nfs4_stateid(xdr, &args->falloc_stateid); in encode_fallocate() 157 encode_uint64(xdr, args->falloc_offset); in encode_fallocate() 158 encode_uint64(xdr, args->falloc_length); in encode_fallocate() 174 encode_nfs4_stateid(xdr, &args->src_stateid); in encode_copy() 175 encode_nfs4_stateid(xdr, &args->dst_stateid); in encode_copy() 177 encode_uint64(xdr, args->src_pos); in encode_copy() 178 encode_uint64(xdr, args->dst_pos); in encode_copy() 179 encode_uint64(xdr, args->count); in encode_copy() 182 encode_uint32(xdr, args->sync); in encode_copy() [all …]
|
/Linux-v5.4/drivers/pci/hotplug/ |
D | cpqphp_sysfs.c | 1 // SPDX-License-Identifier: GPL-2.0+ 6 * Copyright (C) 2001,2003 Greg Kroah-Hartman (greg@kroah.com) 30 char *out = buf; in show_ctrl() local 34 out += sprintf(buf, "Free resources: memory\n"); in show_ctrl() 36 res = ctrl->mem_head; in show_ctrl() 37 while (res && index--) { in show_ctrl() 38 out += sprintf(out, "start = %8.8x, length = %8.8x\n", res->base, res->length); in show_ctrl() 39 res = res->next; in show_ctrl() 41 out += sprintf(out, "Free resources: prefetchable memory\n"); in show_ctrl() 43 res = ctrl->p_mem_head; in show_ctrl() [all …]
|
/Linux-v5.4/net/bpf/ |
D | test_run.c | 1 // SPDX-License-Identifier: GPL-2.0-only 32 return -ENOMEM; in bpf_test_run() 47 ret = -EINTR; in bpf_test_run() 52 time_spent += ktime_get_ns() - time_start; in bpf_test_run() 63 time_spent += ktime_get_ns() - time_start; in bpf_test_run() 77 union bpf_attr __user *uattr, const void *data, in bpf_test_finish() argument 80 void __user *data_out = u64_to_user_ptr(kattr->test.data_out); in bpf_test_finish() 81 int err = -EFAULT; in bpf_test_finish() 87 if (kattr->test.data_size_out && in bpf_test_finish() 88 copy_size > kattr->test.data_size_out) { in bpf_test_finish() [all …]
|
/Linux-v5.4/arch/s390/crypto/ |
D | crc32-vx.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Crypto-API module for CRC-32 algorithms implemented with the 9 #define KMSG_COMPONENT "crc32-vx" 24 #define VX_ALIGN_MASK (VX_ALIGNMENT - 1) 40 * DEFINE_CRC32_VX() - Define a CRC-32 function using the vector extension 42 * Creates a function to perform a particular CRC-32 computation. Depending 43 * on the message buffer, the hardware-accelerated or software implementation 50 unsigned char const *data, size_t datalen) \ 56 return ___crc32_sw(crc, data, datalen); \ 58 if ((unsigned long)data & VX_ALIGN_MASK) { \ [all …]
|
/Linux-v5.4/drivers/hwmon/ |
D | g762.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * g762 - Driver for the Global Mixed-mode Technology Inc. fan speed 15 * http://natisbad.org/NAS/refs/GMT_EDS-762_763-080710-0.2.pdf 27 * http://www.gmt.com.tw/product/datasheet/EDS-762_3.pdf 36 #include <linux/hwmon-sysfs.h> 66 #define G762_REG_FAN_CMD1_OUT_MODE 0x20 /* out mode: PWM or DC */ 67 #define G762_REG_FAN_CMD1_FAN_MODE 0x10 /* fan mode: closed/open-loop */ 79 #define G762_REG_FAN_STA_OOC 0x01 /* fan out of control */ 91 /* Register data is read (and cached) at most once per second. */ 131 u8 set_cnt; /* controls fan rotation speed in closed-loop mode */ [all …]
|
/Linux-v5.4/drivers/rtc/ |
D | rtc-max77686.c | 1 // SPDX-License-Identifier: GPL-2.0+ 7 // based on rtc-max8997.c 16 #include <linux/mfd/max77686-private.h> 22 #define MAX77686_INVALID_I2C_ADDR (-1) 25 #define MAX77686_INVALID_REG (-1) 177 .name = "max77686-rtc", 237 .name = "max77802-rtc", 256 static void max77686_rtc_data_to_tm(u8 *data, struct rtc_time *tm, in max77686_rtc_data_to_tm() argument 259 u8 mask = info->drv_data->mask; in max77686_rtc_data_to_tm() 261 tm->tm_sec = data[RTC_SEC] & mask; in max77686_rtc_data_to_tm() [all …]
|
D | rtc-max8997.c | 1 // SPDX-License-Identifier: GPL-2.0+ 7 // based on rtc-max8998.c 17 #include <linux/mfd/max8997-private.h> 74 static void max8997_rtc_data_to_tm(u8 *data, struct rtc_time *tm, in max8997_rtc_data_to_tm() argument 77 tm->tm_sec = data[RTC_SEC] & 0x7f; in max8997_rtc_data_to_tm() 78 tm->tm_min = data[RTC_MIN] & 0x7f; in max8997_rtc_data_to_tm() 80 tm->tm_hour = data[RTC_HOUR] & 0x1f; in max8997_rtc_data_to_tm() 82 tm->tm_hour = data[RTC_HOUR] & 0x0f; in max8997_rtc_data_to_tm() 83 if (data[RTC_HOUR] & HOUR_PM_MASK) in max8997_rtc_data_to_tm() 84 tm->tm_hour += 12; in max8997_rtc_data_to_tm() [all …]
|
/Linux-v5.4/drivers/power/supply/ |
D | 88pm860x_battery.c | 1 // SPDX-License-Identifier: GPL-2.0-only 68 /* OCV -- Open Circuit Voltage */ 83 * corresponding resistor value -- Ohm / C degeree. 85 #define TBAT_NEG_25D 127773 /* -25 */ 86 #define TBAT_NEG_10D 54564 /* -10 */ 151 * register 1 bit[7:0] -- bit[11:4] of measured value of voltage 152 * register 0 bit[3:0] -- bit[3:0] of measured value of voltage 155 int offset, int *data) in measure_12bit_voltage() argument 160 ret = pm860x_bulk_read(info->i2c, offset, 2, buf); in measure_12bit_voltage() 164 *data = ((buf[0] & 0xff) << 4) | (buf[1] & 0x0f); in measure_12bit_voltage() [all …]
|
D | 88pm860x_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-only 23 /* bit definitions of Reset Out Register */ 86 /* over-temperature on PM8606 setting */ 90 /* over-voltage protect on vchg setting mv */ 113 "battery-monitor", 116 static int measure_vchg(struct pm860x_charger_info *info, int *data) in measure_vchg() argument 121 ret = pm860x_bulk_read(info->i2c, PM8607_VCHG_MEAS1, 2, buf); in measure_vchg() 125 *data = ((buf[0] & 0xff) << 4) | (buf[1] & 0x0f); in measure_vchg() 127 *data = ((*data & 0xfff) * 9 * 125) >> 9; in measure_vchg() 129 dev_dbg(info->dev, "%s, vchg: %d mv\n", __func__, *data); in measure_vchg() [all …]
|
/Linux-v5.4/crypto/ |
D | shash.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 26 return -ENOSYS; in shash_no_setkey() 39 absize = keylen + (alignmask & ~(crypto_tfm_ctx_alignment() - 1)); in shash_setkey_unaligned() 42 return -ENOMEM; in shash_setkey_unaligned() 46 err = shash->setkey(tfm, alignbuffer, keylen); in shash_setkey_unaligned() 54 !(alg->base.cra_flags & CRYPTO_ALG_OPTIONAL_KEY)) in shash_set_needkey() 68 err = shash->setkey(tfm, key, keylen); in crypto_shash_setkey() 80 static int shash_update_unaligned(struct shash_desc *desc, const u8 *data, in shash_update_unaligned() argument 83 struct crypto_shash *tfm = desc->tfm; in shash_update_unaligned() 86 unsigned int unaligned_len = alignmask + 1 - in shash_update_unaligned() [all …]
|
/Linux-v5.4/drivers/net/ethernet/mellanox/mlx5/core/fpga/ |
D | cmd.c | 14 * - Redistributions of source code must retain the above 18 * - Redistributions in binary form must reproduce the above 28 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 48 u32 out[MLX5_FPGA_ACCESS_REG_SZ]; in mlx5_fpga_access_reg() local 52 return -EINVAL; in mlx5_fpga_access_reg() 54 return -EINVAL; in mlx5_fpga_access_reg() 56 return -EINVAL; in mlx5_fpga_access_reg() 61 memcpy(MLX5_ADDR_OF(fpga_access_reg, in, data), buf, size); in mlx5_fpga_access_reg() 63 err = mlx5_core_access_reg(dev, in, sizeof(in), out, sizeof(out), in mlx5_fpga_access_reg() 69 memcpy(buf, MLX5_ADDR_OF(fpga_access_reg, out, data), size); in mlx5_fpga_access_reg() [all …]
|
/Linux-v5.4/arch/x86/kernel/ |
D | ksysfs.c | 1 // SPDX-License-Identifier: GPL-2.0-only 40 .name = "data", 73 struct setup_data *data; in get_setup_data_paddr() local 81 data = memremap(pa_data, sizeof(*data), MEMREMAP_WB); in get_setup_data_paddr() 82 if (!data) in get_setup_data_paddr() 83 return -ENOMEM; in get_setup_data_paddr() 85 pa_data = data->next; in get_setup_data_paddr() 86 memunmap(data); in get_setup_data_paddr() 89 return -EINVAL; in get_setup_data_paddr() 95 struct setup_data *data; in get_setup_data_size() local [all …]
|
/Linux-v5.4/drivers/misc/mei/ |
D | main.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (c) 2003-2018, Intel Corporation. All rights reserved. 38 * mei_open - the open function 52 dev = container_of(inode->i_cdev, struct mei_device, cdev); in mei_open() 54 return -ENODEV; in mei_open() 56 mutex_lock(&dev->device_lock); in mei_open() 58 if (dev->dev_state != MEI_DEV_ENABLED) { in mei_open() 59 dev_dbg(dev->dev, "dev_state != MEI_ENABLED dev_state = %s\n", in mei_open() 60 mei_dev_state_str(dev->dev_state)); in mei_open() 61 err = -ENODEV; in mei_open() [all …]
|