Home
last modified time | relevance | path

Searched refs:cm (Results 1 – 25 of 58) sorted by relevance

123

/drivers/clk/sunxi-ng/
Dccu_mult.c38 struct ccu_mult *cm = data; in ccu_mult_round_rate() local
41 _cm.min = cm->mult.min; in ccu_mult_round_rate()
43 if (cm->mult.max) in ccu_mult_round_rate()
44 _cm.max = cm->mult.max; in ccu_mult_round_rate()
46 _cm.max = (1 << cm->mult.width) + cm->mult.offset - 1; in ccu_mult_round_rate()
55 struct ccu_mult *cm = hw_to_ccu_mult(hw); in ccu_mult_disable() local
57 return ccu_gate_helper_disable(&cm->common, cm->enable); in ccu_mult_disable()
62 struct ccu_mult *cm = hw_to_ccu_mult(hw); in ccu_mult_enable() local
64 return ccu_gate_helper_enable(&cm->common, cm->enable); in ccu_mult_enable()
69 struct ccu_mult *cm = hw_to_ccu_mult(hw); in ccu_mult_is_enabled() local
[all …]
Dccu_mux.c16 struct ccu_mux_internal *cm, in ccu_mux_get_prediv() argument
32 parent_index = reg >> cm->shift; in ccu_mux_get_prediv()
33 parent_index &= (1 << cm->width) - 1; in ccu_mux_get_prediv()
39 for (i = 0; i < cm->n_predivs; i++) in ccu_mux_get_prediv()
40 if (parent_index == cm->fixed_predivs[i].index) in ccu_mux_get_prediv()
41 prediv = cm->fixed_predivs[i].div; in ccu_mux_get_prediv()
47 for (i = 0; i < cm->n_var_predivs; i++) in ccu_mux_get_prediv()
48 if (parent_index == cm->var_predivs[i].index) { in ccu_mux_get_prediv()
51 div = reg >> cm->var_predivs[i].shift; in ccu_mux_get_prediv()
52 div &= (1 << cm->var_predivs[i].width) - 1; in ccu_mux_get_prediv()
[all …]
Dccu_mmc_timing.c23 struct ccu_common *cm = hw_to_ccu_common(hw); in sunxi_ccu_set_mmc_timing_mode() local
27 if (!(cm->features & CCU_FEATURE_MMC_TIMING_SWITCH)) in sunxi_ccu_set_mmc_timing_mode()
30 spin_lock_irqsave(cm->lock, flags); in sunxi_ccu_set_mmc_timing_mode()
32 val = readl(cm->base + cm->reg); in sunxi_ccu_set_mmc_timing_mode()
37 writel(val, cm->base + cm->reg); in sunxi_ccu_set_mmc_timing_mode()
39 spin_unlock_irqrestore(cm->lock, flags); in sunxi_ccu_set_mmc_timing_mode()
56 struct ccu_common *cm = hw_to_ccu_common(hw); in sunxi_ccu_get_mmc_timing_mode() local
58 if (!(cm->features & CCU_FEATURE_MMC_TIMING_SWITCH)) in sunxi_ccu_get_mmc_timing_mode()
61 return !!(readl(cm->base + cm->reg) & CCU_MMC_NEW_TIMING_MODE); in sunxi_ccu_get_mmc_timing_mode()
Dccu_mp.c270 struct ccu_common *cm = hw_to_ccu_common(hw); in ccu_mp_mmc_recalc_rate() local
271 u32 val = readl(cm->base + cm->reg); in ccu_mp_mmc_recalc_rate()
281 struct ccu_common *cm = hw_to_ccu_common(hw); in ccu_mp_mmc_determine_rate() local
282 u32 val = readl(cm->base + cm->reg); in ccu_mp_mmc_determine_rate()
307 struct ccu_common *cm = hw_to_ccu_common(hw); in ccu_mp_mmc_set_rate() local
308 u32 val = readl(cm->base + cm->reg); in ccu_mp_mmc_set_rate()
Dccu_mux.h86 struct ccu_mux_internal *cm,
90 struct ccu_mux_internal *cm,
99 struct ccu_mux_internal *cm);
101 struct ccu_mux_internal *cm,
107 struct ccu_mux_internal *cm; member
/drivers/power/supply/
Dcharger-manager.c95 static bool is_batt_present(struct charger_manager *cm) in is_batt_present() argument
102 switch (cm->desc->battery_present) { in is_batt_present()
109 psy = power_supply_get_by_name(cm->desc->psy_fuel_gauge); in is_batt_present()
120 for (i = 0; cm->desc->psy_charger_stat[i]; i++) { in is_batt_present()
122 cm->desc->psy_charger_stat[i]); in is_batt_present()
124 dev_err(cm->dev, "Cannot find power supply \"%s\"\n", in is_batt_present()
125 cm->desc->psy_charger_stat[i]); in is_batt_present()
151 static bool is_ext_pwr_online(struct charger_manager *cm) in is_ext_pwr_online() argument
159 for (i = 0; cm->desc->psy_charger_stat[i]; i++) { in is_ext_pwr_online()
160 psy = power_supply_get_by_name(cm->desc->psy_charger_stat[i]); in is_ext_pwr_online()
[all …]
/drivers/rapidio/
Drio_cm.c203 struct cm_dev *cm; member
226 static int riocm_post_send(struct cm_dev *cm, struct rio_dev *rdev,
300 static void *riocm_rx_get_msg(struct cm_dev *cm) in riocm_rx_get_msg() argument
305 msg = rio_get_inb_message(cm->mport, cmbox); in riocm_rx_get_msg()
308 if (cm->rx_buf[i] == msg) { in riocm_rx_get_msg()
309 cm->rx_buf[i] = NULL; in riocm_rx_get_msg()
310 cm->rx_slots++; in riocm_rx_get_msg()
329 static void riocm_rx_fill(struct cm_dev *cm, int nent) in riocm_rx_fill() argument
333 if (cm->rx_slots == 0) in riocm_rx_fill()
336 for (i = 0; i < RIOCM_RX_RING_SIZE && cm->rx_slots && nent; i++) { in riocm_rx_fill()
[all …]
/drivers/infiniband/ulp/ipoib/
Dipoib_cm.c99 priv->cm.rx_wr.wr_id = id | IPOIB_OP_CM | IPOIB_OP_RECV; in ipoib_cm_post_receive_srq()
101 for (i = 0; i < priv->cm.num_frags; ++i) in ipoib_cm_post_receive_srq()
102 priv->cm.rx_sge[i].addr = priv->cm.srq_ring[id].mapping[i]; in ipoib_cm_post_receive_srq()
104 ret = ib_post_srq_recv(priv->cm.srq, &priv->cm.rx_wr, NULL); in ipoib_cm_post_receive_srq()
107 ipoib_cm_dma_unmap_rx(priv, priv->cm.num_frags - 1, in ipoib_cm_post_receive_srq()
108 priv->cm.srq_ring[id].mapping); in ipoib_cm_post_receive_srq()
109 dev_kfree_skb_any(priv->cm.srq_ring[id].skb); in ipoib_cm_post_receive_srq()
110 priv->cm.srq_ring[id].skb = NULL; in ipoib_cm_post_receive_srq()
217 if (list_empty(&priv->cm.rx_flush_list) || in ipoib_cm_start_rx_drain()
218 !list_empty(&priv->cm.rx_drain_list)) in ipoib_cm_start_rx_drain()
[all …]
Dipoib.h405 struct ipoib_cm_dev_priv cm; member
447 struct ipoib_cm_tx *cm; member
640 return test_bit(IPOIB_FLAG_OPER_UP, &neigh->cm->flags); in ipoib_cm_up()
645 return neigh->cm; in ipoib_cm_get()
650 neigh->cm = tx; in ipoib_cm_set()
656 return !!priv->cm.srq; in ipoib_cm_has_srq()
662 return priv->cm.max_cm_mtu; in ipoib_cm_max_mtu()
/drivers/hid/
Dhid-cmedia.c91 static void hp_ev(struct hid_device *hid, struct cmhid *cm, int value) in hp_ev() argument
93 input_report_switch(cm->input_dev, SW_HEADPHONE_INSERT, value); in hp_ev()
94 input_sync(cm->input_dev); in hp_ev()
100 struct cmhid *cm = hid_get_drvdata(hid); in cmhid_raw_event() local
108 hp_ev(hid, cm, 0); in cmhid_raw_event()
112 hp_ev(hid, cm, 1); in cmhid_raw_event()
124 struct cmhid *cm = hid_get_drvdata(hid); in cmhid_input_configured() local
127 cm->input_dev = input_dev; in cmhid_input_configured()
128 memcpy(cm->switch_map, jack_switch_types, sizeof(cm->switch_map)); in cmhid_input_configured()
131 input_set_capability(cm->input_dev, in cmhid_input_configured()
[all …]
/drivers/media/usb/pwc/
Dpwc-dec23.c352 const unsigned char *cm = pwc_crop_table+MAX_OUTER_CROP_VALUE; in copy_image_block_Y() local
356 *d++ = cm[c[0] >> scalebits]; in copy_image_block_Y()
357 *d++ = cm[c[1] >> scalebits]; in copy_image_block_Y()
358 *d++ = cm[c[2] >> scalebits]; in copy_image_block_Y()
359 *d++ = cm[c[3] >> scalebits]; in copy_image_block_Y()
362 *d++ = cm[c[4] >> scalebits]; in copy_image_block_Y()
363 *d++ = cm[c[5] >> scalebits]; in copy_image_block_Y()
364 *d++ = cm[c[6] >> scalebits]; in copy_image_block_Y()
365 *d++ = cm[c[7] >> scalebits]; in copy_image_block_Y()
368 *d++ = cm[c[8] >> scalebits]; in copy_image_block_Y()
[all …]
/drivers/gpu/drm/amd/display/dc/dml/dsc/
Drc_calc_fpu.c34 (cm == CM_444 || cm == CM_RGB) ? (val444) : (cm == CM_422 ? (val422) : (val420))
74 static void get_qp_set(qp_set qps, enum colour_mode cm, enum bits_per_comp bpc, in get_qp_set() argument
176 enum colour_mode cm, in _do_calc_rc_params() argument
199 …((bpc == BPC_8) ? 11 : (bpc == BPC_10 ? 15 : 19)) - ((minor_version == 1 && cm == CM_444) ? 1 : 0); in _do_calc_rc_params()
200 …((bpc == BPC_8) ? 11 : (bpc == BPC_10 ? 15 : 19)) - ((minor_version == 1 && cm == CM_444) ? 1 : 0); in _do_calc_rc_params()
204 switch (cm) { in _do_calc_rc_params()
218 …n3(0, (12 + (int) (0.09 * min(34, slice_height - 8))), (int)(((3 * bpc + (cm == CM_444 ? 0 : 2)) … in _do_calc_rc_params()
223 initial_xmit_delay_factor = (cm == CM_444 || cm == CM_RGB) ? 1.0 : 2.0; in _do_calc_rc_params()
226 if (cm == CM_422 || cm == CM_420) in _do_calc_rc_params()
230 if (3 * bpp_group >= (((rc->initial_xmit_delay + 2) / 3) * (3 + (cm == CM_422)))) { in _do_calc_rc_params()
[all …]
/drivers/clk/sprd/
Dmux.c41 struct sprd_mux *cm = hw_to_sprd_mux(hw); in sprd_mux_get_parent() local
43 return sprd_mux_helper_get_parent(&cm->common, &cm->mux); in sprd_mux_get_parent()
66 struct sprd_mux *cm = hw_to_sprd_mux(hw); in sprd_mux_set_parent() local
68 return sprd_mux_helper_set_parent(&cm->common, &cm->mux, index); in sprd_mux_set_parent()
/drivers/net/can/dev/
Dnetlink.c39 struct can_ctrlmode *cm = nla_data(data[IFLA_CAN_CTRLMODE]); in can_validate() local
41 is_can_fd = cm->flags & cm->mask & CAN_CTRLMODE_FD; in can_validate()
108 struct can_ctrlmode *cm; in can_changelink() local
115 cm = nla_data(data[IFLA_CAN_CTRLMODE]); in can_changelink()
117 maskedflags = cm->flags & cm->mask; in can_changelink()
132 priv->ctrlmode &= ~cm->mask; in can_changelink()
269 struct can_ctrlmode cm = {.flags = priv->ctrlmode}; in can_fill_info() local
286 nla_put(skb, IFLA_CAN_CTRLMODE, sizeof(cm), &cm) || in can_fill_info()
/drivers/infiniband/core/
Dcm.c125 } cm; variable
475 read_lock_irqsave(&cm.device_lock, flags); in get_cm_port_from_path()
476 list_for_each_entry(cm_dev, &cm.device_list, list) { in get_cm_port_from_path()
482 read_unlock_irqrestore(&cm.device_lock, flags); in get_cm_port_from_path()
490 read_lock_irqsave(&cm.device_lock, flags); in get_cm_port_from_path()
491 list_for_each_entry(cm_dev, &cm.device_list, list) { in get_cm_port_from_path()
501 read_unlock_irqrestore(&cm.device_lock, flags); in get_cm_port_from_path()
566 return (__force u32) (local_id ^ cm.random_id_operand); in cm_local_id()
574 cm_id_priv = xa_load(&cm.local_id_table, cm_local_id(local_id)); in cm_acquire_id()
616 struct rb_node **link = &cm.listen_service_table.rb_node; in cm_insert_listen()
[all …]
/drivers/net/ethernet/mellanox/mlxsw/
Dspectrum_buffers.c212 struct mlxsw_sp_sb_cm *cm; in mlxsw_sp_sb_cm_write() local
226 cm = mlxsw_sp_sb_cm_get(mlxsw_sp, local_port, pg_buff, in mlxsw_sp_sb_cm_write()
228 cm->min_buff = min_buff; in mlxsw_sp_sb_cm_write()
229 cm->max_buff = max_buff; in mlxsw_sp_sb_cm_write()
230 cm->pool_index = pool_index; in mlxsw_sp_sb_cm_write()
932 const struct mlxsw_sp_sb_cm *cm; in __mlxsw_sp_sb_cms_init() local
938 cm = &cms[i]; in __mlxsw_sp_sb_cms_init()
939 if (WARN_ON(sb_vals->pool_dess[cm->pool_index].dir != dir)) in __mlxsw_sp_sb_cms_init()
942 min_buff = mlxsw_sp_bytes_cells(mlxsw_sp, cm->min_buff); in __mlxsw_sp_sb_cms_init()
943 max_buff = cm->max_buff; in __mlxsw_sp_sb_cms_init()
[all …]
/drivers/platform/x86/
Deeepc-laptop.c207 static int set_acpi(struct eeepc_laptop *eeepc, int cm, int value) in set_acpi() argument
209 const char *method = cm_setv[cm]; in set_acpi()
213 if ((eeepc->cm_supported & (0x1 << cm)) == 0) in set_acpi()
221 static int get_acpi(struct eeepc_laptop *eeepc, int cm) in get_acpi() argument
223 const char *method = cm_getv[cm]; in get_acpi()
228 if ((eeepc->cm_supported & (0x1 << cm)) == 0) in get_acpi()
236 static int acpi_setter_handle(struct eeepc_laptop *eeepc, int cm, in acpi_setter_handle() argument
239 const char *method = cm_setv[cm]; in acpi_setter_handle()
244 if ((eeepc->cm_supported & (0x1 << cm)) == 0) in acpi_setter_handle()
267 static ssize_t store_sys_acpi(struct device *dev, int cm, in store_sys_acpi() argument
[all …]
/drivers/phy/freescale/
Dphy-fsl-imx8-mipi-dphy.c82 u32 cm; member
193 cfg->cm = numerator; in mixel_dphy_config_from_opts()
195 if (cfg->cm < 16 || cfg->cm > 255 || in mixel_dphy_config_from_opts()
199 cfg->cm, cfg->cn, cfg->co); in mixel_dphy_config_from_opts()
305 if (priv->cfg.cm < 16 || priv->cfg.cm > 255 || in mixel_dphy_set_pll_params()
309 priv->cfg.cm, priv->cfg.cn, priv->cfg.co); in mixel_dphy_set_pll_params()
313 priv->cfg.cm, priv->cfg.cn, priv->cfg.co); in mixel_dphy_set_pll_params()
314 phy_write(phy, CM(priv->cfg.cm), DPHY_CM); in mixel_dphy_set_pll_params()
/drivers/media/platform/mtk-vcodec/vdec/
Dvdec_vp8_if.c107 void __iomem *cm; member
171 inst->reg_base.cm = mtk_vcodec_get_reg_addr(inst->ctx, VDEC_CM); in get_hw_reg_base()
184 void __iomem *cm = inst->reg_base.cm; in write_hw_segmentation_data() local
192 writel(val, cm + VP8_HW_VLD_ADDR); in write_hw_segmentation_data()
195 writel(val, cm + VP8_HW_VLD_VALUE); in write_hw_segmentation_data()
205 void __iomem *cm = inst->reg_base.cm; in read_hw_segmentation_data() local
213 writel(val, cm + VP8_HW_VLD_ADDR); in read_hw_segmentation_data()
215 val = readl(cm + VP8_HW_VLD_VALUE); in read_hw_segmentation_data()
/drivers/usb/atm/
Dcxacru.c193 static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm,
608 static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm, in cxacru_cm() argument
635 cm, ret); in cxacru_cm()
641 wbuf[0] = cm; in cxacru_cm()
643 wbuf[offb] = cm; in cxacru_cm()
653 cm, ret); in cxacru_cm()
660 usb_err(instance->usbatm, "send of cm %#x failed (%d)\n", cm, ret); in cxacru_cm()
667 usb_err(instance->usbatm, "receive of cm %#x failed (%d)\n", cm, ret); in cxacru_cm()
673 cm, actlen); in cxacru_cm()
680 if (rbuf[offb] != cm) { in cxacru_cm()
[all …]
/drivers/net/arcnet/
Dcom20020-pci.c164 struct com20020_pci_channel_map *cm = &ci->chan_map_tbl[i]; in com20020pci_probe() local
180 ioaddr = pci_resource_start(pdev, cm->bar) + cm->offset; in com20020pci_probe()
182 r = devm_request_region(&pdev->dev, ioaddr, cm->size, in com20020pci_probe()
186 ioaddr, ioaddr + cm->size - 1); in com20020pci_probe()
/drivers/crypto/amcc/
Dcrypto4xx_alg.c50 static void set_dynamic_sa_command_1(struct dynamic_sa_ctl *sa, u32 cm, in set_dynamic_sa_command_1() argument
56 sa->sa_command_1.bf.crypto_mode31 = (cm & 4) >> 2; in set_dynamic_sa_command_1()
57 sa->sa_command_1.bf.crypto_mode9_8 = cm & 3; in set_dynamic_sa_command_1()
124 unsigned char cm, in crypto4xx_setkey_aes() argument
146 set_dynamic_sa_command_0(sa, SA_NOT_SAVE_HASH, (cm == CRYPTO_MODE_ECB ? in crypto4xx_setkey_aes()
148 SA_NOT_LOAD_HASH, (cm == CRYPTO_MODE_ECB ? in crypto4xx_setkey_aes()
155 set_dynamic_sa_command_1(sa, cm, SA_HASH_MODE_HASH, in crypto4xx_setkey_aes()
/drivers/net/can/sja1000/
Dplx_pci.c658 struct plx_pci_channel_map *cm = &ci->chan_map_tbl[i]; in plx_pci_add_card() local
677 addr = pci_iomap(pdev, cm->bar, cm->size); in plx_pci_add_card()
680 dev_err(&pdev->dev, "Failed to remap BAR%d\n", cm->bar); in plx_pci_add_card()
684 priv->reg_base = addr + cm->offset; in plx_pci_add_card()
/drivers/staging/media/av7110/
Daudio-fopen.rst81 .. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
Dvideo-fopen.rst83 .. tabularcolumns:: |p{2.5cm}|p{15.0cm}|

123