Home
last modified time | relevance | path

Searched refs:dac (Results 1 – 25 of 127) sorted by relevance

123456

/linux-6.12.1/drivers/net/wireless/broadcom/b43/
Dtables_lpphy.c1070 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 152, },
1071 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 147, },
1072 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 143, },
1073 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 139, },
1074 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 135, },
1075 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 131, },
1076 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 128, },
1077 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 124, },
1078 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 121, },
1079 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 117, },
[all …]
/linux-6.12.1/drivers/iio/dac/
Dad3552r.c350 static int ad3552r_transfer(struct ad3552r_desc *dac, u8 addr, u32 len, in ad3552r_transfer() argument
359 return spi_write_then_read(dac->spi, buf, 1, data, len); in ad3552r_transfer()
362 return spi_write_then_read(dac->spi, buf, len + 1, NULL, 0); in ad3552r_transfer()
365 static int ad3552r_write_reg(struct ad3552r_desc *dac, u8 addr, u16 val) in ad3552r_write_reg() argument
380 return ad3552r_transfer(dac, addr, reg_len, buf, false); in ad3552r_write_reg()
383 static int ad3552r_read_reg(struct ad3552r_desc *dac, u8 addr, u16 *val) in ad3552r_read_reg() argument
389 err = ad3552r_transfer(dac, addr, reg_len, buf, true); in ad3552r_read_reg()
408 static int ad3552r_update_reg_field(struct ad3552r_desc *dac, u8 addr, u16 mask, in ad3552r_update_reg_field() argument
414 ret = ad3552r_read_reg(dac, addr, &reg); in ad3552r_update_reg_field()
421 return ad3552r_write_reg(dac, addr, reg); in ad3552r_update_reg_field()
[all …]
Dlpc18xx_dac.c52 struct lpc18xx_dac *dac = iio_priv(indio_dev); in lpc18xx_dac_read_raw() local
57 reg = readl(dac->base + LPC18XX_DAC_CR); in lpc18xx_dac_read_raw()
64 *val = regulator_get_voltage(dac->vref) / 1000; in lpc18xx_dac_read_raw()
77 struct lpc18xx_dac *dac = iio_priv(indio_dev); in lpc18xx_dac_write_raw() local
88 mutex_lock(&dac->lock); in lpc18xx_dac_write_raw()
89 writel(reg, dac->base + LPC18XX_DAC_CR); in lpc18xx_dac_write_raw()
90 writel(LPC18XX_DAC_CTRL_DMA_ENA, dac->base + LPC18XX_DAC_CTRL); in lpc18xx_dac_write_raw()
91 mutex_unlock(&dac->lock); in lpc18xx_dac_write_raw()
107 struct lpc18xx_dac *dac; in lpc18xx_dac_probe() local
110 indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*dac)); in lpc18xx_dac_probe()
[all …]
Ddpot-dac.c56 struct dpot_dac *dac = iio_priv(indio_dev); in dpot_dac_read_raw() local
62 return iio_read_channel_raw(dac->dpot, val); in dpot_dac_read_raw()
65 ret = iio_read_channel_scale(dac->dpot, val, val2); in dpot_dac_read_raw()
69 do_div(tmp, dac->max_ohms); in dpot_dac_read_raw()
70 tmp *= regulator_get_voltage(dac->vref) / 1000; in dpot_dac_read_raw()
84 *val *= regulator_get_voltage(dac->vref) / 1000; in dpot_dac_read_raw()
85 *val2 *= dac->max_ohms; in dpot_dac_read_raw()
100 struct dpot_dac *dac = iio_priv(indio_dev); in dpot_dac_read_avail() local
105 return iio_read_avail_channel_raw(dac->dpot, vals, length); in dpot_dac_read_avail()
115 struct dpot_dac *dac = iio_priv(indio_dev); in dpot_dac_write_raw() local
[all …]
Dstm32-dac.c43 struct stm32_dac *dac = iio_priv(indio_dev); in stm32_dac_is_enabled() local
47 ret = regmap_read(dac->common->regmap, STM32_DAC_CR, &val); in stm32_dac_is_enabled()
61 struct stm32_dac *dac = iio_priv(indio_dev); in stm32_dac_set_enable_state() local
68 mutex_lock(&dac->lock); in stm32_dac_set_enable_state()
71 mutex_unlock(&dac->lock); in stm32_dac_set_enable_state()
78 mutex_unlock(&dac->lock); in stm32_dac_set_enable_state()
83 ret = regmap_update_bits(dac->common->regmap, STM32_DAC_CR, msk, en); in stm32_dac_set_enable_state()
84 mutex_unlock(&dac->lock); in stm32_dac_set_enable_state()
95 if (en && dac->common->hfsel) in stm32_dac_set_enable_state()
114 static int stm32_dac_get_value(struct stm32_dac *dac, int channel, int *val) in stm32_dac_get_value() argument
[all …]
Dad5755.c158 } dac[4]; member
608 for (i = 0; i < ARRAY_SIZE(pdata->dac); ++i) { in ad5755_setup_pdata()
609 val = pdata->dac[i].slew.step_size << in ad5755_setup_pdata()
611 val |= pdata->dac[i].slew.rate << in ad5755_setup_pdata()
613 if (pdata->dac[i].slew.enable) in ad5755_setup_pdata()
622 for (i = 0; i < ARRAY_SIZE(pdata->dac); ++i) { in ad5755_setup_pdata()
623 if (!ad5755_is_valid_mode(st, pdata->dac[i].mode)) in ad5755_setup_pdata()
627 if (!pdata->dac[i].ext_current_sense_resistor) in ad5755_setup_pdata()
629 if (pdata->dac[i].enable_voltage_overrange) in ad5755_setup_pdata()
631 val |= pdata->dac[i].mode; in ad5755_setup_pdata()
[all …]
DMakefile33 obj-$(CONFIG_ADI_AXI_DAC) += adi-axi-dac.o
34 obj-$(CONFIG_CIO_DAC) += cio-dac.o
35 obj-$(CONFIG_DPOT_DAC) += dpot-dac.o
50 obj-$(CONFIG_STM32_DAC_CORE) += stm32-dac-core.o
51 obj-$(CONFIG_STM32_DAC) += stm32-dac.o
/linux-6.12.1/sound/soc/img/
Dpistachio-internal-dac.c82 static void pistachio_internal_dac_pwr_off(struct pistachio_internal_dac *dac) in pistachio_internal_dac_pwr_off() argument
84 regmap_update_bits(dac->regmap, PISTACHIO_INTERNAL_DAC_CTRL, in pistachio_internal_dac_pwr_off()
88 pistachio_internal_dac_reg_writel(dac->regmap, 0, in pistachio_internal_dac_pwr_off()
92 static void pistachio_internal_dac_pwr_on(struct pistachio_internal_dac *dac) in pistachio_internal_dac_pwr_on() argument
94 regmap_update_bits(dac->regmap, PISTACHIO_INTERNAL_DAC_SRST, in pistachio_internal_dac_pwr_on()
98 regmap_update_bits(dac->regmap, PISTACHIO_INTERNAL_DAC_SRST, in pistachio_internal_dac_pwr_on()
101 pistachio_internal_dac_reg_writel(dac->regmap, in pistachio_internal_dac_pwr_on()
105 regmap_update_bits(dac->regmap, PISTACHIO_INTERNAL_DAC_CTRL, in pistachio_internal_dac_pwr_on()
124 struct pistachio_internal_dac *dac = snd_soc_component_get_drvdata(component); in pistachio_internal_dac_codec_probe() local
126 snd_soc_component_init_regmap(component, dac->regmap); in pistachio_internal_dac_codec_probe()
[all …]
/linux-6.12.1/drivers/leds/
Dleds-dac124s085.c52 struct dac124s085 *dac; in dac124s085_probe() local
56 dac = devm_kzalloc(&spi->dev, sizeof(*dac), GFP_KERNEL); in dac124s085_probe()
57 if (!dac) in dac124s085_probe()
62 for (i = 0; i < ARRAY_SIZE(dac->leds); i++) { in dac124s085_probe()
63 led = dac->leds + i; in dac124s085_probe()
77 spi_set_drvdata(spi, dac); in dac124s085_probe()
83 led_classdev_unregister(&dac->leds[i].ldev); in dac124s085_probe()
90 struct dac124s085 *dac = spi_get_drvdata(spi); in dac124s085_remove() local
93 for (i = 0; i < ARRAY_SIZE(dac->leds); i++) in dac124s085_remove()
94 led_classdev_unregister(&dac->leds[i].ldev); in dac124s085_remove()
/linux-6.12.1/sound/mips/
Dhal2.c83 struct hal2_codec dac; member
303 if (hal2->dac.pbus.pbus->pbdma_ctrl & HPC3_PDMACTRL_INT) { in hal2_interrupt()
304 snd_pcm_period_elapsed(hal2->dac.substream); in hal2_interrupt()
335 unsigned int master = hal2->dac.master; in hal2_set_dac_rate()
336 int inc = hal2->dac.inc; in hal2_set_dac_rate()
337 int mod = hal2->dac.mod; in hal2_set_dac_rate()
358 struct hal2_pbus *pbus = &hal2->dac.pbus; in hal2_setup_dac()
365 sample_size = 2 * hal2->dac.voices; in hal2_setup_dac()
385 | (hal2->dac.voices << H2I_C1_DATAT_SHIFT)); in hal2_setup_dac()
415 struct hal2_pbus *pbus = &hal2->dac.pbus; in hal2_start_dac()
[all …]
/linux-6.12.1/sound/soc/codecs/
Dsti-sas.c72 struct sti_dac_audio dac; member
84 status = regmap_read(drvdata->dac.regmap, reg, &val); in sti_sas_read_reg()
96 return regmap_write(drvdata->dac.regmap, reg, value); in sti_sas_write_reg()
268 drvdata->dac.mclk = freq; in sti_sas_set_sysclk()
290 if ((drvdata->dac.mclk / runtime->rate) != 256) { in sti_sas_prepare()
427 drvdata->dac.virt_regmap = devm_regmap_init(&pdev->dev, NULL, drvdata, in sti_sas_driver_probe()
429 if (IS_ERR(drvdata->dac.virt_regmap)) { in sti_sas_driver_probe()
431 return PTR_ERR(drvdata->dac.virt_regmap); in sti_sas_driver_probe()
435 drvdata->dac.regmap = in sti_sas_driver_probe()
437 if (IS_ERR(drvdata->dac.regmap)) { in sti_sas_driver_probe()
[all …]
Dtlv320aic23.c230 int dac, int dac_l, int dac_h, int need_dac) in get_score() argument
233 (dac >= dac_l) && (dac <= dac_h)) { in get_score()
235 int diff_dac = need_dac - dac; in get_score()
265 int dac; in find_rate() local
270 dac = base * sr_dac_mult_table[j]; in find_rate()
272 dac, dac_l, dac_h, need_dac); in find_rate()
280 (dac >> 1), dac_l, dac_h, need_dac); in find_rate()
301 int dac = (val * sr_dac_mult_table[sr]) / SR_MULT; in get_current_sample_rates() local
304 dac >>= 1; in get_current_sample_rates()
307 *sample_rate_dac = dac; in get_current_sample_rates()
[all …]
Dwm8728.c90 u16 dac = snd_soc_component_read(component, WM8728_DACCTL); in wm8728_hw_params() local
92 dac &= ~0x18; in wm8728_hw_params()
98 dac |= 0x10; in wm8728_hw_params()
101 dac |= 0x08; in wm8728_hw_params()
107 snd_soc_component_write(component, WM8728_DACCTL, dac); in wm8728_hw_params()
/linux-6.12.1/drivers/video/fbdev/
Dffb.c355 struct ffb_dac __iomem *dac; member
427 struct ffb_dac __iomem *dac = par->dac; in ffb_switch_from_graph() local
446 upa_writel(FFB_DAC_CUR_CTRL, &dac->type2); in ffb_switch_from_graph()
448 upa_writel(0, &dac->value2); in ffb_switch_from_graph()
451 FFB_DAC_CUR_CTRL_P1), &dac->value2); in ffb_switch_from_graph()
676 struct ffb_dac __iomem *dac = par->dac; in ffb_blank() local
685 upa_writel(FFB_DAC_TGEN, &dac->type); in ffb_blank()
686 val = upa_readl(&dac->value); in ffb_blank()
701 upa_writel(FFB_DAC_TGEN, &dac->type); in ffb_blank()
702 upa_writel(val, &dac->value); in ffb_blank()
[all …]
Darkfb.c34 struct dac_info *dac; member
360 struct dac_info dac; member
497 int rv = dac_set_freq(par->dac, 0, 1000000000 / pixclock); in ark_set_pixclock()
547 dac_set_mode(par->dac, DAC_PSEUDO8_8); in arkfb_release()
714 dac_set_mode(par->dac, DAC_PSEUDO8_8); in arkfb_set_par()
723 dac_set_mode(par->dac, DAC_PSEUDO8_8); in arkfb_set_par()
730 dac_set_mode(par->dac, DAC_PSEUDO8_8); in arkfb_set_par()
740 dac_set_mode(par->dac, DAC_PSEUDO8_8); in arkfb_set_par()
744 dac_set_mode(par->dac, DAC_PSEUDO8_16); in arkfb_set_par()
753 dac_set_mode(par->dac, DAC_RGB1555_16); in arkfb_set_par()
[all …]
Dpmag-ba-fb.c42 volatile u32 __iomem *dac; member
82 writeb(v, par->dac + reg / 4); in dac_write()
87 return readb(par->dac + reg / 4); in dac_read()
186 par->dac = par->mmio + PMAG_BA_BT459; in pmagbafb_probe()
/linux-6.12.1/Documentation/devicetree/bindings/sound/
Dimg,pistachio-internal-dac.txt5 - compatible: "img,pistachio-internal-dac"
8 node which contains the internal dac control registers
14 internal_dac: internal-dac {
15 compatible = "img,pistachio-internal-dac";
/linux-6.12.1/drivers/iio/adc/
Denvelope-detector.c55 struct iio_channel *dac; member
149 ret = iio_write_channel_raw(env->dac, env->invert ? 0 : env->dac_max); in envelope_detector_setup_compare()
157 ret = iio_write_channel_raw(env->dac, env->level); in envelope_detector_setup_compare()
220 return iio_read_channel_scale(env->dac, val, val2); in envelope_detector_read_raw()
349 env->dac = devm_iio_channel_get(dev, "dac"); in envelope_detector_probe()
350 if (IS_ERR(env->dac)) in envelope_detector_probe()
351 return dev_err_probe(dev, PTR_ERR(env->dac), in envelope_detector_probe()
373 ret = iio_get_channel_type(env->dac, &type); in envelope_detector_probe()
382 ret = iio_read_max_channel_raw(env->dac, &env->dac_max); in envelope_detector_probe()
/linux-6.12.1/drivers/gpu/drm/sun4i/
Dsun4i_tv.c31 #define SUN4I_TVE_EN_DAC_MAP(dac, out) (((out) & 0xf) << (dac + 1) * 4) argument
52 #define SUN4I_TVE_DAC0_DAC_EN(dac) BIT(dac) argument
55 #define SUN4I_TVE_NOTCH_DAC0_TO_DAC_DLY(dac, x) ((4 - (x)) << (dac * 3)) argument
72 #define SUN4I_TVE_DAC1_AMPLITUDE(dac, x) ((x) << (dac * 8)) argument
75 #define SUN4I_TVE_DETECT_STA_DAC(dac) BIT((dac * 8)) argument
/linux-6.12.1/sound/soc/tegra/
Dtegra20_das.c104 static void tegra20_das_connect_dap_to_dac(struct tegra20_das *das, int dap, int dac) in tegra20_das_connect_dap_to_dac() argument
111 reg = dac << TEGRA20_DAS_DAP_CTRL_SEL_DAP_CTRL_SEL_P; in tegra20_das_connect_dap_to_dac()
116 static void tegra20_das_connect_dac_to_dap(struct tegra20_das *das, int dac, int dap) in tegra20_das_connect_dac_to_dap() argument
122 (dac * TEGRA20_DAS_DAC_INPUT_DATA_CLK_SEL_STRIDE); in tegra20_das_connect_dac_to_dap()
/linux-6.12.1/Documentation/devicetree/bindings/media/i2c/
Dadv7343.txt19 - ad,adv7343-power-mode-dac: array configuring the power on/off DAC's 1..6,
22 - ad,adv7343-sd-config-dac-out: array configure SD DAC Output's 1 and 2, 0 = OFF
41 adi,dac-enable = <1 1 1 0 0 1>;
43 adi,sd-dac-enable = <1 0>;
/linux-6.12.1/drivers/gpu/drm/nouveau/nvkm/engine/disp/
Dnv50.c275 nv50_dac_clock(struct nvkm_ior *dac) in nv50_dac_clock() argument
277 struct nvkm_device *device = dac->disp->engine.subdev.device; in nv50_dac_clock()
278 const u32 doff = nv50_ior_base(dac); in nv50_dac_clock()
284 nv50_dac_sense(struct nvkm_ior *dac, u32 loadval) in nv50_dac_sense() argument
286 struct nvkm_device *device = dac->disp->engine.subdev.device; in nv50_dac_sense()
287 const u32 doff = nv50_ior_base(dac); in nv50_dac_sense()
289 dac->func->power(dac, false, true, false, false, false); in nv50_dac_sense()
296 dac->func->power(dac, false, false, false, false, false); in nv50_dac_sense()
313 nv50_dac_power(struct nvkm_ior *dac, bool normal, bool pu, bool data, bool vsync, bool hsync) in nv50_dac_power() argument
315 struct nvkm_device *device = dac->disp->engine.subdev.device; in nv50_dac_power()
[all …]
/linux-6.12.1/sound/pci/ice1712/
Dphase.c354 int dac; in wm_master_vol_put() local
356 for (dac = 0; dac < ice->num_total_dacs; dac += 2) in wm_master_vol_put()
357 wm_set_vol(ice, WM_DAC_ATTEN + dac + ch, in wm_master_vol_put()
358 spec->vol[dac + ch], in wm_master_vol_put()
604 int dac; in wm_master_mute_put() local
609 for (dac = 0; dac < ice->num_total_dacs; dac += 2) in wm_master_mute_put()
610 wm_set_vol(ice, WM_DAC_ATTEN + dac + i, in wm_master_mute_put()
611 spec->vol[dac + i], in wm_master_mute_put()
/linux-6.12.1/drivers/hwmon/
Dmax6650.c114 u8 dac; member
140 static int dac_to_pwm(int dac, bool v12) in dac_to_pwm() argument
146 return clamp_val(255 - (255 * dac) / DAC_LIMIT(v12), 0, 255); in dac_to_pwm()
445 data->dac = reg; in max6650_init_client()
499 data->dac = pwm_to_dac(state, data->config & MAX6650_CFG_V12); in max6650_set_cur_state()
500 err = i2c_smbus_write_byte_data(client, MAX6650_REG_DAC, data->dac); in max6650_set_cur_state()
532 *val = dac_to_pwm(data->dac, in max6650_read()
629 data->dac = reg; in max6650_write()
/linux-6.12.1/drivers/media/i2c/
Dadv7343.c232 state->pdata->mode_config.dac[2] << 2 | in adv7343_setoutput()
233 state->pdata->mode_config.dac[1] << 3 | in adv7343_setoutput()
234 state->pdata->mode_config.dac[0] << 4 | in adv7343_setoutput()
235 state->pdata->mode_config.dac[5] << 5 | in adv7343_setoutput()
236 state->pdata->mode_config.dac[4] << 6 | in adv7343_setoutput()
237 state->pdata->mode_config.dac[3] << 7; in adv7343_setoutput()
421 pdata->mode_config.dac, 6); in adv7343_get_pdata()

123456