/kernel/linux/linux-5.10/include/linux/ |
H A D | fixp-arith.h | 42 * __fixp_sin32() returns the sin of an angle in degrees 44 * @degrees: angle, in degrees, from 0 to 360. 48 static inline s32 __fixp_sin32(int degrees) in __fixp_sin32() argument 53 if (degrees > 180) { in __fixp_sin32() 55 degrees -= 180; in __fixp_sin32() 57 if (degrees > 90) in __fixp_sin32() 58 degrees = 180 - degrees; in __fixp_sin32() 60 ret = sin_table[degrees]; in __fixp_sin32() 72 fixp_sin32(int degrees) fixp_sin32() argument 114 int degrees; fixp_sin32_rad() local [all...] |
/kernel/linux/linux-6.6/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) in __fixp_sin32() argument 54 if (degrees > 180) { in __fixp_sin32() 56 degrees -= 180; in __fixp_sin32() 58 if (degrees > 90) in __fixp_sin32() 59 degrees = 180 - degrees; in __fixp_sin32() 61 ret = sin_table[degrees]; in __fixp_sin32() 73 fixp_sin32(int degrees) fixp_sin32() argument 115 int degrees; fixp_sin32_rad() local [all...] |
/kernel/linux/linux-5.10/drivers/clk/meson/ |
H A D | clk-phase.c | 26 static unsigned int meson_clk_degrees_to_val(int degrees, unsigned int width) in meson_clk_degrees_to_val() argument 28 unsigned int val = DIV_ROUND_CLOSEST(degrees, phase_step(width)); in meson_clk_degrees_to_val() 31 * This last calculation is here for cases when degrees is rounded in meson_clk_degrees_to_val() 48 static int meson_clk_phase_set_phase(struct clk_hw *hw, int degrees) in meson_clk_phase_set_phase() argument 54 val = meson_clk_degrees_to_val(degrees, phase->ph.width); in meson_clk_phase_set_phase() 107 static int meson_clk_triphase_set_phase(struct clk_hw *hw, int degrees) in meson_clk_triphase_set_phase() argument 113 val = meson_clk_degrees_to_val(degrees, tph->ph0.width); in meson_clk_triphase_set_phase() 164 static int meson_sclk_ws_inv_set_phase(struct clk_hw *hw, int degrees) in meson_sclk_ws_inv_set_phase() argument 170 val = meson_clk_degrees_to_val(degrees, tph->ph.width); in meson_sclk_ws_inv_set_phase()
|
/kernel/linux/linux-5.10/drivers/clk/rockchip/ |
H A D | clk-mmc-phase.c | 51 u16 degrees; in rockchip_mmc_get_phase() local 60 degrees = (raw_value & ROCKCHIP_MMC_DEGREE_MASK) * 90; in rockchip_mmc_get_phase() 63 /* degrees/delaynum * 1000000 */ in rockchip_mmc_get_phase() 69 degrees += DIV_ROUND_CLOSEST(delay_num * factor, 1000000); in rockchip_mmc_get_phase() 72 return degrees % 360; in rockchip_mmc_get_phase() 75 static int rockchip_mmc_set_phase(struct clk_hw *hw, int degrees) in rockchip_mmc_set_phase() argument 101 nineties = degrees / 90; in rockchip_mmc_set_phase() 102 remainder = (degrees % 90); in rockchip_mmc_set_phase() 119 * degrees off from what we think we're making. That's OK in rockchip_mmc_set_phase() 142 clk_hw_get_name(hw), degrees, delay_nu in rockchip_mmc_set_phase() [all...] |
H A D | clk-inverter.c | 35 static int rockchip_inv_set_phase(struct clk_hw *hw, int degrees) in rockchip_inv_set_phase() argument 40 if (degrees % 180 == 0) { in rockchip_inv_set_phase() 41 val = !!degrees; in rockchip_inv_set_phase() 44 __func__, degrees, clk_hw_get_name(hw)); in rockchip_inv_set_phase()
|
/kernel/linux/linux-6.6/drivers/clk/rockchip/ |
H A D | clk-mmc-phase.c | 51 u16 degrees; in rockchip_mmc_get_phase() local 60 degrees = (raw_value & ROCKCHIP_MMC_DEGREE_MASK) * 90; in rockchip_mmc_get_phase() 63 /* degrees/delaynum * 1000000 */ in rockchip_mmc_get_phase() 69 degrees += DIV_ROUND_CLOSEST(delay_num * factor, 1000000); in rockchip_mmc_get_phase() 72 return degrees % 360; in rockchip_mmc_get_phase() 75 static int rockchip_mmc_set_phase(struct clk_hw *hw, int degrees) in rockchip_mmc_set_phase() argument 101 nineties = degrees / 90; in rockchip_mmc_set_phase() 102 remainder = (degrees % 90); in rockchip_mmc_set_phase() 119 * degrees off from what we think we're making. That's OK in rockchip_mmc_set_phase() 142 clk_hw_get_name(hw), degrees, delay_nu in rockchip_mmc_set_phase() [all...] |
H A D | clk-inverter.c | 35 static int rockchip_inv_set_phase(struct clk_hw *hw, int degrees) in rockchip_inv_set_phase() argument 40 if (degrees % 180 == 0) { in rockchip_inv_set_phase() 41 val = !!degrees; in rockchip_inv_set_phase() 44 __func__, degrees, clk_hw_get_name(hw)); in rockchip_inv_set_phase()
|
/kernel/linux/linux-6.6/drivers/clk/meson/ |
H A D | clk-phase.c | 26 static unsigned int meson_clk_degrees_to_val(int degrees, unsigned int width) in meson_clk_degrees_to_val() argument 28 unsigned int val = DIV_ROUND_CLOSEST(degrees, phase_step(width)); in meson_clk_degrees_to_val() 31 * This last calculation is here for cases when degrees is rounded in meson_clk_degrees_to_val() 48 static int meson_clk_phase_set_phase(struct clk_hw *hw, int degrees) in meson_clk_phase_set_phase() argument 54 val = meson_clk_degrees_to_val(degrees, phase->ph.width); in meson_clk_phase_set_phase() 107 static int meson_clk_triphase_set_phase(struct clk_hw *hw, int degrees) in meson_clk_triphase_set_phase() argument 113 val = meson_clk_degrees_to_val(degrees, tph->ph0.width); in meson_clk_triphase_set_phase() 164 static int meson_sclk_ws_inv_set_phase(struct clk_hw *hw, int degrees) in meson_sclk_ws_inv_set_phase() argument 170 val = meson_clk_degrees_to_val(degrees, tph->ph.width); in meson_sclk_ws_inv_set_phase()
|
/kernel/linux/linux-5.10/drivers/mmc/host/ |
H A D | dw_mmc-hi3798cv200.c | 69 static const int degrees[] = { 0, 45, 90, 135, 180, 225, 270, 315 }; in dw_mci_hi3798cv200_execute_tuning() local 77 for (i = 0; i < ARRAY_SIZE(degrees); i++) { in dw_mci_hi3798cv200_execute_tuning() 78 clk_set_phase(priv->sample_clk, degrees[i]); in dw_mci_hi3798cv200_execute_tuning() 104 fall_point = ARRAY_SIZE(degrees) - 1; in dw_mci_hi3798cv200_execute_tuning() 107 (ARRAY_SIZE(degrees) - 1)) in dw_mci_hi3798cv200_execute_tuning() 110 i = (raise_point + ARRAY_SIZE(degrees) - 1) / 2; in dw_mci_hi3798cv200_execute_tuning() 115 clk_set_phase(priv->sample_clk, degrees[i]); in dw_mci_hi3798cv200_execute_tuning() 117 raise_point, fall_point, degrees[i]); in dw_mci_hi3798cv200_execute_tuning()
|
/kernel/linux/linux-6.6/drivers/mmc/host/ |
H A D | dw_mmc-hi3798cv200.c | 63 static const int degrees[] = { 0, 45, 90, 135, 180, 225, 270, 315 }; in dw_mci_hi3798cv200_execute_tuning() local 71 for (i = 0; i < ARRAY_SIZE(degrees); i++) { in dw_mci_hi3798cv200_execute_tuning() 72 clk_set_phase(priv->sample_clk, degrees[i]); in dw_mci_hi3798cv200_execute_tuning() 98 fall_point = ARRAY_SIZE(degrees) - 1; in dw_mci_hi3798cv200_execute_tuning() 101 (ARRAY_SIZE(degrees) - 1)) in dw_mci_hi3798cv200_execute_tuning() 104 i = (raise_point + ARRAY_SIZE(degrees) - 1) / 2; in dw_mci_hi3798cv200_execute_tuning() 109 clk_set_phase(priv->sample_clk, degrees[i]); in dw_mci_hi3798cv200_execute_tuning() 111 raise_point, fall_point, degrees[i]); in dw_mci_hi3798cv200_execute_tuning()
|
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) in sdhci_zynqmp_sdcardclk_set_phase() argument 767 tap_delay = (degrees * tap_max) / 360; in sdhci_zynqmp_sdcardclk_set_phase() 789 * @degrees: The clock phase shift between 0 - 359. 795 static int sdhci_zynqmp_sampleclk_set_phase(struct clk_hw *hw, int degrees) in sdhci_zynqmp_sampleclk_set_phase() argument 836 tap_delay = (degrees * tap_max) / 360; in sdhci_zynqmp_sampleclk_set_phase() 855 * @degrees: The clock phase shift between 0 - 359. 861 static int sdhci_versal_sdcardclk_set_phase(struct clk_hw *hw, int degrees) in sdhci_versal_sdcardclk_set_phase() argument 896 tap_delay = (degrees * tap_max) / 360; in sdhci_versal_sdcardclk_set_phase() 922 * @degrees 928 sdhci_versal_sampleclk_set_phase(struct clk_hw *hw, int degrees) sdhci_versal_sampleclk_set_phase() argument 989 sdhci_versal_net_emmc_sdcardclk_set_phase(struct clk_hw *hw, int degrees) sdhci_versal_net_emmc_sdcardclk_set_phase() argument 1034 sdhci_versal_net_emmc_sampleclk_set_phase(struct clk_hw *hw, int degrees) sdhci_versal_net_emmc_sampleclk_set_phase() argument [all...] |
/kernel/linux/linux-5.10/drivers/clk/hisilicon/ |
H A D | clk-hisi-phase.c | 54 int degrees) in hisi_phase_degrees_to_regval() 59 if (phase->phase_degrees[i] == degrees) in hisi_phase_degrees_to_regval() 65 static int hisi_clk_set_phase(struct clk_hw *hw, int degrees) in hisi_clk_set_phase() argument 72 regval = hisi_phase_degrees_to_regval(phase, degrees); in hisi_clk_set_phase() 53 hisi_phase_degrees_to_regval(struct clk_hisi_phase *phase, int degrees) hisi_phase_degrees_to_regval() argument
|
/kernel/linux/linux-6.6/drivers/clk/hisilicon/ |
H A D | clk-hisi-phase.c | 54 int degrees) in hisi_phase_degrees_to_regval() 59 if (phase->phase_degrees[i] == degrees) in hisi_phase_degrees_to_regval() 65 static int hisi_clk_set_phase(struct clk_hw *hw, int degrees) in hisi_clk_set_phase() argument 72 regval = hisi_phase_degrees_to_regval(phase, degrees); in hisi_clk_set_phase() 53 hisi_phase_degrees_to_regval(struct clk_hisi_phase *phase, int degrees) hisi_phase_degrees_to_regval() argument
|
/kernel/linux/linux-5.10/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) in sin_mul() argument 77 if (degrees > 180) { in sin_mul() 78 degrees -= 180; in sin_mul() 81 return factor * 4 * degrees * (180 - degrees) / in sin_mul() 82 (40500 - degrees * (180 - degrees)); in sin_mul() 87 cos_mul(int degrees, int factor) in cos_mul() argument 89 return sin_mul((degrees in cos_mul() [all...] |
/kernel/linux/linux-6.6/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) in sin_mul() argument 77 if (degrees > 180) { in sin_mul() 78 degrees -= 180; in sin_mul() 81 return factor * 4 * degrees * (180 - degrees) / in sin_mul() 82 (40500 - degrees * (180 - degrees)); in sin_mul() 87 cos_mul(int degrees, int factor) in cos_mul() argument 89 return sin_mul((degrees in cos_mul() [all...] |
/kernel/linux/linux-5.10/drivers/clk/sunxi-ng/ |
H A D | ccu_phase.c | 56 static int ccu_phase_set_phase(struct clk_hw *hw, int degrees) in ccu_phase_set_phase() argument 85 if (degrees != 180) { in ccu_phase_set_phase() 96 * formula to get the outphasing in degrees is deg = in ccu_phase_set_phase() 105 delay = DIV_ROUND_CLOSEST(degrees, step); in ccu_phase_set_phase()
|
/kernel/linux/linux-6.6/drivers/clk/sunxi-ng/ |
H A D | ccu_phase.c | 56 static int ccu_phase_set_phase(struct clk_hw *hw, int degrees) in ccu_phase_set_phase() argument 85 if (degrees != 180) { in ccu_phase_set_phase() 96 * formula to get the outphasing in degrees is deg = in ccu_phase_set_phase() 105 delay = DIV_ROUND_CLOSEST(degrees, step); in ccu_phase_set_phase()
|
/kernel/linux/linux-5.10/drivers/hwmon/ |
H A D | emc2103.c | 51 s8 degrees; member 88 u8 degrees, fractional; in read_temp_from_i2c() local 90 if (read_u8_from_i2c(client, i2c_reg, °rees) < 0) in read_temp_from_i2c() 96 temp->degrees = degrees; in read_temp_from_i2c() 179 int millidegrees = data->temp[nr].degrees * 1000 in temp_show() 207 bool fault = (data->temp[nr].degrees == -128); in temp_fault_show()
|
/kernel/linux/linux-6.6/drivers/hwmon/ |
H A D | emc2103.c | 51 s8 degrees; member 88 u8 degrees, fractional; in read_temp_from_i2c() local 90 if (read_u8_from_i2c(client, i2c_reg, °rees) < 0) in read_temp_from_i2c() 96 temp->degrees = degrees; in read_temp_from_i2c() 179 int millidegrees = data->temp[nr].degrees * 1000 in temp_show() 207 bool fault = (data->temp[nr].degrees == -128); in temp_fault_show()
|
/kernel/linux/linux-5.10/drivers/gpu/drm/sun4i/ |
H A D | sun4i_dotclock.c | 138 static int sun4i_dclk_set_phase(struct clk_hw *hw, int degrees) in sun4i_dclk_set_phase() argument 141 u32 val = degrees / 120; in sun4i_dclk_set_phase()
|
/kernel/linux/linux-6.6/drivers/gpu/drm/sun4i/ |
H A D | sun4i_tcon_dclk.c | 138 static int sun4i_dclk_set_phase(struct clk_hw *hw, int degrees) in sun4i_dclk_set_phase() argument 141 u32 val = degrees / 120; in sun4i_dclk_set_phase()
|
/kernel/linux/linux-5.10/drivers/clk/sunxi/ |
H A D | clk-mod0.c | 214 static int mmc_set_phase(struct clk_hw *hw, int degrees) in mmc_set_phase() argument 243 if (degrees != 180) { in mmc_set_phase() 254 * formula to get the outphasing in degrees is deg = in mmc_set_phase() 263 delay = DIV_ROUND_CLOSEST(degrees, step); in mmc_set_phase()
|
/kernel/linux/linux-6.6/drivers/clk/starfive/ |
H A D | clk-starfive-jh71x0.c | 185 static int jh71x0_clk_set_phase(struct clk_hw *hw, int degrees) in jh71x0_clk_set_phase() argument 190 if (degrees == 0) in jh71x0_clk_set_phase() 192 else if (degrees == 180) in jh71x0_clk_set_phase()
|
/kernel/linux/linux-6.6/drivers/clk/sunxi/ |
H A D | clk-mod0.c | 212 static int mmc_set_phase(struct clk_hw *hw, int degrees) in mmc_set_phase() argument 241 if (degrees != 180) { in mmc_set_phase() 252 * formula to get the outphasing in degrees is deg = in mmc_set_phase() 261 delay = DIV_ROUND_CLOSEST(degrees, step); in mmc_set_phase()
|
/kernel/linux/linux-6.6/drivers/mmc/core/ |
H A D | host.c | 226 int degrees[2] = {0}; in mmc_of_parse_timing_phase() local 229 rc = device_property_read_u32_array(dev, prop, degrees, 2); in mmc_of_parse_timing_phase() 232 phase->in_deg = degrees[0]; in mmc_of_parse_timing_phase() 233 phase->out_deg = degrees[1]; in mmc_of_parse_timing_phase()
|