/linux-master/include/linux/ |
H A D | fixp-arith.h | 43 * __fixp_sin32() returns the sin of an angle in degrees 45 * @degrees: angle, in degrees, from 0 to 360. 49 static inline s32 __fixp_sin32(int degrees) argument 54 if (degrees > 180) { 56 degrees -= 180; 58 if (degrees > 90) 59 degrees = 180 - degrees; 61 ret = sin_table[degrees]; 73 fixp_sin32(int degrees) argument 115 int degrees; local [all...] |
H A D | clk.h | 136 * @degrees: number of degrees the signal is shifted 138 * Shifts the phase of a clock signal by the specified degrees. Returns 0 on 141 int clk_set_phase(struct clk *clk, int degrees); 147 * Returns the phase shift of a clock node in degrees, otherwise returns
|
H A D | clk-provider.h | 189 * Returned values are 0-359 degrees on success, negative 192 * @set_phase: Shift the phase this clock signal in degrees specified 193 * by the second argument. Valid values for degrees are 261 int (*set_phase)(struct clk_hw *hw, int degrees);
|
/linux-master/drivers/clk/rockchip/ |
H A D | clk-mmc-phase.c | 51 u16 degrees; local 60 degrees = (raw_value & ROCKCHIP_MMC_DEGREE_MASK) * 90; 63 /* degrees/delaynum * 1000000 */ 69 degrees += DIV_ROUND_CLOSEST(delay_num * factor, 1000000); 72 return degrees % 360; 75 static int rockchip_mmc_set_phase(struct clk_hw *hw, int degrees) argument 101 nineties = degrees / 90; 102 remainder = (degrees % 90); 119 * degrees off from what we think we're making. That's OK 142 clk_hw_get_name(hw), degrees, delay_nu [all...] |
H A D | clk-inverter.c | 35 static int rockchip_inv_set_phase(struct clk_hw *hw, int degrees) argument 40 if (degrees % 180 == 0) { 41 val = !!degrees; 44 __func__, degrees, clk_hw_get_name(hw));
|
/linux-master/drivers/clk/meson/ |
H A D | clk-phase.c | 26 static unsigned int meson_clk_degrees_to_val(int degrees, unsigned int width) argument 28 unsigned int val = DIV_ROUND_CLOSEST(degrees, phase_step(width)); 31 * This last calculation is here for cases when degrees is rounded 48 static int meson_clk_phase_set_phase(struct clk_hw *hw, int degrees) argument 54 val = meson_clk_degrees_to_val(degrees, phase->ph.width); 107 static int meson_clk_triphase_set_phase(struct clk_hw *hw, int degrees) argument 113 val = meson_clk_degrees_to_val(degrees, tph->ph0.width); 164 static int meson_sclk_ws_inv_set_phase(struct clk_hw *hw, int degrees) argument 170 val = meson_clk_degrees_to_val(degrees, tph->ph.width);
|
/linux-master/drivers/mmc/host/ |
H A D | dw_mmc-hi3798mv200.c | 94 static const int degrees[] = { 0, 45, 90, 135, 180, 225, 270, 315 }; local 108 for (i = 0; i < ARRAY_SIZE(degrees); i++) { 109 clk_set_phase(priv->sample_clk, degrees[i]); 148 fall_point = ARRAY_SIZE(degrees) - 1; 151 (ARRAY_SIZE(degrees) - 1)) 154 mid = (raise_point + ARRAY_SIZE(degrees) - 1) / 2; 163 priv->phase_map.phase[MMC_TIMING_MMC_HS200].in_deg = degrees[mid]; 164 priv->phase_map.phase[MMC_TIMING_MMC_HS400].in_deg = degrees[mid]; 165 priv->phase_map.phase[MMC_TIMING_UHS_SDR104].in_deg = degrees[mid]; 167 clk_set_phase(priv->sample_clk, degrees[mi [all...] |
H A D | dw_mmc-hi3798cv200.c | 63 static const int degrees[] = { 0, 45, 90, 135, 180, 225, 270, 315 }; local 71 for (i = 0; i < ARRAY_SIZE(degrees); i++) { 72 clk_set_phase(priv->sample_clk, degrees[i]); 98 fall_point = ARRAY_SIZE(degrees) - 1; 101 (ARRAY_SIZE(degrees) - 1)) 104 i = (raise_point + ARRAY_SIZE(degrees) - 1) / 2; 109 clk_set_phase(priv->sample_clk, degrees[i]); 111 raise_point, fall_point, degrees[i]);
|
H A D | sdhci-of-arasan.c | 723 * @degrees: The clock phase shift between 0 - 359. 729 static int sdhci_zynqmp_sdcardclk_set_phase(struct clk_hw *hw, int degrees) argument 767 tap_delay = (degrees * tap_max) / 360; 789 * @degrees: The clock phase shift between 0 - 359. 795 static int sdhci_zynqmp_sampleclk_set_phase(struct clk_hw *hw, int degrees) argument 836 tap_delay = (degrees * tap_max) / 360; 855 * @degrees: The clock phase shift between 0 - 359. 861 static int sdhci_versal_sdcardclk_set_phase(struct clk_hw *hw, int degrees) argument 896 tap_delay = (degrees * tap_max) / 360; 922 * @degrees 928 sdhci_versal_sampleclk_set_phase(struct clk_hw *hw, int degrees) argument 989 sdhci_versal_net_emmc_sdcardclk_set_phase(struct clk_hw *hw, int degrees) argument 1034 sdhci_versal_net_emmc_sampleclk_set_phase(struct clk_hw *hw, int degrees) argument [all...] |
/linux-master/drivers/clk/sunxi-ng/ |
H A D | ccu_phase.c | 56 static int ccu_phase_set_phase(struct clk_hw *hw, int degrees) argument 85 if (degrees != 180) { 96 * formula to get the outphasing in degrees is deg = 105 delay = DIV_ROUND_CLOSEST(degrees, step);
|
/linux-master/drivers/clk/hisilicon/ |
H A D | clk-hisi-phase.c | 54 int degrees) 59 if (phase->phase_degrees[i] == degrees) 65 static int hisi_clk_set_phase(struct clk_hw *hw, int degrees) argument 72 regval = hisi_phase_degrees_to_regval(phase, degrees); 53 hisi_phase_degrees_to_regval(struct clk_hisi_phase *phase, int degrees) argument
|
/linux-master/drivers/gpu/drm/nouveau/dispnv04/ |
H A D | overlay.c | 70 * sin(x degrees) ~= 4 x (180 - x) / (40500 - x (180 - x) ) 75 sin_mul(int degrees, int factor) argument 77 if (degrees > 180) { 78 degrees -= 180; 81 return factor * 4 * degrees * (180 - degrees) / 82 (40500 - degrees * (180 - degrees)); 87 cos_mul(int degrees, int factor) argument 89 return sin_mul((degrees [all...] |
/linux-master/drivers/gpu/drm/sun4i/ |
H A D | sun4i_tcon_dclk.c | 138 static int sun4i_dclk_set_phase(struct clk_hw *hw, int degrees) argument 141 u32 val = degrees / 120;
|
/linux-master/drivers/clk/sunxi/ |
H A D | clk-mod0.c | 212 static int mmc_set_phase(struct clk_hw *hw, int degrees) argument 241 if (degrees != 180) { 252 * formula to get the outphasing in degrees is deg = 261 delay = DIV_ROUND_CLOSEST(degrees, step);
|
/linux-master/drivers/hwmon/ |
H A D | emc2103.c | 51 s8 degrees; member in struct:temperature 88 u8 degrees, fractional; local 90 if (read_u8_from_i2c(client, i2c_reg, °rees) < 0) 96 temp->degrees = degrees; 179 int millidegrees = data->temp[nr].degrees * 1000 207 bool fault = (data->temp[nr].degrees == -128);
|
/linux-master/drivers/clk/starfive/ |
H A D | clk-starfive-jh71x0.c | 185 static int jh71x0_clk_set_phase(struct clk_hw *hw, int degrees) argument 190 if (degrees == 0) 192 else if (degrees == 180)
|
/linux-master/drivers/mmc/core/ |
H A D | host.c | 225 int degrees[2] = {0}; local 228 rc = device_property_read_u32_array(dev, prop, degrees, 2); 231 phase->in_deg = degrees[0]; 232 phase->out_deg = degrees[1];
|
/linux-master/drivers/gpu/ipu-v3/ |
H A D | ipu-common.c | 136 int ipu_degrees_to_rot_mode(enum ipu_rotate_mode *mode, int degrees, argument 141 switch (degrees) { 168 int ipu_rot_mode_to_degrees(int *degrees, enum ipu_rotate_mode mode, argument 181 *degrees = 0; 184 *degrees = 90; 187 *degrees = 180; 190 *degrees = 270;
|
/linux-master/include/video/ |
H A D | imx-ipu-v3.h | 489 int ipu_degrees_to_rot_mode(enum ipu_rotate_mode *mode, int degrees, 491 int ipu_rot_mode_to_degrees(int *degrees, enum ipu_rotate_mode mode,
|
/linux-master/drivers/clk/ |
H A D | clk.c | 2979 static int clk_core_set_phase_nolock(struct clk_core *core, int degrees) argument 2991 trace_clk_set_phase(core, degrees); 2994 ret = core->ops->set_phase(core->hw, degrees); 2996 core->phase = degrees; 2999 trace_clk_set_phase_complete(core, degrees); 3007 * @degrees: number of degrees the signal is shifted 3010 * degrees. Returns 0 on success, -EERROR otherwise. 3024 int clk_set_phase(struct clk *clk, int degrees) argument 3031 /* sanity check degrees */ 3469 int degrees = do_div(val, 360); local [all...] |
/linux-master/drivers/media/platform/nxp/ |
H A D | imx-pxp.c | 1423 static u8 pxp_degrees_to_rot_mode(u32 degrees) argument 1425 switch (degrees) {
|