Home
last modified time | relevance | path

Searched refs:fract (Results 1 – 18 of 18) sorted by relevance

/linux-6.6.21/drivers/clk/
Dclk-fractional-divider.c69 static void clk_fd_get_div(struct clk_hw *hw, struct u32_fract *fract) in clk_fd_get_div() argument
100 fract->numerator = m; in clk_fd_get_div()
101 fract->denominator = n; in clk_fd_get_div()
106 struct u32_fract fract; in clk_fd_recalc_rate() local
109 clk_fd_get_div(hw, &fract); in clk_fd_recalc_rate()
111 if (!fract.numerator || !fract.denominator) in clk_fd_recalc_rate()
114 ret = (u64)parent_rate * fract.numerator; in clk_fd_recalc_rate()
115 do_div(ret, fract.denominator); in clk_fd_recalc_rate()
209 struct u32_fract fract; in clk_fd_numerator_get() local
211 clk_fd_get_div(hw, &fract); in clk_fd_numerator_get()
[all …]
/linux-6.6.21/drivers/iio/health/
Dafe4404.c144 { .integer = 500000, .fract = 0 },
145 { .integer = 250000, .fract = 0 },
146 { .integer = 100000, .fract = 0 },
147 { .integer = 50000, .fract = 0 },
148 { .integer = 25000, .fract = 0 },
149 { .integer = 10000, .fract = 0 },
150 { .integer = 1000000, .fract = 0 },
151 { .integer = 2000000, .fract = 0 },
156 { .integer = 0, .fract = 5000 },
157 { .integer = 0, .fract = 2500 },
[all …]
Dafe440x.h114 int fract; member
127 _table[i].fract); \
Dafe4403.c155 vals[1] = afe440x_attr->val_table[reg_val].fract; in afe440x_show_register()
167 int val, integer, fract, ret; in afe440x_store_register() local
169 ret = iio_str_to_fixpoint(buf, 100000, &integer, &fract); in afe440x_store_register()
175 afe440x_attr->val_table[val].fract == fract) in afe440x_store_register()
/linux-6.6.21/drivers/iio/trigger/
Diio-trig-hrtimer.c58 int integer, fract, ret; in iio_hrtimer_store_sampling_frequency() local
60 ret = iio_str_to_fixpoint(buf, 100, &integer, &fract); in iio_hrtimer_store_sampling_frequency()
63 if (integer < 0 || fract < 0) in iio_hrtimer_store_sampling_frequency()
66 val = fract + 1000ULL * integer; /* mHz */ in iio_hrtimer_store_sampling_frequency()
72 info->sampling_frequency[1] = fract * 1000; /* uHz */ in iio_hrtimer_store_sampling_frequency()
/linux-6.6.21/drivers/iio/adc/
Dsc27xx_adc.c585 struct u32_fract *fract) in sc27xx_adc_volt_ratio() argument
590 fract->numerator = ratio >> SC27XX_RATIO_NUMERATOR_OFFSET; in sc27xx_adc_volt_ratio()
591 fract->denominator = ratio & SC27XX_RATIO_DENOMINATOR_MASK; in sc27xx_adc_volt_ratio()
619 struct u32_fract fract; in sc27xx_adc_convert_volt() local
641 sc27xx_adc_volt_ratio(data, channel, scale, &fract); in sc27xx_adc_convert_volt()
643 return DIV_ROUND_CLOSEST(volt * fract.denominator, fract.numerator); in sc27xx_adc_convert_volt()
/linux-6.6.21/drivers/iio/common/hid-sensors/
Dhid-sensor-trigger.c25 int integer, fract, ret; in _hid_sensor_set_report_latency() local
28 ret = iio_str_to_fixpoint(buf, 100000, &integer, &fract); in _hid_sensor_set_report_latency()
32 latency = integer * 1000 + fract / 1000; in _hid_sensor_set_report_latency()
/linux-6.6.21/drivers/media/i2c/
Dmt9m111.c1069 struct v4l2_fract *fract = &fi->interval; in mt9m111_s_frame_interval() local
1078 if (fract->numerator == 0) { in mt9m111_s_frame_interval()
1079 fract->denominator = 30; in mt9m111_s_frame_interval()
1080 fract->numerator = 1; in mt9m111_s_frame_interval()
1083 fps = DIV_ROUND_CLOSEST(fract->denominator, fract->numerator); in mt9m111_s_frame_interval()
1091 fract->denominator = mode->max_fps; in mt9m111_s_frame_interval()
1092 fract->numerator = 1; in mt9m111_s_frame_interval()
/linux-6.6.21/drivers/iio/proximity/
Dsrf08.c298 int integer, fract; in srf08_store_range_mm() local
300 ret = iio_str_to_fixpoint(buf, 100, &integer, &fract); in srf08_store_range_mm()
304 ret = srf08_write_range_mm(data, integer * 1000 + fract); in srf08_store_range_mm()
/linux-6.6.21/drivers/clk/mmp/
Dclk-audio.c88 unsigned short fract; member
147 val |= SSPA_AUD_PLL_CTRL0_FRACT(predivs[prediv].fract); in audio_pll_recalc_rate()
213 val |= SSPA_AUD_PLL_CTRL0_FRACT(predivs[prediv].fract); in audio_pll_set_rate()
/linux-6.6.21/drivers/iio/
Dindustrialio-core.c867 int *integer, int *fract, bool scale_db) in __iio_str_to_fixpoint() argument
873 *fract = 0; in __iio_str_to_fixpoint()
921 *fract = f; in __iio_str_to_fixpoint()
937 int *integer, int *fract) in iio_str_to_fixpoint() argument
939 return __iio_str_to_fixpoint(str, fract_mult, integer, fract, false); in iio_str_to_fixpoint()
951 int integer, fract = 0; in iio_write_channel_info() local
988 ret = __iio_str_to_fixpoint(buf, fract_mult, &integer, &fract, in iio_write_channel_info()
995 integer, fract, this_attr->address); in iio_write_channel_info()
/linux-6.6.21/drivers/iio/common/cros_ec_sensors/
Dcros_ec_sensors_core.c120 int integer, fract, ret; in cros_ec_sensor_set_report_latency() local
123 ret = iio_str_to_fixpoint(buf, 100000, &integer, &fract); in cros_ec_sensor_set_report_latency()
128 latency = integer * 1000 + fract / 1000; in cros_ec_sensor_set_report_latency()
/linux-6.6.21/kernel/rcu/
Dtasks.h735 int fract; in rcu_tasks_wait_gp() local
774 fract = rtp->init_fract; in rcu_tasks_wait_gp()
785 schedule_timeout_idle(fract); in rcu_tasks_wait_gp()
787 exp = jiffies_to_nsecs(fract); in rcu_tasks_wait_gp()
792 if (fract < HZ) in rcu_tasks_wait_gp()
793 fract++; in rcu_tasks_wait_gp()
/linux-6.6.21/drivers/media/platform/qcom/camss/
Dcamss-video.c27 struct fract { struct
45 struct fract hsub[3]; argument
46 struct fract vsub[3];
/linux-6.6.21/include/linux/iio/
Diio.h762 int *fract);
/linux-6.6.21/drivers/atm/
Diphase.c262 && (tempFract == dev->testTable[vcc->vci]->fract)) in clear_lockup()
265 dev->testTable[vcc->vci]->fract = tempFract; in clear_lockup()
2148 iadev->testTable[i]->fract = 0;
2653 iadev->testTable[vcc->vci]->fract = 0;
Diphase.h840 u16 fract; member
/linux-6.6.21/arch/m68k/fpsp040/
Dbindec.S759 subil #0x3ffd,%d0 |sub bias less 2 to make fract