Home
last modified time | relevance | path

Searched refs:strength (Results 1 – 25 of 186) sorted by relevance

12345678

/drivers/mtd/nand/raw/atmel/
Dpmecc.c290 if (req->ecc.strength != ATMEL_PMECC_MAXIMIZE_ECC_STRENGTH) in atmel_pmecc_prepare_user_req()
310 int nbytes, strength = pmecc->caps->strengths[i]; in atmel_pmecc_prepare_user_req() local
312 if (req->ecc.strength != ATMEL_PMECC_MAXIMIZE_ECC_STRENGTH && in atmel_pmecc_prepare_user_req()
313 strength < req->ecc.strength) in atmel_pmecc_prepare_user_req()
316 nbytes = DIV_ROUND_UP(strength * fls(8 * req->ecc.sectorsize), in atmel_pmecc_prepare_user_req()
323 eccstrength = strength; in atmel_pmecc_prepare_user_req()
326 if (req->ecc.strength != ATMEL_PMECC_MAXIMIZE_ECC_STRENGTH) in atmel_pmecc_prepare_user_req()
334 req->ecc.strength = eccstrength; in atmel_pmecc_prepare_user_req()
348 int strength, size, ret; in atmel_pmecc_create_user() local
357 size += ((2 * req->ecc.strength) + 1) * sizeof(u16) * in atmel_pmecc_create_user()
[all …]
/drivers/mtd/nand/raw/
Dnand_samsung.c77 requirements.strength = 1 << extid; in samsung_nand_decode_id()
82 requirements.strength = 24; in samsung_nand_decode_id()
85 requirements.strength = 40; in samsung_nand_decode_id()
88 requirements.strength = 60; in samsung_nand_decode_id()
103 requirements.strength = 1; in samsung_nand_decode_id()
Dnand_hynix.c509 requirements.strength = 0; in hynix_nand_extract_ecc_requirements()
512 requirements.strength = 4; in hynix_nand_extract_ecc_requirements()
515 requirements.strength = 24; in hynix_nand_extract_ecc_requirements()
518 requirements.strength = 32; in hynix_nand_extract_ecc_requirements()
521 requirements.strength = 40; in hynix_nand_extract_ecc_requirements()
524 requirements.strength = 50; in hynix_nand_extract_ecc_requirements()
527 requirements.strength = 60; in hynix_nand_extract_ecc_requirements()
549 requirements.strength = 1 << ecc_level; in hynix_nand_extract_ecc_requirements()
555 requirements.strength = 24; in hynix_nand_extract_ecc_requirements()
569 requirements.strength = 0; in hynix_nand_extract_ecc_requirements()
[all …]
Dnand_micron.c265 if (WARN_ON(nbitflips > chip->ecc.strength)) in micron_nand_on_die_ecc_status_4()
355 if (chip->ecc.strength == 4) in micron_nand_read_page_on_die_ecc()
430 if (requirements->strength != 4 && requirements->strength != 8) in micron_supports_on_die_ecc()
471 if (requirements->strength != 4 && requirements->strength != 8) in micron_supports_on_die_ecc()
531 if (requirements->strength == 4) { in micron_nand_init()
541 if (requirements->strength == 4) in micron_nand_init()
548 chip->ecc.bytes = requirements->strength * 2; in micron_nand_init()
550 chip->ecc.strength = requirements->strength; in micron_nand_init()
Dtegra_nand.c207 int bytes_per_step = DIV_ROUND_UP(BITS_PER_STEP_RS * chip->ecc.strength, in tegra_nand_ooblayout_rs_ecc()
234 int bytes_per_step = DIV_ROUND_UP(BITS_PER_STEP_BCH * chip->ecc.strength, in tegra_nand_ooblayout_bch_ecc()
734 chip->ecc.strength); in tegra_nand_read_page_hwecc()
842 static int tegra_nand_get_strength(struct nand_chip *chip, const int *strength, in tegra_nand_get_strength() argument
860 strength_sel = strength[strength_len - i - 1]; in tegra_nand_get_strength()
862 strength_sel = strength[i]; in tegra_nand_get_strength()
864 if (strength_sel < requirements->strength) in tegra_nand_get_strength()
882 const int *strength; in tegra_nand_select_strength() local
889 strength = rs_strength_bootable; in tegra_nand_select_strength()
892 strength = rs_strength; in tegra_nand_select_strength()
[all …]
Dnand_esmt.c23 requirements.strength = 4; in esmt_nand_decode_id()
26 requirements.strength = 2; in esmt_nand_decode_id()
29 requirements.strength = 1; in esmt_nand_decode_id()
Dhisi504_nand.c534 switch (chip->ecc.strength) { in hisi_nand_read_page_hwecc()
639 int size, strength, ecc_bits; in hisi_nfc_ecc_probe() local
645 strength = chip->ecc.strength; in hisi_nfc_ecc_probe()
651 if ((size == 1024) && ((strength != 8) && (strength != 16) && in hisi_nfc_ecc_probe()
652 (strength != 24) && (strength != 40))) { in hisi_nfc_ecc_probe()
658 chip->ecc.strength = strength; in hisi_nfc_ecc_probe()
664 switch (chip->ecc.strength) { in hisi_nfc_ecc_probe()
675 dev_err(dev, "not support strength: %d\n", chip->ecc.strength); in hisi_nfc_ecc_probe()
Drockchip-nand-controller.c238 static int rk_nfc_hw_ecc_setup(struct nand_chip *chip, u32 strength) in rk_nfc_hw_ecc_setup() argument
244 if (strength == nfc->cfg->ecc_strengths[i]) { in rk_nfc_hw_ecc_setup()
256 nfc->cur_ecc = strength; in rk_nfc_hw_ecc_setup()
299 if (nfc->cur_ecc != ecc->strength) in rk_nfc_select_chip()
300 rk_nfc_hw_ecc_setup(chip, ecc->strength); in rk_nfc_select_chip()
518 rknand->boot_ecc != ecc->strength) { in rk_nfc_write_page_raw()
639 if (rknand->boot_ecc != ecc->strength) in rk_nfc_write_page_hwecc()
684 if (boot_rom_mode && rknand->boot_ecc != ecc->strength) in rk_nfc_write_page_hwecc()
685 rk_nfc_hw_ecc_setup(chip, ecc->strength); in rk_nfc_write_page_hwecc()
712 rknand->boot_ecc != ecc->strength) { in rk_nfc_read_page_raw()
[all …]
Darasan-nand-controller.c180 u32 strength; member
411 ADDR2_STRENGTH(anand->strength) | in anfc_read_page_hw_ecc()
485 chip->ecc.strength); in anfc_read_page_hw_ecc()
529 ADDR2_STRENGTH(anand->strength) | in anfc_write_page_hw_ecc()
1064 static int anfc_calc_hw_ecc_bytes(int step_size, int strength) in anfc_calc_hw_ecc_bytes() argument
1079 ecc_bits = bch_gf_mag * strength; in anfc_calc_hw_ecc_bytes()
1132 switch (ecc->strength) { in anfc_init_hw_ecc_controller()
1134 anand->strength = 0x1; in anfc_init_hw_ecc_controller()
1137 anand->strength = 0x2; in anfc_init_hw_ecc_controller()
1140 anand->strength = 0x3; in anfc_init_hw_ecc_controller()
[all …]
/drivers/media/dvb-frontends/
Dcxd2820r_c.c177 unsigned int strength; in cxd2820r_read_status_c() local
186 strength = utmp << 6 | utmp >> 4; in cxd2820r_read_status_c()
188 c->strength.len = 1; in cxd2820r_read_status_c()
189 c->strength.stat[0].scale = FE_SCALE_RELATIVE; in cxd2820r_read_status_c()
190 c->strength.stat[0].uvalue = strength; in cxd2820r_read_status_c()
192 c->strength.len = 1; in cxd2820r_read_status_c()
193 c->strength.stat[0].scale = FE_SCALE_NOT_AVAILABLE; in cxd2820r_read_status_c()
Dts2020.c143 c->strength.len = 1; in ts2020_init()
144 c->strength.stat[0].scale = FE_SCALE_DECIBEL; in ts2020_init()
145 c->strength.stat[0].uvalue = 0; in ts2020_init()
437 ret = ts2020_get_tuner_gain(priv->fe, &c->strength.stat[0].svalue); in ts2020_stat_work()
441 c->strength.stat[0].scale = FE_SCALE_DECIBEL; in ts2020_stat_work()
458 unsigned strength; in ts2020_read_signal_strength() local
464 if (c->strength.stat[0].scale == FE_SCALE_NOT_AVAILABLE) { in ts2020_read_signal_strength()
469 gain = c->strength.stat[0].svalue; in ts2020_read_signal_strength()
474 strength = 0; in ts2020_read_signal_strength()
477 strength = 0 + div64_s64((85000 + gain) * 3, 1000); in ts2020_read_signal_strength()
[all …]
Dcxd2820r_t.c282 unsigned int strength; in cxd2820r_read_status_t() local
291 strength = utmp << 4 | utmp >> 8; in cxd2820r_read_status_t()
293 c->strength.len = 1; in cxd2820r_read_status_t()
294 c->strength.stat[0].scale = FE_SCALE_RELATIVE; in cxd2820r_read_status_t()
295 c->strength.stat[0].uvalue = strength; in cxd2820r_read_status_t()
297 c->strength.len = 1; in cxd2820r_read_status_t()
298 c->strength.stat[0].scale = FE_SCALE_NOT_AVAILABLE; in cxd2820r_read_status_t()
Dcxd2820r_t2.c307 unsigned int strength; in cxd2820r_read_status_t2() local
316 strength = utmp << 4 | utmp >> 8; in cxd2820r_read_status_t2()
318 c->strength.len = 1; in cxd2820r_read_status_t2()
319 c->strength.stat[0].scale = FE_SCALE_RELATIVE; in cxd2820r_read_status_t2()
320 c->strength.stat[0].uvalue = strength; in cxd2820r_read_status_t2()
322 c->strength.len = 1; in cxd2820r_read_status_t2()
323 c->strength.stat[0].scale = FE_SCALE_NOT_AVAILABLE; in cxd2820r_read_status_t2()
Drtl2830.c120 c->strength.len = 1; in rtl2830_init()
121 c->strength.stat[0].scale = FE_SCALE_NOT_AVAILABLE; in rtl2830_init()
423 c->strength.stat[0].scale = FE_SCALE_RELATIVE; in rtl2830_read_status()
424 c->strength.stat[0].uvalue = utmp; in rtl2830_read_status()
426 c->strength.stat[0].scale = FE_SCALE_NOT_AVAILABLE; in rtl2830_read_status()
529 static int rtl2830_read_signal_strength(struct dvb_frontend *fe, u16 *strength) in rtl2830_read_signal_strength() argument
533 if (c->strength.stat[0].scale == FE_SCALE_RELATIVE) in rtl2830_read_signal_strength()
534 *strength = c->strength.stat[0].uvalue; in rtl2830_read_signal_strength()
536 *strength = 0; in rtl2830_read_signal_strength()
/drivers/media/test-drivers/vidtv/
Dvidtv_demod.c132 c->strength.len = 1; in vidtv_clean_stats()
133 c->strength.stat[0].scale = FE_SCALE_DECIBEL; in vidtv_clean_stats()
134 c->strength.stat[0].svalue = 0; in vidtv_clean_stats()
190 c->strength.stat[0].svalue = state->tuner_cnr; in vidtv_demod_update_stats()
191 c->strength.stat[0].svalue -= get_random_u32_below(state->tuner_cnr / 50); in vidtv_demod_update_stats()
192 c->strength.stat[0].svalue -= 68000; /* Adjust to a better range */ in vidtv_demod_update_stats()
238 u16 *strength) in vidtv_demod_read_signal_strength() argument
242 *strength = c->strength.stat[0].uvalue; in vidtv_demod_read_signal_strength()
/drivers/pinctrl/bcm/
Dpinctrl-nsp-gpio.c390 u32 strength) in nsp_gpio_set_strength() argument
397 if (strength < 2 || strength > 16 || (strength % 2)) in nsp_gpio_set_strength()
403 strength); in nsp_gpio_set_strength()
405 strength = (strength / 2) - 1; in nsp_gpio_set_strength()
409 val |= ((strength >> (i-1)) & 0x1) << shift; in nsp_gpio_set_strength()
419 u16 *strength) in nsp_gpio_get_strength() argument
430 *strength = 0; in nsp_gpio_get_strength()
434 *strength += (val << i); in nsp_gpio_get_strength()
439 *strength = (*strength + 1) * 2; in nsp_gpio_get_strength()
Dpinctrl-iproc-gpio.c577 unsigned strength) in iproc_gpio_set_strength() argument
585 if (strength < 2 || strength > 16 || (strength % 2)) in iproc_gpio_set_strength()
597 strength); in iproc_gpio_set_strength()
600 strength = (strength / 2) - 1; in iproc_gpio_set_strength()
605 val |= ((strength >> i) & 0x1) << shift; in iproc_gpio_set_strength()
614 u16 *strength) in iproc_gpio_get_strength() argument
630 *strength = 0; in iproc_gpio_get_strength()
635 *strength += (val << i); in iproc_gpio_get_strength()
639 *strength = (*strength + 1) * 2; in iproc_gpio_get_strength()
/drivers/mtd/nand/
Decc-sw-bch.c190 conf->strength = nand->ecc.user_conf.strength; in nand_ecc_sw_bch_init_ctx()
204 conf->strength = 4; in nand_ecc_sw_bch_init_ctx()
215 conf->strength = code_size * 8 / fls(8 * conf->step_size); in nand_ecc_sw_bch_init_ctx()
219 code_size = DIV_ROUND_UP(conf->strength * in nand_ecc_sw_bch_init_ctx()
222 if (!conf->strength) in nand_ecc_sw_bch_init_ctx()
223 conf->strength = (code_size * 8) / fls(8 * conf->step_size); in nand_ecc_sw_bch_init_ctx()
225 if (!code_size && !conf->strength) { in nand_ecc_sw_bch_init_ctx()
Decc.c431 int strength, size; in of_get_nand_ecc_user_config() local
437 strength = of_get_nand_ecc_strength(dn); in of_get_nand_ecc_user_config()
438 if (strength >= 0) in of_get_nand_ecc_user_config()
439 nand->ecc.user_conf.strength = strength; in of_get_nand_ecc_user_config()
482 corr = (mtd->writesize * conf->strength) / conf->step_size; in nand_ecc_is_strong_enough()
483 ds_corr = (mtd->writesize * reqs->strength) / reqs->step_size; in nand_ecc_is_strong_enough()
485 return corr >= ds_corr && conf->strength >= reqs->strength; in nand_ecc_is_strong_enough()
Decc-mxic.c226 int step_size = 0, strength = 0, desired_correction = 0, steps, idx; in mxic_ecc_init_ctx() local
252 if (user->step_size && user->strength) { in mxic_ecc_init_ctx()
254 strength = user->strength; in mxic_ecc_init_ctx()
255 } else if (reqs->step_size && reqs->strength) { in mxic_ecc_init_ctx()
257 strength = reqs->strength; in mxic_ecc_init_ctx()
260 if (step_size && strength) { in mxic_ecc_init_ctx()
262 desired_correction = steps * strength; in mxic_ecc_init_ctx()
274 strength = desired_correction / steps; in mxic_ecc_init_ctx()
277 if (possible_strength[idx] >= strength) in mxic_ecc_init_ctx()
299 conf->strength = possible_strength[idx]; in mxic_ecc_init_ctx()
/drivers/spi/
Dspi-mtk-snfi.c667 int step_size = 0, strength = 0, desired_correction = 0, steps; in mtk_snand_ecc_init_ctx() local
684 if (user->step_size && user->strength) { in mtk_snand_ecc_init_ctx()
686 strength = user->strength; in mtk_snand_ecc_init_ctx()
688 } else if (reqs->step_size && reqs->strength) { in mtk_snand_ecc_init_ctx()
690 strength = reqs->strength; in mtk_snand_ecc_init_ctx()
693 if (step_size && strength) { in mtk_snand_ecc_init_ctx()
695 desired_correction = steps * strength; in mtk_snand_ecc_init_ctx()
696 strength = desired_correction / snf->nfi_cfg.nsectors; in mtk_snand_ecc_init_ctx()
706 ecc_cfg->strength = max_ecc_bytes * 8 / parity_bits; in mtk_snand_ecc_init_ctx()
707 mtk_ecc_adjust_strength(snf->ecc, &ecc_cfg->strength); in mtk_snand_ecc_init_ctx()
[all …]
/drivers/media/tuners/
Dfc0012.c339 static int fc0012_get_rf_strength(struct dvb_frontend *fe, u16 *strength) in fc0012_get_rf_strength() argument
384 *strength = 255; /* 100% */ in fc0012_get_rf_strength()
386 *strength = 0; in fc0012_get_rf_strength()
388 *strength = (power + 95) * 255 / 140; in fc0012_get_rf_strength()
390 *strength |= *strength << 8; in fc0012_get_rf_strength()
Dsi2157.c314 c->strength.len = 1; in si2157_init()
315 c->strength.stat[0].scale = FE_SCALE_NOT_AVAILABLE; in si2157_init()
802 int strength; in si2157_get_rf_strength() local
813 c->strength.stat[0].scale = FE_SCALE_DECIBEL; in si2157_get_rf_strength()
814 c->strength.stat[0].svalue = (s8)cmd.args[3] * 1000; in si2157_get_rf_strength()
819 strength = (s8)cmd.args[3] + 100; in si2157_get_rf_strength()
820 strength = clamp_val(strength, 0, 80); in si2157_get_rf_strength()
821 *rssi = (u16)(strength * 0xffff / 80); in si2157_get_rf_strength()
868 c->strength.stat[0].scale = FE_SCALE_DECIBEL; in si2157_stat_work()
869 c->strength.stat[0].svalue = (s8) cmd.args[3] * 1000; in si2157_stat_work()
[all …]
/drivers/input/misc/
Dsc27xx-vibra.c34 u32 strength; member
89 if (info->strength && !info->enabled) in sc27xx_vibra_play_work()
91 else if (info->strength == 0 && info->enabled) in sc27xx_vibra_play_work()
100 info->strength = effect->u.rumble.weak_magnitude; in sc27xx_vibra_play()
/drivers/staging/media/atomisp/pci/isp/kernels/xnr/xnr_3.0/
Dia_css_xnr3.host.c117 compute_blending(int strength) in compute_blending() argument
129 isp_strength = -(((strength * isp_scale) + offset) / host_scale); in compute_blending()
163 s32 blending = compute_blending(from->blending.strength); in ia_css_xnr3_encode()
182 to->blending.strength = blending; in ia_css_xnr3_encode()

12345678