| /linux/drivers/usb/class/ |
| H A D | cdc-wdm.c | 121 struct wdm_device *desc; in wdm_find_device() local 124 list_for_each_entry(desc, &wdm_device_list, device_list) in wdm_find_device() 125 if (desc->intf == intf) in wdm_find_device() 127 desc = NULL; in wdm_find_device() 131 return desc; in wdm_find_device() 136 struct wdm_device *desc; in wdm_find_device_by_minor() local 139 list_for_each_entry(desc, &wdm_device_list, device_list) in wdm_find_device_by_minor() 140 if (desc->intf->minor == minor) in wdm_find_device_by_minor() 142 desc = NULL; in wdm_find_device_by_minor() 146 return desc; in wdm_find_device_by_minor() [all …]
|
| /linux/drivers/crypto/caam/ |
| H A D | caamalg_desc.c | 16 static inline void aead_append_src_dst(u32 *desc, u32 msg_type) in aead_append_src_dst() argument 18 append_seq_fifo_store(desc, 0, FIFOST_TYPE_MESSAGE_DATA | KEY_VLF); in aead_append_src_dst() 19 append_seq_fifo_load(desc, 0, FIFOLD_CLASS_BOTH | in aead_append_src_dst() 24 static inline void append_dec_op1(u32 *desc, u32 type) in append_dec_op1() argument 30 append_operation(desc, type | OP_ALG_AS_INITFINAL | in append_dec_op1() 35 jump_cmd = append_jump(desc, JUMP_TEST_ALL | JUMP_COND_SHRD); in append_dec_op1() 36 append_operation(desc, type | OP_ALG_AS_INIT | OP_ALG_DECRYPT); in append_dec_op1() 37 uncond_jump_cmd = append_jump(desc, JUMP_TEST_ALL); in append_dec_op1() 38 set_jump_tgt_here(desc, jump_cmd); in append_dec_op1() 39 append_operation(desc, type | OP_ALG_AS_INIT | OP_ALG_DECRYPT | in append_dec_op1() [all …]
|
| H A D | desc_constr.h | 12 #include "desc.h" 54 #define PRINT_POS do { printk(KERN_DEBUG "%02d: %s\n", desc_len(desc),\ 84 static inline int desc_len(u32 * const desc) in desc_len() argument 86 return caam32_to_cpu(*desc) & HDR_DESCLEN_MASK; in desc_len() 89 static inline int desc_bytes(void * const desc) in desc_bytes() argument 91 return desc_len(desc) * CAAM_CMD_SZ; in desc_bytes() 94 static inline u32 *desc_end(u32 * const desc) in desc_end() argument 96 return desc + desc_len(desc); in desc_end() 99 static inline void *sh_desc_pdb(u32 * const desc) in sh_desc_pdb() argument 101 return desc + 1; in sh_desc_pdb() [all …]
|
| H A D | pkc_desc.c | 14 void init_rsa_pub_desc(u32 *desc, struct rsa_pub_pdb *pdb) in init_rsa_pub_desc() argument 16 init_job_desc_pdb(desc, 0, SIZEOF_RSA_PUB_PDB); in init_rsa_pub_desc() 17 append_cmd(desc, pdb->sgf); in init_rsa_pub_desc() 18 append_ptr(desc, pdb->f_dma); in init_rsa_pub_desc() 19 append_ptr(desc, pdb->g_dma); in init_rsa_pub_desc() 20 append_ptr(desc, pdb->n_dma); in init_rsa_pub_desc() 21 append_ptr(desc, pdb->e_dma); in init_rsa_pub_desc() 22 append_cmd(desc, pdb->f_len); in init_rsa_pub_desc() 23 append_operation(desc, OP_TYPE_UNI_PROTOCOL | OP_PCLID_RSAENC_PUBKEY); in init_rsa_pub_desc() 27 void init_rsa_priv_f1_desc(u32 *desc, struct rsa_priv_f1_pdb *pdb) in init_rsa_priv_f1_desc() argument [all …]
|
| /linux/kernel/irq/ |
| H A D | chip.c | 136 struct irq_desc *desc = irq_to_desc(irq); in irq_get_irq_data() local 138 return desc ? &desc->irq_data : NULL; in irq_get_irq_data() 142 static void irq_state_clr_disabled(struct irq_desc *desc) in irq_state_clr_disabled() argument 144 irqd_clear(&desc->irq_data, IRQD_IRQ_DISABLED); in irq_state_clr_disabled() 147 static void irq_state_clr_masked(struct irq_desc *desc) in irq_state_clr_masked() argument 149 irqd_clear(&desc->irq_data, IRQD_IRQ_MASKED); in irq_state_clr_masked() 152 static void irq_state_clr_started(struct irq_desc *desc) in irq_state_clr_started() argument 154 irqd_clear(&desc->irq_data, IRQD_IRQ_STARTED); in irq_state_clr_started() 157 static void irq_state_set_started(struct irq_desc *desc) in irq_state_set_started() argument 159 irqd_set(&desc->irq_data, IRQD_IRQ_STARTED); in irq_state_set_started() [all …]
|
| H A D | settings.h | 41 irq_settings_clr_and_set(struct irq_desc *desc, u32 clr, u32 set) in irq_settings_clr_and_set() argument 43 desc->status_use_accessors &= ~(clr & _IRQF_MODIFY_MASK); in irq_settings_clr_and_set() 44 desc->status_use_accessors |= (set & _IRQF_MODIFY_MASK); in irq_settings_clr_and_set() 47 static inline bool irq_settings_is_per_cpu(struct irq_desc *desc) in irq_settings_is_per_cpu() argument 49 return desc->status_use_accessors & _IRQ_PER_CPU; in irq_settings_is_per_cpu() 52 static inline bool irq_settings_is_per_cpu_devid(struct irq_desc *desc) in irq_settings_is_per_cpu_devid() argument 54 return desc->status_use_accessors & _IRQ_PER_CPU_DEVID; in irq_settings_is_per_cpu_devid() 57 static inline void irq_settings_set_per_cpu(struct irq_desc *desc) in irq_settings_set_per_cpu() argument 59 desc->status_use_accessors |= _IRQ_PER_CPU; in irq_settings_set_per_cpu() 62 static inline void irq_settings_set_no_balancing(struct irq_desc *desc) in irq_settings_set_no_balancing() argument [all …]
|
| H A D | irqdesc.c | 55 static int alloc_masks(struct irq_desc *desc, int node) in alloc_masks() argument 57 if (!zalloc_cpumask_var_node(&desc->irq_common_data.affinity, in alloc_masks() 62 if (!zalloc_cpumask_var_node(&desc->irq_common_data.effective_affinity, in alloc_masks() 64 free_cpumask_var(desc->irq_common_data.affinity); in alloc_masks() 70 if (!zalloc_cpumask_var_node(&desc->pending_mask, GFP_KERNEL, node)) { in alloc_masks() 72 free_cpumask_var(desc->irq_common_data.effective_affinity); in alloc_masks() 74 free_cpumask_var(desc->irq_common_data.affinity); in alloc_masks() 81 static void desc_smp_init(struct irq_desc *desc, int node, in desc_smp_init() argument 86 cpumask_copy(desc->irq_common_data.affinity, affinity); in desc_smp_init() 89 cpumask_clear(desc->pending_mask); in desc_smp_init() [all …]
|
| H A D | pm.c | 16 void irq_pm_handle_wakeup(struct irq_desc *desc) in irq_pm_handle_wakeup() argument 18 irqd_clear(&desc->irq_data, IRQD_WAKEUP_ARMED); in irq_pm_handle_wakeup() 19 desc->istate |= IRQS_SUSPENDED | IRQS_PENDING; in irq_pm_handle_wakeup() 20 desc->depth++; in irq_pm_handle_wakeup() 21 irq_disable(desc); in irq_pm_handle_wakeup() 22 pm_system_irq_wakeup(irq_desc_get_irq(desc)); in irq_pm_handle_wakeup() 26 * Called from __setup_irq() with desc->lock held after @action has 29 void irq_pm_install_action(struct irq_desc *desc, struct irqaction *action) in irq_pm_install_action() argument 31 desc->nr_actions++; in irq_pm_install_action() 34 desc->force_resume_depth++; in irq_pm_install_action() [all …]
|
| H A D | internals.h | 44 * Bit masks for desc->core_internal_state__do_not_mess_with_it 78 extern int __irq_set_trigger(struct irq_desc *desc, unsigned long flags); 79 extern void __disable_irq(struct irq_desc *desc); 80 extern void __enable_irq(struct irq_desc *desc); 88 extern int irq_activate(struct irq_desc *desc); 89 extern int irq_activate_and_startup(struct irq_desc *desc, bool resend); 90 extern int irq_startup(struct irq_desc *desc, bool resend, bool force); 91 extern void irq_startup_managed(struct irq_desc *desc); 93 extern void irq_shutdown(struct irq_desc *desc); 94 extern void irq_shutdown_and_deactivate(struct irq_desc *desc); [all …]
|
| H A D | manage.c | 40 static void __synchronize_hardirq(struct irq_desc *desc, bool sync_chip) in __synchronize_hardirq() argument 42 struct irq_data *irqd = irq_desc_get_irq_data(desc); in __synchronize_hardirq() 50 while (irqd_irq_inprogress(&desc->irq_data)) in __synchronize_hardirq() 54 guard(raw_spinlock_irqsave)(&desc->lock); in __synchronize_hardirq() 55 inprogress = irqd_irq_inprogress(&desc->irq_data); in __synchronize_hardirq() 97 struct irq_desc *desc = irq_to_desc(irq); in synchronize_hardirq() local 99 if (desc) { in synchronize_hardirq() 100 __synchronize_hardirq(desc, false); in synchronize_hardirq() 101 return !atomic_read(&desc->threads_active); in synchronize_hardirq() 108 static void __synchronize_irq(struct irq_desc *desc) in __synchronize_irq() argument [all …]
|
| H A D | resend.c | 35 struct irq_desc *desc; in resend_irqs() local 37 desc = hlist_entry(irq_resend_list.first, struct irq_desc, resend_node); in resend_irqs() 38 hlist_del_init(&desc->resend_node); in resend_irqs() 41 desc->handle_irq(desc); in resend_irqs() 49 static int irq_sw_resend(struct irq_desc *desc) in irq_sw_resend() argument 55 if (irqd_is_handle_enforce_irqctx(&desc->irq_data)) in irq_sw_resend() 63 if (irq_settings_is_nested_thread(desc)) { in irq_sw_resend() 68 if (!desc->parent_irq) in irq_sw_resend() 71 desc = irq_to_desc(desc->parent_irq); in irq_sw_resend() 72 if (!desc) in irq_sw_resend() [all …]
|
| /linux/drivers/regulator/ |
| H A D | da9062-regulator.c | 47 struct regulator_desc desc; member 60 struct regulator_desc desc; member 258 sel <<= ffs(rdev->desc->vsel_mask) - 1; in da9062_set_suspend_voltage() 261 rdev->desc->vsel_mask, sel); in da9062_set_suspend_voltage() 360 .desc.id = DA9061_ID_BUCK1, 361 .desc.name = "DA9061 BUCK1", 362 .desc.of_match = of_match_ptr("buck1"), 363 .desc.regulators_node = of_match_ptr("regulators"), 364 .desc.ops = &da9062_buck_ops, 365 .desc.min_uV = (300) * 1000, [all …]
|
| H A D | helpers.c | 33 ret = regmap_read(rdev->regmap, rdev->desc->enable_reg, &val); in regulator_is_enabled_regmap() 37 val &= rdev->desc->enable_mask; in regulator_is_enabled_regmap() 39 if (rdev->desc->enable_is_inverted) { in regulator_is_enabled_regmap() 40 if (rdev->desc->enable_val) in regulator_is_enabled_regmap() 41 return val != rdev->desc->enable_val; in regulator_is_enabled_regmap() 44 if (rdev->desc->enable_val) in regulator_is_enabled_regmap() 45 return val == rdev->desc->enable_val; in regulator_is_enabled_regmap() 64 if (rdev->desc->enable_is_inverted) { in regulator_enable_regmap() 65 val = rdev->desc->disable_val; in regulator_enable_regmap() 67 val = rdev->desc->enable_val; in regulator_enable_regmap() [all …]
|
| H A D | rt5739.c | 55 const struct regulator_desc *desc = rdev->desc; in rt5739_set_mode() local 59 if (desc->vsel_reg == RT5739_REG_NSEL0) in rt5739_set_mode() 80 const struct regulator_desc *desc = rdev->desc; in rt5739_get_mode() local 85 if (desc->vsel_reg == RT5739_REG_NSEL0) in rt5739_get_mode() 102 const struct regulator_desc *desc = rdev->desc; in rt5739_set_suspend_voltage() local 107 max_uV = desc->min_uV + desc->uV_step * (desc->n_voltages - 1); in rt5739_set_suspend_voltage() 109 if (uV < desc->min_uV || uV > max_uV) in rt5739_set_suspend_voltage() 112 if (desc->vsel_reg == RT5739_REG_NSEL0) in rt5739_set_suspend_voltage() 117 vsel = (uV - desc->min_uV) / desc->uV_step; in rt5739_set_suspend_voltage() 123 const struct regulator_desc *desc = rdev->desc; in rt5739_set_suspend_enable() local [all …]
|
| /linux/drivers/scsi/fnic/ |
| H A D | fnic_res.h | 25 struct wq_enet_desc *desc = vnic_wq_next_desc(wq); in fnic_queue_wq_desc() local 27 wq_enet_desc_enc(desc, in fnic_queue_wq_desc() 49 struct wq_enet_desc *desc = vnic_wq_next_desc(wq); in fnic_queue_wq_eth_desc() local 51 wq_enet_desc_enc(desc, in fnic_queue_wq_eth_desc() 79 struct fcpio_host_req *desc = vnic_wq_copy_next_desc(wq); in fnic_queue_wq_copy_desc_icmnd_16() local 81 desc->hdr.type = FCPIO_ICMND_16; /* enum fcpio_type */ in fnic_queue_wq_copy_desc_icmnd_16() 82 desc->hdr.status = 0; /* header status entry */ in fnic_queue_wq_copy_desc_icmnd_16() 83 desc->hdr._resvd = 0; /* reserved */ in fnic_queue_wq_copy_desc_icmnd_16() 84 desc->hdr.tag.u.req_id = req_id; /* id for this request */ in fnic_queue_wq_copy_desc_icmnd_16() 86 desc->u.icmnd_16.lunmap_id = lunmap_id; /* index into lunmap table */ in fnic_queue_wq_copy_desc_icmnd_16() [all …]
|
| /linux/drivers/infiniband/core/ |
| H A D | packer.c | 54 * @desc:Array of structure field descriptions 55 * @desc_len:Number of entries in @desc 60 * controlled by the array of fields in @desc. 62 void ib_pack(const struct ib_field *desc, in ib_pack() argument 70 if (desc[i].size_bits <= 32) { in ib_pack() 76 shift = 32 - desc[i].offset_bits - desc[i].size_bits; in ib_pack() 77 if (desc[i].struct_size_bytes) in ib_pack() 78 val = value_read(desc[i].struct_offset_bytes, in ib_pack() 79 desc[i].struct_size_bytes, in ib_pack() 84 mask = cpu_to_be32(((1ull << desc[i].size_bits) - 1) << shift); in ib_pack() [all …]
|
| /linux/drivers/crypto/ccp/ |
| H A D | ccp-dmaengine.c | 76 struct ccp_dma_desc *desc, *dtmp; in ccp_free_desc_resources() local 78 list_for_each_entry_safe(desc, dtmp, list, entry) { in ccp_free_desc_resources() 79 ccp_free_cmd_resources(ccp, &desc->active); in ccp_free_desc_resources() 80 ccp_free_cmd_resources(ccp, &desc->pending); in ccp_free_desc_resources() 82 list_del(&desc->entry); in ccp_free_desc_resources() 83 kmem_cache_free(ccp->dma_desc_cache, desc); in ccp_free_desc_resources() 108 struct ccp_dma_desc *desc, *dtmp; in ccp_cleanup_desc_resources() local 110 list_for_each_entry_safe_reverse(desc, dtmp, list, entry) { in ccp_cleanup_desc_resources() 111 if (!async_tx_test_ack(&desc->tx_desc)) in ccp_cleanup_desc_resources() 114 dev_dbg(ccp->dev, "%s - desc=%p\n", __func__, desc); in ccp_cleanup_desc_resources() [all …]
|
| /linux/crypto/ |
| H A D | sha256.c | 76 #define SHA224_CTX(desc) ((struct sha224_ctx *)shash_desc_ctx(desc)) argument 78 static int crypto_sha224_init(struct shash_desc *desc) in crypto_sha224_init() argument 80 sha224_init(SHA224_CTX(desc)); in crypto_sha224_init() 84 static int crypto_sha224_update(struct shash_desc *desc, in crypto_sha224_update() argument 87 sha224_update(SHA224_CTX(desc), data, len); in crypto_sha224_update() 91 static int crypto_sha224_final(struct shash_desc *desc, u8 *out) in crypto_sha224_final() argument 93 sha224_final(SHA224_CTX(desc), out); in crypto_sha224_final() 97 static int crypto_sha224_digest(struct shash_desc *desc, in crypto_sha224_digest() argument 104 static int crypto_sha224_export(struct shash_desc *desc, void *out) in crypto_sha224_export() argument 106 return __crypto_sha256_export(&SHA224_CTX(desc)->ctx, out); in crypto_sha224_export() [all …]
|
| H A D | sha512.c | 78 #define SHA384_CTX(desc) ((struct sha384_ctx *)shash_desc_ctx(desc)) argument 80 static int crypto_sha384_init(struct shash_desc *desc) in crypto_sha384_init() argument 82 sha384_init(SHA384_CTX(desc)); in crypto_sha384_init() 86 static int crypto_sha384_update(struct shash_desc *desc, in crypto_sha384_update() argument 89 sha384_update(SHA384_CTX(desc), data, len); in crypto_sha384_update() 93 static int crypto_sha384_final(struct shash_desc *desc, u8 *out) in crypto_sha384_final() argument 95 sha384_final(SHA384_CTX(desc), out); in crypto_sha384_final() 99 static int crypto_sha384_digest(struct shash_desc *desc, in crypto_sha384_digest() argument 106 static int crypto_sha384_export(struct shash_desc *desc, void *out) in crypto_sha384_export() argument 108 return __crypto_sha512_export(&SHA384_CTX(desc)->ctx, out); in crypto_sha384_export() [all …]
|
| /linux/drivers/dma/amd/ptdma/ |
| H A D | ptdma-dmaengine.c | 52 struct ae4dma_desc desc; in ae4_check_status_error() local 55 memcpy(&desc, &cmd_q->qbase[idx], sizeof(struct ae4dma_desc)); in ae4_check_status_error() 56 status = desc.dw1.status; in ae4_check_status_error() 58 cmd_q->cmd_error = desc.dw1.err_code; in ae4_check_status_error() 91 struct pt_dma_desc *desc = to_pt_desc(vd); in pt_do_cleanup() local 92 struct pt_device *pt = desc->pt; in pt_do_cleanup() 94 kmem_cache_free(pt->dma_desc_cache, desc); in pt_do_cleanup() 114 static int ae4_core_execute_cmd(struct ae4dma_desc *desc, struct ae4_cmd_queue *ae4cmd_q) in ae4_core_execute_cmd() argument 116 bool soc = FIELD_GET(DWORD0_SOC, desc->dwouv.dw0); in ae4_core_execute_cmd() 120 desc->dwouv.dw0 |= FIELD_PREP(DWORD0_IOC, desc->dwouv.dw0); in ae4_core_execute_cmd() [all …]
|
| /linux/lib/crypto/ |
| H A D | poly1305.c | 25 void poly1305_init(struct poly1305_desc_ctx *desc, in poly1305_init() argument 28 desc->s[0] = get_unaligned_le32(key + 16); in poly1305_init() 29 desc->s[1] = get_unaligned_le32(key + 20); in poly1305_init() 30 desc->s[2] = get_unaligned_le32(key + 24); in poly1305_init() 31 desc->s[3] = get_unaligned_le32(key + 28); in poly1305_init() 32 desc->buflen = 0; in poly1305_init() 33 poly1305_block_init(&desc->state, key); in poly1305_init() 37 void poly1305_update(struct poly1305_desc_ctx *desc, in poly1305_update() argument 40 if (desc->buflen + nbytes >= POLY1305_BLOCK_SIZE) { in poly1305_update() 43 if (desc->buflen) { in poly1305_update() [all …]
|
| /linux/include/uapi/linux/usb/ |
| H A D | audio.h | 161 __le16 wTotalLength; /* includes Unit and Terminal desc. */ 267 static inline __u8 uac_mixer_unit_bNrChannels(struct uac_mixer_unit_descriptor *desc) in uac_mixer_unit_bNrChannels() argument 269 return desc->baSourceID[desc->bNrInPins]; in uac_mixer_unit_bNrChannels() 272 static inline __u32 uac_mixer_unit_wChannelConfig(struct uac_mixer_unit_descriptor *desc, in uac_mixer_unit_wChannelConfig() argument 276 return (desc->baSourceID[desc->bNrInPins + 2] << 8) | in uac_mixer_unit_wChannelConfig() 277 desc->baSourceID[desc->bNrInPins + 1]; in uac_mixer_unit_wChannelConfig() 279 return (desc->baSourceID[desc->bNrInPins + 4] << 24) | in uac_mixer_unit_wChannelConfig() 280 (desc->baSourceID[desc->bNrInPins + 3] << 16) | in uac_mixer_unit_wChannelConfig() 281 (desc->baSourceID[desc->bNrInPins + 2] << 8) | in uac_mixer_unit_wChannelConfig() 282 (desc->baSourceID[desc->bNrInPins + 1]); in uac_mixer_unit_wChannelConfig() [all …]
|
| /linux/include/linux/gpio/ |
| H A D | consumer.h | 22 * @desc: Array of pointers to GPIO descriptors 27 struct gpio_desc *desc[]; member 85 void gpiod_put(struct gpio_desc *desc); 107 void devm_gpiod_put(struct device *dev, struct gpio_desc *desc); 108 void devm_gpiod_unhinge(struct device *dev, struct gpio_desc *desc); 111 int gpiod_get_direction(struct gpio_desc *desc); 112 int gpiod_direction_input(struct gpio_desc *desc); 113 int gpiod_direction_output(struct gpio_desc *desc, int value); 114 int gpiod_direction_output_raw(struct gpio_desc *desc, int value); 117 int gpiod_get_value(const struct gpio_desc *desc); [all …]
|
| /linux/drivers/pinctrl/mediatek/ |
| H A D | pinctrl-mtk-common-v2.c | 74 const struct mtk_pin_desc *desc, in mtk_hw_pin_field_lookup() argument 95 if (desc->number >= rc->range[check].s_pin in mtk_hw_pin_field_lookup() 96 && desc->number <= rc->range[check].e_pin) { in mtk_hw_pin_field_lookup() 101 else if (desc->number < rc->range[check].s_pin) in mtk_hw_pin_field_lookup() 109 field, desc->number, desc->name); in mtk_hw_pin_field_lookup() 118 field, desc->number, desc->name); in mtk_hw_pin_field_lookup() 127 (desc->number - c->s_pin) * (c->x_bits); in mtk_hw_pin_field_lookup() 147 const struct mtk_pin_desc *desc, in mtk_hw_pin_field_get() argument 155 return mtk_hw_pin_field_lookup(hw, desc, field, pfd); in mtk_hw_pin_field_get() 193 int mtk_hw_set_value(struct mtk_pinctrl *hw, const struct mtk_pin_desc *desc, in mtk_hw_set_value() argument [all …]
|
| /linux/drivers/comedi/drivers/ |
| H A D | comedi_isadma.c | 17 * @desc: the ISA DMA cookie to program and enable 19 void comedi_isadma_program(struct comedi_isadma_desc *desc) in comedi_isadma_program() argument 24 clear_dma_ff(desc->chan); in comedi_isadma_program() 25 set_dma_mode(desc->chan, desc->mode); in comedi_isadma_program() 26 set_dma_addr(desc->chan, desc->hw_addr); in comedi_isadma_program() 27 set_dma_count(desc->chan, desc->size); in comedi_isadma_program() 28 enable_dma(desc->chan); in comedi_isadma_program() 100 struct comedi_isadma_desc *desc = &dma->desc[dma->cur_dma]; in comedi_isadma_poll() local 106 clear_dma_ff(desc->chan); in comedi_isadma_poll() 108 disable_dma(desc->chan); in comedi_isadma_poll() [all …]
|