Home
last modified time | relevance | path

Searched +full:n +full:- +full:factor (Results 1 – 25 of 510) sorted by relevance

12345678910>>...21

/linux/drivers/iio/afe/
H A Diio-rescale.c1 // SPDX-License-Identifier: GPL-2.0
33 *val *= rescale->numerator; in rescale_process_scale()
34 if (rescale->denominator == 1) in rescale_process_scale()
36 *val2 = rescale->denominator; in rescale_process_scale()
44 if (!check_mul_overflow(*val, rescale->numerator, &_val) && in rescale_process_scale()
45 !check_mul_overflow(*val2, rescale->denominator, &_val2)) { in rescale_process_scale()
53 tmp = div_s64(tmp, rescale->denominator); in rescale_process_scale()
54 tmp *= rescale->numerator; in rescale_process_scale()
82 * *val = 1 and *val2 = -0.5 yields -1.5 not -0.5. in rescale_process_scale()
86 tmp = (s64)abs(*val) * abs(rescale->numerator); in rescale_process_scale()
[all …]
/linux/drivers/clk/mmp/
H A Dclk-frac.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * mmp factor clock operation source file
9 #include <linux/clk-provider.h>
16 * It is M/N clock
19 * numerator/denominator = Fin / (Fout * factor)
27 struct mmp_clk_factor *factor = to_clk_factor(hw); in clk_factor_determine_rate() local
32 for (i = 0; i < factor->ftbl_cnt; i++) { in clk_factor_determine_rate()
33 d = &factor->ftbl[i]; in clk_factor_determine_rate()
36 rate = (u64)(req->best_parent_rate) * d->denominator; in clk_factor_determine_rate()
37 do_div(rate, d->numerator * factor->masks->factor); in clk_factor_determine_rate()
[all …]
/linux/drivers/crypto/caam/
H A Dcaampkc.h1 /* SPDX-License-Identifier: GPL-2.0 */
3 * caam - Freescale FSL CAAM support for Public Key Cryptography descriptors
17 * caam_priv_key_form - CAAM RSA private key representation
20 * 1. The first representation consists of the pair (n, d), where the
22 * n the RSA modulus
27 * p the first prime factor of the RSA modulus n
28 * q the second prime factor of the RSA modulus n
33 * p the first prime factor of the RSA modulus n
34 * q the second prime factor of the RSA modulus n
49 * caam_rsa_key - CAAM RSA key structure. Keys are allocated in DMA zone.
[all …]
/linux/drivers/media/platform/allegro-dvt/
H A Dnal-hevc.h1 /* SPDX-License-Identifier: GPL-2.0 */
14 #include <linux/v4l2-controls.h>
60 * struct nal_hevc_vps - Video parameter set
63 * Rec. ITU-T H.265 (02/2018) 7.3.2.1 Video parameter set RBSP syntax
136 * struct nal_hevc_vui_parameters - VUI parameters
138 * C struct representation of the VUI parameters as defined by Rec. ITU-T
199 * struct nal_hevc_sps - Sequence parameter set
202 * Rec. ITU-T H.265 (02/2018) 7.3.2.2 Sequence parameter set RBSP syntax
325 * nal_hevc_profile() - Get profile_idc for v4l2 hevc profile
329 * in Rec. ITU-T H.265 (02/2018) A.3.
[all …]
/linux/drivers/clk/actions/
H A Dowl-factor.c1 // SPDX-License-Identifier: GPL-2.0+
3 // OWL factor clock driver
6 // Author: David Liu <liuwei@actions-semi.com>
11 #include <linux/clk-provider.h>
14 #include "owl-factor.h"
21 for (clkt = table; clkt->div; clkt++) in _get_table_maxval()
22 if (clkt->val > maxval) in _get_table_maxval()
23 maxval = clkt->val; in _get_table_maxval()
32 for (clkt = table; clkt->div; clkt++) { in _get_table_div_mul()
33 if (clkt->val == val) { in _get_table_div_mul()
[all …]
/linux/tools/testing/selftests/syscall_user_dispatch/
H A Dsud_benchmark.c1 // SPDX-License-Identifier: GPL-2.0-only
37 * requires some per-architecture support (i.e. knowledge about the
39 * a small trampoline is open-coded for x86_64. Other architectures
65 int factor; variable
77 return (t2.tv_sec - t1.tv_sec) + 1.0e-9 * (t2.tv_nsec - t1.tv_nsec); in one_sysinfo_step()
84 printf("Calibrating test set to last ~%d seconds...\n", CALIBRATE_TO_SECS); in calibrate_set()
88 factor += CALIBRATE_TO_SECS; in calibrate_set()
91 printf("test iterations = %d\n", CALIBRATION_STEP * factor); in calibrate_set()
99 for (i = 0; i < factor; ++i) in perf_syscall()
100 partial += one_sysinfo_step()/(CALIBRATION_STEP*factor); in perf_syscall()
[all …]
/linux/drivers/media/platform/ti/vpe/
H A Dsc.c1 // SPDX-License-Identifier: GPL-2.0-only
23 struct device *dev = &sc->pdev->dev; in sc_dump_regs()
25 #define DUMPREG(r) dev_dbg(dev, "%-35s %08x\n", #r, \ in sc_dump_regs()
26 ioread32(sc->base + CFG_##r)) in sc_dump_regs()
28 dev_dbg(dev, "SC Registers @ %pa:\n", &sc->res->start); in sc_dump_regs()
84 idx = HS_LT_9_16_SCALE + sixteenths - 8; in sc_set_hs_coeffs()
99 coeff_h += SC_NUM_TAPS_MEM_ALIGN - SC_H_NUM_TAPS; in sc_set_hs_coeffs()
102 sc->load_coeff_h = true; in sc_set_hs_coeffs()
127 idx = VS_LT_9_16_SCALE + sixteenths - 8; in sc_set_vs_coeffs()
140 coeff_v += SC_NUM_TAPS_MEM_ALIGN - SC_V_NUM_TAPS; in sc_set_vs_coeffs()
[all …]
/linux/drivers/clk/ti/
H A Dfixed-factor.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * TI Fixed Factor Clock
7 * Tero Kristo <t-kristo@ti.com>
10 #include <linux/clk-provider.h>
23 * of_ti_fixed_factor_clk_setup - Setup function for TI fixed factor clock
26 * Sets up a simple fixed factor clock based on device tree info.
36 if (of_property_read_u32(node, "ti,clock-div", &div)) { in of_ti_fixed_factor_clk_setup()
37 pr_err("%pOFn must have a clock-div property\n", node); in of_ti_fixed_factor_clk_setup()
41 if (of_property_read_u32(node, "ti,clock-mult", &mult)) { in of_ti_fixed_factor_clk_setup()
42 pr_err("%pOFn must have a clock-mult property\n", node); in of_ti_fixed_factor_clk_setup()
[all …]
/linux/drivers/clk/sunxi/
H A Dclk-factors.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Adjustable factor-based clock implementation
8 #include <linux/clk-provider.h>
16 #include "clk-factors.h"
19 * DOC: basic adjustable factor-based clock
22 * prepare - clk_prepare only ensures that parents are prepared
23 * enable - clk_enable only ensures that parents are enabled
24 * rate - rate is adjustable.
25 * clk->rate = (parent->rate * N * (K + 1) >> P) / (M + 1)
26 * parent - fixed parent. No clk_set_parent support
[all …]
H A Dclk-sunxi.c1 // SPDX-License-Identifier: GPL-2.0-or-later
9 #include <linux/clk-provider.h>
14 #include <linux/reset-controller.h>
19 #include "clk-factors.h"
27 * sun4i_get_pll1_factors() - calculates n, k, m, p factors for PLL1
29 * rate = (parent_rate * n * (k + 1) >> p) / (m + 1);
38 div = req->rate / 6000000; in sun4i_get_pll1_factors()
39 req->rate = 6000000 * div; in sun4i_get_pll1_factors()
42 req->m = 0; in sun4i_get_pll1_factors()
45 if (req->rate >= 768000000 || req->rate == 42000000 || in sun4i_get_pll1_factors()
[all …]
/linux/drivers/gpu/drm/sprd/
H A Dmegacores_pll.c1 // SPDX-License-Identifier: GPL-2.0
22 #define AVERAGE(a, b) (min(a, b) + abs((b) - (a)) / 2)
34 const unsigned long long factor = 100; in dphy_calc_pll_param() local
38 pll->potential_fvco = pll->freq / khz; in dphy_calc_pll_param()
39 pll->ref_clk = PHY_REF_CLK / khz; in dphy_calc_pll_param()
42 if (pll->potential_fvco >= VCO_BAND_LOW && in dphy_calc_pll_param()
43 pll->potential_fvco <= VCO_BAND_HIGH) { in dphy_calc_pll_param()
44 pll->fvco = pll->potential_fvco; in dphy_calc_pll_param()
45 pll->out_sel = BIT(i); in dphy_calc_pll_param()
48 pll->potential_fvco <<= 1; in dphy_calc_pll_param()
[all …]
/linux/tools/testing/selftests/kvm/x86/
H A Dnested_tsc_scaling_test.c1 // SPDX-License-Identifier: GPL-2.0-only
19 /* L2 is scaled up (from L1's perspective) by this factor */
22 #define TSC_OFFSET_L2 ((u64)-33125236320908)
43 thresh_low = expected - tolerance; in compare_tsc_freq()
70 tsc_freq = tsc_end - tsc_start; in check_tsc_freq()
97 run_guest(svm->vmcb, svm->vmcb_gpa); in l1_svm_code()
98 GUEST_ASSERT(svm->vmcb->control.exit_code == SVM_EXIT_VMMCALL); in l1_svm_code()
170 * We set L1's scale factor to be a random number from 2 to 10. in main()
171 * Ideally we would do the same for L2's factor but that one is in main()
177 printf("L1's scale down factor is: %"PRIu64"\n", l1_scale_factor); in main()
[all …]
/linux/Documentation/devicetree/bindings/hwmon/
H A Dti,tmp421.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Guenter Roeck <linux@roeck-us.net>
19 - ti,tmp421
20 - ti,tmp422
21 - ti,tmp423
22 - ti,tmp441
23 - ti,tmp442
27 '#address-cells':
[all …]
H A Dti,tmp464.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Guenter Roeck <linux@roeck-us.net>
20 - ti,tmp464
21 - ti,tmp468
26 '#address-cells':
29 '#size-cells':
33 - compatible
34 - reg
[all …]
H A Dti,tmp401.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Guenter Roeck <linux@roeck-us.net>
24 - ti,tmp401
25 - ti,tmp411
26 - ti,tmp431
27 - ti,tmp432
28 - ti,tmp435
33 ti,extended-range-enable:
[all …]
/linux/drivers/clocksource/
H A Dtimer-cadence-ttc.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2011-2013 Xilinx
23 * This driver configures the 2 16/32-bit count-up timers as follows:
30 * common to all the timer channels (T1, T2, and T3). With a pre-scaler of 32,
34 * obtained from device tree. The pre-scaler of 32 is used.
55 * Setup the timers to use pre-scaling, using a fixed value for now that will
60 #define CLK_CNTRL_PRESCALE ((PRESCALE_EXPONENT - 1) << 1)
67 * struct ttc_timer - This definition defines local timer structure
105 * ttc_set_interval - Set the timer interval value
115 /* Disable the counter, set the counter value and re-enable counter */ in ttc_set_interval()
[all …]
/linux/drivers/thermal/
H A Damlogic_thermal.c1 // SPDX-License-Identifier: GPL-2.0+
10 * U = ---------, uptat = ---------
11 * 2^16 1 + n * U
13 * Temperature = A * ( uptat + u_efuse / 2^16 )- B
15 * A B m n : calibration parameters
71 * @n: calibration parameters
79 int n; member
113 pdata->data->calibration_parameters; in amlogic_thermal_code_to_millicelsius()
115 s64 factor, uptat, uefuse; in amlogic_thermal_code_to_millicelsius() local
117 uefuse = pdata->trim_info & TSENSOR_TRIM_SIGN_MASK ? in amlogic_thermal_code_to_millicelsius()
[all …]
H A Dthermal_mmio.c1 // SPDX-License-Identifier: GPL-2.0
15 int factor; member
28 t = sensor->read_mmio(sensor->mmio_base) & sensor->mask; in thermal_mmio_get_temperature()
29 t *= sensor->factor; in thermal_mmio_get_temperature()
49 sensor = devm_kzalloc(&pdev->dev, sizeof(*sensor), GFP_KERNEL); in thermal_mmio_probe()
51 return -ENOMEM; in thermal_mmio_probe()
53 sensor->mmio_base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); in thermal_mmio_probe()
54 if (IS_ERR(sensor->mmio_base)) in thermal_mmio_probe()
55 return PTR_ERR(sensor->mmio_base); in thermal_mmio_probe()
57 sensor_init_func = device_get_match_data(&pdev->dev); in thermal_mmio_probe()
[all …]
/linux/drivers/clk/
H A Dclk-fixed-factor.c1 // SPDX-License-Identifier: GPL-2.0
6 #include <linux/clk-provider.h>
16 * prepare - clk_prepare only ensures that parents are prepared
17 * enable - clk_enable only ensures that parents are enabled
18 * rate - rate is fixed. clk->rate = parent->rate / div * mult
19 * parent - fixed parent. No clk_set_parent support
28 rate = (unsigned long long int)parent_rate * fix->mult; in clk_factor_recalc_rate()
29 do_div(rate, fix->div); in clk_factor_recalc_rate()
41 best_parent = (req->rate / fix->mult) * fix->div; in clk_factor_determine_rate()
42 req->best_parent_rate = clk_hw_round_rate(clk_hw_get_parent(hw), best_parent); in clk_factor_determine_rate()
[all …]
/linux/drivers/media/test-drivers/vivid/
H A Dvivid-vid-cap.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * vivid-vid-cap.c - video capture support functions.
14 #include <linux/v4l2-dv-timings.h>
15 #include <media/v4l2-common.h>
16 #include <media/v4l2-event.h>
17 #include <media/v4l2-dv-timings.h>
18 #include <media/v4l2-rect.h>
20 #include "vivid-core.h"
21 #include "vivid-vid-common.h"
22 #include "vivid-kthread-cap.h"
[all …]
/linux/drivers/message/fusion/
H A Dmptspi.c6 * Copyright (c) 1999-2008 LSI Corporation
7 * (mailto:DL-MPTFusionLinux@lsi.com)
10 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
24 LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
43 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
45 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
72 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
99 * mptspi_setTargetNegoParms - Update the target negotiation parameters
111 MPT_ADAPTER *ioc = hd->ioc; in mptspi_setTargetNegoParms()
112 SpiCfgData *pspi_data = &ioc->spi_data; in mptspi_setTargetNegoParms()
[all …]
/linux/drivers/gpu/drm/
H A Ddrm_rect.c2 * Copyright (C) 2011-2013 Intel Corporation
33 * drm_rect_intersect - intersect two rectangles
46 r1->x1 = max(r1->x1, r2->x1); in drm_rect_intersect()
47 r1->y1 = max(r1->y1, r2->y1); in drm_rect_intersect()
48 r1->x2 = min(r1->x2, r2->x2); in drm_rect_intersect()
49 r1->y2 = min(r1->y2, r2->y2); in drm_rect_intersect()
65 tmp = mul_u32_u32(src, dst - *clip); in clip_scaled()
78 * drm_rect_clip_scaled - perform a scaled clip operation
96 diff = clip->x1 - dst->x1; in drm_rect_clip_scaled()
101 src->x1 = src->x2 - new_src_w; in drm_rect_clip_scaled()
[all …]
/linux/drivers/iio/adc/
H A Dad7292.c1 // SPDX-License-Identifier: GPL-2.0
94 st->d8[0] = AD7292_RD_FLAG_MSK(addr); in ad7292_spi_reg_read()
96 ret = spi_write_then_read(st->spi, st->d8, 1, &st->d16, 2); in ad7292_spi_reg_read()
100 return be16_to_cpu(st->d16); in ad7292_spi_reg_read()
106 unsigned int shift = 16 - (8 * len); in ad7292_spi_subreg_read()
109 st->d8[0] = AD7292_RD_FLAG_MSK(addr); in ad7292_spi_subreg_read()
110 st->d8[1] = sub_addr; in ad7292_spi_subreg_read()
112 ret = spi_write_then_read(st->spi, st->d8, 2, &st->d16, len); in ad7292_spi_subreg_read()
116 return (be16_to_cpu(st->d16) >> shift); in ad7292_spi_subreg_read()
126 .tx_buf = &st->d8, in ad7292_single_conversion()
[all …]
/linux/drivers/staging/media/atomisp/pci/runtime/binary/src/
H A Dbinary.c1 // SPDX-License-Identifier: GPL-2.0
46 if (info->enable.dvs_envelope) { in ia_css_binary_dvs_env()
48 binary_dvs_env->width = max(dvs_env->width, SH_CSS_MIN_DVS_ENVELOPE); in ia_css_binary_dvs_env()
49 binary_dvs_env->height = max(dvs_env->height, SH_CSS_MIN_DVS_ENVELOPE); in ia_css_binary_dvs_env()
63 bool binary_supports_yuv_ds = info->enable.ds & 2; in ia_css_binary_internal_res()
72 isp_tmp_internal_width = in_info->res.width in ia_css_binary_internal_res()
73 + info->pipeline.left_cropping + binary_dvs_env.width; in ia_css_binary_internal_res()
74 isp_tmp_internal_height = in_info->res.height in ia_css_binary_internal_res()
75 + info->pipeline.top_cropping + binary_dvs_env.height; in ia_css_binary_internal_res()
80 (bds_out_info->res.width >= out_info->res.width)) { in ia_css_binary_internal_res()
[all …]
/linux/drivers/media/dvb-frontends/
H A Dcx24113.c1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright (C) 2007-8 Patrick Boettcher <pb@linuxtv.org>
93 struct i2c_msg msg = { .addr = state->config->i2c_addr, in cx24113_writereg()
95 int err = i2c_transfer(state->i2c, &msg, 1); in cx24113_writereg()
97 printk(KERN_DEBUG "%s: writereg error(err == %i, reg == 0x%02x, data == 0x%02x)\n", in cx24113_writereg()
110 { .addr = state->config->i2c_addr, in cx24113_readreg()
112 { .addr = state->config->i2c_addr, in cx24113_readreg()
116 ret = i2c_transfer(state->i2c, msg, 2); in cx24113_readreg()
119 printk(KERN_DEBUG "%s: reg=0x%x (error=%d)\n", in cx24113_readreg()
132 r |= state->icp_mode; in cx24113_set_parameters()
[all …]

12345678910>>...21