/kernel/linux/linux-6.6/drivers/iio/light/ |
H A D | rohm-bu27034.c | 411 * always update both gains we may result unsupported bit in bu27034_write_gain_sel() 477 struct bu27034_gain_check gains[] = { in bu27034_try_set_int_time() local 481 int numg = ARRAY_SIZE(gains); in bu27034_try_set_int_time() 505 ret = bu27034_get_gain(data, gains[i].chan, &gains[i].old_gain); in bu27034_try_set_int_time() 510 gains[i].old_gain, in bu27034_try_set_int_time() 512 &gains[i].new_gain); in bu27034_try_set_int_time() 517 _bu27034_get_scale(data, gains[i].chan, &scale1, &scale2); in bu27034_try_set_int_time() 520 gains[i].chan, time_us, scale1, scale2); in bu27034_try_set_int_time() 522 if (gains[ in bu27034_try_set_int_time() [all...] |
H A D | rohm-bu27008.c | 299 * corresponds to gain 2X on IR. Rest of the selctors correspond to same gains 345 const struct iio_gain_sel_pair *gains; member 490 * We could allow setting separate gains for RGBC and IR when the in bu27008_write_gain_sel() 495 * software complexity when we would need to go through the gains in bu27008_write_gain_sel() 501 * RGBC or IR gains correctly set while other jumps to odd value? in bu27008_write_gain_sel() 502 * Maybe look-up a value where both gains are somehow optimized in bu27008_write_gain_sel() 504 * expect us to reject changes when optimal gains can't be set to both in bu27008_write_gain_sel() 566 * and then individual gains for channels. Currently this is not the in bu27008_get_gain_sel() 569 * If we some day decide to support individual gains, then we need to in bu27008_get_gain_sel() 694 .gains [all...] |
/kernel/linux/linux-5.10/drivers/media/usb/gspca/stv06xx/ |
H A D | stv06xx_hdcs.c | 253 u8 gains[4]; in hdcs_set_gains() local 259 gains[0] = g; in hdcs_set_gains() 260 gains[1] = g; in hdcs_set_gains() 261 gains[2] = g; in hdcs_set_gains() 262 gains[3] = g; in hdcs_set_gains() 264 err = hdcs_reg_write_seq(sd, HDCS_ERECPGA, gains, 4); in hdcs_set_gains()
|
/kernel/linux/linux-6.6/drivers/media/usb/gspca/stv06xx/ |
H A D | stv06xx_hdcs.c | 253 u8 gains[4]; in hdcs_set_gains() local 259 gains[0] = g; in hdcs_set_gains() 260 gains[1] = g; in hdcs_set_gains() 261 gains[2] = g; in hdcs_set_gains() 262 gains[3] = g; in hdcs_set_gains() 264 err = hdcs_reg_write_seq(sd, HDCS_ERECPGA, gains, 4); in hdcs_set_gains()
|
/kernel/linux/linux-5.10/sound/pci/lola/ |
H A D | lola_mixer.c | 238 unsigned short *gains) 246 writew(*gains, &chip->mixer.array->src_gain[i]); 247 gains++; 292 unsigned int mask, unsigned short *gains) 301 writew(*gains, &chip->mixer.array->dest_mix_gain[id][i]); 302 gains++; 469 /* set all digital input source (master) gains to 0dB */ in init_mixer_values() 473 /* set all digital playback source (master) gains to 0dB */ in init_mixer_values() 785 unsigned short gains[MAX_STREAM_COUNT]; 793 gains[nu [all...] |
/kernel/linux/linux-6.6/sound/pci/lola/ |
H A D | lola_mixer.c | 240 unsigned short *gains) 248 writew(*gains, &chip->mixer.array->src_gain[i]); 249 gains++; 294 unsigned int mask, unsigned short *gains) 303 writew(*gains, &chip->mixer.array->dest_mix_gain[id][i]); 304 gains++; 471 /* set all digital input source (master) gains to 0dB */ in init_mixer_values() 475 /* set all digital playback source (master) gains to 0dB */ in init_mixer_values() 787 unsigned short gains[MAX_STREAM_COUNT]; 795 gains[nu [all...] |
/kernel/linux/linux-5.10/drivers/net/wireless/broadcom/b43/ |
H A D | phy_lp.c | 847 struct lpphy_tx_gains gains; in lpphy_get_tx_gains() local 850 gains.dac = (b43_phy_read(dev, B43_LPPHY_AFE_DAC_CTL) & 0x380) >> 7; in lpphy_get_tx_gains() 854 gains.gm = tmp & 0x0007; in lpphy_get_tx_gains() 855 gains.pga = (tmp & 0x0078) >> 3; in lpphy_get_tx_gains() 856 gains.pad = (tmp & 0x780) >> 7; in lpphy_get_tx_gains() 859 gains.pad = b43_phy_read(dev, B43_PHY_OFDM(0xFB)) & 0xFF; in lpphy_get_tx_gains() 860 gains.gm = tmp & 0xFF; in lpphy_get_tx_gains() 861 gains.pga = (tmp >> 8) & 0xFF; in lpphy_get_tx_gains() 864 return gains; in lpphy_get_tx_gains() 886 struct lpphy_tx_gains gains) in lpphy_set_tx_gains() 885 lpphy_set_tx_gains(struct b43_wldev *dev, struct lpphy_tx_gains gains) lpphy_set_tx_gains() argument 1372 struct lpphy_tx_gains gains; lpphy_set_tx_power_by_index() local 1537 struct lpphy_tx_gains gains; lpphy_tx_pctl_init_sw() local 1839 lpphy_rx_iq_cal(struct b43_wldev *dev, bool noise, bool tx, bool rx, bool pa, struct lpphy_tx_gains *gains) lpphy_rx_iq_cal() argument [all...] |
H A D | phy_n.c | 3163 u16 gains[5][4] = { in b43_nphy_workarounds_rev3plus() local 3236 gain = gains[min_t(u16, pdet_range, 4)]; in b43_nphy_workarounds_rev3plus() 4248 /* TODO: Enable this once we have gains configured */ in b43_nphy_tx_gain_table_upload() 5908 /* TODO: Enable this once we get gains working */ in b43_nphy_op_recalc_txpower() 5910 /* Some extra gains */ in b43_nphy_op_recalc_txpower()
|
/kernel/linux/linux-6.6/drivers/net/wireless/broadcom/b43/ |
H A D | phy_lp.c | 847 struct lpphy_tx_gains gains; in lpphy_get_tx_gains() local 850 gains.dac = (b43_phy_read(dev, B43_LPPHY_AFE_DAC_CTL) & 0x380) >> 7; in lpphy_get_tx_gains() 854 gains.gm = tmp & 0x0007; in lpphy_get_tx_gains() 855 gains.pga = (tmp & 0x0078) >> 3; in lpphy_get_tx_gains() 856 gains.pad = (tmp & 0x780) >> 7; in lpphy_get_tx_gains() 859 gains.pad = b43_phy_read(dev, B43_PHY_OFDM(0xFB)) & 0xFF; in lpphy_get_tx_gains() 860 gains.gm = tmp & 0xFF; in lpphy_get_tx_gains() 861 gains.pga = (tmp >> 8) & 0xFF; in lpphy_get_tx_gains() 864 return gains; in lpphy_get_tx_gains() 886 struct lpphy_tx_gains gains) in lpphy_set_tx_gains() 885 lpphy_set_tx_gains(struct b43_wldev *dev, struct lpphy_tx_gains gains) lpphy_set_tx_gains() argument 1372 struct lpphy_tx_gains gains; lpphy_set_tx_power_by_index() local 1537 struct lpphy_tx_gains gains; lpphy_tx_pctl_init_sw() local 1839 lpphy_rx_iq_cal(struct b43_wldev *dev, bool noise, bool tx, bool rx, bool pa, struct lpphy_tx_gains *gains) lpphy_rx_iq_cal() argument [all...] |
/kernel/linux/linux-5.10/drivers/media/i2c/ |
H A D | mt9t001.c | 129 struct v4l2_ctrl *gains[4]; member 527 static const u8 gains[4] = { in mt9t001_s_ctrl() local 550 struct v4l2_ctrl *gain = mt9t001->gains[i]; in mt9t001_s_ctrl() 564 struct v4l2_ctrl *gain = mt9t001->gains[i]; in mt9t001_s_ctrl() 570 ret = mt9t001_write(client, gains[i], value); in mt9t001_s_ctrl() 914 mt9t001->gains[i] = v4l2_ctrl_new_custom(&mt9t001->ctrls, in mt9t001_probe() 917 v4l2_ctrl_cluster(ARRAY_SIZE(mt9t001_gains), mt9t001->gains); in mt9t001_probe()
|
/kernel/linux/linux-6.6/drivers/iio/ |
H A D | industrialio-gts-helper.c | 168 static int gain_to_scaletables(struct iio_gts *gts, int **gains, int **scales) in gain_to_scaletables() argument 179 sort(gains[i], gts->num_hwgain, sizeof(int), iio_gts_gain_cmp, in gain_to_scaletables() 182 /* Convert gains to scales */ in gain_to_scaletables() 184 ret = iio_gts_total_gain_to_scale(gts, gains[i][j], in gain_to_scaletables() 198 * We assume all the gains for same integration time were unique. in gain_to_scaletables() 202 * to have the smallest total gains. in gain_to_scaletables() 205 memcpy(all_gains, gains[time_idx], gain_bytes); in gain_to_scaletables() 210 int candidate = gains[time_idx][j]; in gain_to_scaletables() 269 * supported gains and times can provide. 429 * of supported gains an [all...] |
/kernel/linux/linux-5.10/sound/pci/au88x0/ |
H A D | au88x0_xtalk.h | 37 xtalk_gains_t const gains);
|
H A D | au88x0_eq.c | 545 vortex_Eqlzr_GetAllBands(vortex_t * vortex, u16 * gains, s32 *cnt) 554 if (vortex_Eqlzr_GetLeftGain(vortex, si, &gains[si])) 557 (vortex, si, &gains[si + eq->this10])) 577 vortex_Eqlzr_SetAllBands(vortex_t *vortex, const u16 gains[], s32 count) in vortex_Eqlzr_SetAllBands() argument 586 eq->this130[i] = gains[i]; in vortex_Eqlzr_SetAllBands() 690 eq->this28 = 0x1; /* if 1 => Allow read access to this130 (gains) */ in vortex_Eqlzr_init() 691 eq->this54 = 0x0; /* if 1 => Dont Allow access to hardware (gains) */ in vortex_Eqlzr_init() 695 /* Set gains. */ in vortex_Eqlzr_init()
|
H A D | au88x0_xtalk.c | 530 vortex_XtalkHw_SetGains(vortex_t * vortex, xtalk_gains_t const gains) in vortex_XtalkHw_SetGains() argument 535 hwwrite(vortex->mmio, 0x244D0 + (i * 4), gains[i]); in vortex_XtalkHw_SetGains() 546 static void vortex_XtalkHw_GetGains(vortex_t * vortex, xtalk_gains_t gains) 551 gains[i] = hwread(vortex->mmio, 0x244D0 + i * 4);
|
/kernel/linux/linux-6.6/sound/pci/au88x0/ |
H A D | au88x0_xtalk.h | 37 xtalk_gains_t const gains);
|
H A D | au88x0_eq.c | 545 vortex_Eqlzr_GetAllBands(vortex_t * vortex, u16 * gains, s32 *cnt) 554 if (vortex_Eqlzr_GetLeftGain(vortex, si, &gains[si])) 557 (vortex, si, &gains[si + eq->this10])) 577 vortex_Eqlzr_SetAllBands(vortex_t *vortex, const u16 gains[], s32 count) in vortex_Eqlzr_SetAllBands() argument 586 eq->this130[i] = gains[i]; in vortex_Eqlzr_SetAllBands() 690 eq->this28 = 0x1; /* if 1 => Allow read access to this130 (gains) */ in vortex_Eqlzr_init() 691 eq->this54 = 0x0; /* if 1 => Dont Allow access to hardware (gains) */ in vortex_Eqlzr_init() 695 /* Set gains. */ in vortex_Eqlzr_init()
|
H A D | au88x0_xtalk.c | 530 vortex_XtalkHw_SetGains(vortex_t * vortex, xtalk_gains_t const gains) in vortex_XtalkHw_SetGains() argument 535 hwwrite(vortex->mmio, 0x244D0 + (i * 4), gains[i]); in vortex_XtalkHw_SetGains() 546 static void vortex_XtalkHw_GetGains(vortex_t * vortex, xtalk_gains_t gains) 551 gains[i] = hwread(vortex->mmio, 0x244D0 + i * 4);
|
/kernel/linux/linux-5.10/drivers/staging/vc04_services/bcm2835-camera/ |
H A D | controls.c | 489 struct mmal_parameter_awbgains gains; in ctrl_set_awb_gains() local 498 gains.r_gain.num = dev->red_gain; in ctrl_set_awb_gains() 499 gains.b_gain.num = dev->blue_gain; in ctrl_set_awb_gains() 500 gains.r_gain.den = gains.b_gain.den = 1000; in ctrl_set_awb_gains() 504 &gains, sizeof(gains)); in ctrl_set_awb_gains()
|
/kernel/linux/linux-6.6/drivers/staging/vc04_services/bcm2835-camera/ |
H A D | controls.c | 483 struct mmal_parameter_awbgains gains; in ctrl_set_awb_gains() local 492 gains.r_gain.numerator = dev->red_gain; in ctrl_set_awb_gains() 493 gains.r_gain.denominator = 1000; in ctrl_set_awb_gains() 494 gains.b_gain.numerator = dev->blue_gain; in ctrl_set_awb_gains() 495 gains.b_gain.denominator = 1000; in ctrl_set_awb_gains() 499 &gains, sizeof(gains)); in ctrl_set_awb_gains()
|
/kernel/linux/linux-5.10/sound/soc/codecs/ |
H A D | madera.c | 3603 const struct madera_fll_gains *gains, in madera_find_fll_gain() 3609 if (gains[i].min <= fref && fref <= gains[i].max) { in madera_find_fll_gain() 3610 cfg->gain = gains[i].gain; in madera_find_fll_gain() 3611 cfg->alt_gain = gains[i].alt_gain; in madera_find_fll_gain() 3626 const struct madera_fll_gains *gains; in madera_calc_fll() local 3669 /* Rev A0 uses the sync gains for both loops */ in madera_calc_fll() 3670 gains = madera_fll_sync_gains; in madera_calc_fll() 3675 gains = madera_fll_sync_gains; in madera_calc_fll() 3678 gains in madera_calc_fll() 3600 madera_find_fll_gain(struct madera_fll *fll, struct madera_fll_cfg *cfg, unsigned int fref, const struct madera_fll_gains *gains, int n_gains) madera_find_fll_gain() argument 4426 unsigned int gains, val, num; madera_fllhj_apply() local [all...] |
/kernel/linux/linux-6.6/sound/soc/codecs/ |
H A D | madera.c | 3603 const struct madera_fll_gains *gains, in madera_find_fll_gain() 3609 if (gains[i].min <= fref && fref <= gains[i].max) { in madera_find_fll_gain() 3610 cfg->gain = gains[i].gain; in madera_find_fll_gain() 3611 cfg->alt_gain = gains[i].alt_gain; in madera_find_fll_gain() 3626 const struct madera_fll_gains *gains; in madera_calc_fll() local 3669 /* Rev A0 uses the sync gains for both loops */ in madera_calc_fll() 3670 gains = madera_fll_sync_gains; in madera_calc_fll() 3675 gains = madera_fll_sync_gains; in madera_calc_fll() 3678 gains in madera_calc_fll() 3600 madera_find_fll_gain(struct madera_fll *fll, struct madera_fll_cfg *cfg, unsigned int fref, const struct madera_fll_gains *gains, int n_gains) madera_find_fll_gain() argument 4426 unsigned int gains, val, num; madera_fllhj_apply() local [all...] |
/kernel/linux/linux-5.10/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/ |
H A D | phy_lcn.c | 996 wlc_lcnphy_get_tx_gain(struct brcms_phy *pi, struct lcnphy_txgains *gains) in wlc_lcnphy_get_tx_gain() argument 1001 gains->dac_gain = (dac_gain & 0x380) >> 7; in wlc_lcnphy_get_tx_gain() 1006 gains->gm_gain = rfgain0 & 0xff; in wlc_lcnphy_get_tx_gain() 1007 gains->pga_gain = (rfgain0 >> 8) & 0xff; in wlc_lcnphy_get_tx_gain() 1008 gains->pad_gain = rfgain1 & 0xff; in wlc_lcnphy_get_tx_gain() 3136 struct lcnphy_txgains gains; in wlc_lcnphy_set_tx_pwr_by_index() local 3157 gains.gm_gain = (u16) (txgain & 0xff); in wlc_lcnphy_set_tx_pwr_by_index() 3158 gains.pga_gain = (u16) (txgain >> 8) & 0xff; in wlc_lcnphy_set_tx_pwr_by_index() 3159 gains.pad_gain = (u16) (txgain >> 16) & 0xff; in wlc_lcnphy_set_tx_pwr_by_index() 3160 gains in wlc_lcnphy_set_tx_pwr_by_index() [all...] |
/kernel/linux/linux-6.6/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/ |
H A D | phy_lcn.c | 996 wlc_lcnphy_get_tx_gain(struct brcms_phy *pi, struct lcnphy_txgains *gains) in wlc_lcnphy_get_tx_gain() argument 1001 gains->dac_gain = (dac_gain & 0x380) >> 7; in wlc_lcnphy_get_tx_gain() 1006 gains->gm_gain = rfgain0 & 0xff; in wlc_lcnphy_get_tx_gain() 1007 gains->pga_gain = (rfgain0 >> 8) & 0xff; in wlc_lcnphy_get_tx_gain() 1008 gains->pad_gain = rfgain1 & 0xff; in wlc_lcnphy_get_tx_gain() 3136 struct lcnphy_txgains gains; in wlc_lcnphy_set_tx_pwr_by_index() local 3157 gains.gm_gain = (u16) (txgain & 0xff); in wlc_lcnphy_set_tx_pwr_by_index() 3158 gains.pga_gain = (u16) (txgain >> 8) & 0xff; in wlc_lcnphy_set_tx_pwr_by_index() 3159 gains.pad_gain = (u16) (txgain >> 16) & 0xff; in wlc_lcnphy_set_tx_pwr_by_index() 3160 gains in wlc_lcnphy_set_tx_pwr_by_index() [all...] |
/kernel/linux/linux-5.10/sound/soc/intel/atom/ |
H A D | sst-atom-controls.c | 1318 * sst_send_pipe_gains - send gains for the front-end DAIs 1323 * The gains in the pipes connected to the front-ends are muted/unmuted 1325 * gains for the front-end pipes. 1347 dev_dbg(dai->dev, "send gains for widget=%s\n", in sst_send_pipe_gains() 1378 * sst_fill_module_list - populate the list of modules/gains for a pipe 1426 * sst_fill_widget_module_info - fill list of gains/algos for the pipe 1430 * Fill the list of gains/algos for the widget by looking at all the card 1506 * sst_map_modules_to_pipe - fill algo/gains list for all pipes 1541 unsigned int gains = ARRAY_SIZE(sst_gain_controls)/3; in sst_dsp_init_v2_dpcm() local 1554 for (i = 0; i < gains; in sst_dsp_init_v2_dpcm() [all...] |
/kernel/linux/linux-6.6/sound/soc/intel/atom/ |
H A D | sst-atom-controls.c | 1318 * sst_send_pipe_gains - send gains for the front-end DAIs 1323 * The gains in the pipes connected to the front-ends are muted/unmuted 1325 * gains for the front-end pipes. 1345 dev_dbg(dai->dev, "send gains for widget=%s\n", in sst_send_pipe_gains() 1373 * sst_fill_module_list - populate the list of modules/gains for a pipe 1421 * sst_fill_widget_module_info - fill list of gains/algos for the pipe 1425 * Fill the list of gains/algos for the widget by looking at all the card 1501 * sst_map_modules_to_pipe - fill algo/gains list for all pipes 1536 unsigned int gains = ARRAY_SIZE(sst_gain_controls)/3; in sst_dsp_init_v2_dpcm() local 1549 for (i = 0; i < gains; in sst_dsp_init_v2_dpcm() [all...] |