Home
last modified time | relevance | path

Searched refs:duty (Results 1 - 11 of 11) sorted by relevance

/device/soc/hisilicon/hi3861v100/hi3861_adapter/hals/iot_hardware/wifiiot_lite/
H A Dhal_iot_pwm.c40 unsigned int IoTPwmStart(unsigned int port, unsigned short duty, unsigned int freq) in IoTPwmStart() argument
45 if ((freq == 0) || (duty >= DUTY_MAX) || (duty == DUTY_MIN)) { in IoTPwmStart()
54 hiDuty = (duty * hiFreq) / DUTY_MAX; in IoTPwmStart()
/device/soc/hisilicon/common/platform/pwm/
H A Dpwm_hi35xx.c105 if (config->duty < 1 || config->duty > config->period) { in HiPwmSetConfig()
106 HDF_LOGE("%s: duty %u is not support, duty must in [1, period = %u].", in HiPwmSetConfig()
107 __func__, config->duty, config->period); in HiPwmSetConfig()
120 if (pwm->cfg.duty != config->duty) { in HiPwmSetConfig()
121 HiPwmSetDuty(hp->reg, config->duty); in HiPwmSetConfig()
122 HDF_LOGI("%s: [HiPwmSetDuty] done, duty: %u -> %u", __func__, pwm->cfg.duty, confi in HiPwmSetConfig()
[all...]
H A Dpwm_hi35xx.h95 static inline void HiPwmSetDuty(struct HiPwmRegs *reg, uint32_t duty) in HiPwmSetDuty() argument
97 reg->cfg1 = duty / PWM_CLK_PERIOD; in HiPwmSetDuty()
/device/soc/hisilicon/hi3861v100/sdk_liteos/platform/drivers/pwm/
H A Dhi_pwm.c152 static hi_void pwm_set_duty(hi_pwm_port port, hi_u16 duty) in pwm_set_duty() argument
154 hi_reg_setbits(pwm_duty_reg(pwm_base_addr(port)), 0, 16, duty); /* base_addr 16 */ in pwm_set_duty()
162 hi_u32 hi_pwm_start(hi_pwm_port port, hi_u16 duty, hi_u16 freq) in hi_pwm_start() argument
166 if ((pwm_check_port(port) != HI_ERR_SUCCESS) || (duty == 0) || (freq == 0) in hi_pwm_start()
167 || (duty > freq)) { in hi_pwm_start()
179 pwm_set_duty(port, duty); in hi_pwm_start()
/device/soc/rockchip/rk2206/adapter/hals/iot_hardware/wifiiot_lite/
H A Dhal_iot_pwm.c238 unsigned int IoTPwmStart(unsigned int port, unsigned short duty, unsigned int freq) in IoTPwmStart() argument
251 if (duty < DUTY_MIN) { in IoTPwmStart()
252 PRINT_ERR("duty(%d) out of the range(%d ~ %d)\n", duty, DUTY_MIN, DUTY_MAX); in IoTPwmStart()
255 if (duty > DUTY_MAX) { in IoTPwmStart()
256 PRINT_ERR("duty(%d) out of the range(%d ~ %d)\n", duty, DUTY_MIN, DUTY_MAX); in IoTPwmStart()
269 duty_ns = cycle_ns * duty / DUTY_TO_CYCLE; in IoTPwmStart()
/device/soc/rockchip/common/sdk_linux/drivers/pwm/
H A Dpwm-rockchip.c54 unsigned long duty; member
92 tmp = readl_relaxed(pc->base + pc->data->regs.duty); in rockchip_pwm_get_state()
111 unsigned long period, duty; in rockchip_pwm_config() local
117 * Since period and duty cycle registers have a width of 32 in rockchip_pwm_config()
125 duty = DIV_ROUND_CLOSEST_ULL(div, pc->data->prescaler * NSEC_PER_SEC); in rockchip_pwm_config()
129 * Lock the period and duty of previous configuration, then in rockchip_pwm_config()
130 * change the duty and period, that would not be effective. in rockchip_pwm_config()
160 writel(duty, pc->base + pc->data->regs.duty); in rockchip_pwm_config()
173 * the configuration of duty, perio in rockchip_pwm_config()
[all...]
/device/soc/hisilicon/hi3861v100/sdk_liteos/include/
H A Dhi_pwm.h133 * PWM signal duty cycle = duty/freq Frequency = Clock source frequency/freq.
134 CNcomment:按配置的参数输出PWM信号。PWM信号占空比=duty/freq。频率=时钟源频率/freq。CNend
142 * @param duty [IN] type #hi_u16 PWM duty cycle count. Value range: [1, 65535]. The default value is 750.
153 hi_u32 hi_pwm_start(hi_pwm_port port, hi_u16 duty, hi_u16 freq);
/device/board/hisilicon/hispark_aries/uboot/secureboot_release/ddr_init/boot/hi3518ev300/
H A Dlowlevel_init_v300.c240 unsigned int duty; in set_hpm_core_volt() local
254 duty = ((unsigned int)((1099 - volt) * 460) >> 10); in set_hpm_core_volt()
255 writel(duty, PWM0_REG + pwm_id * PWM_REG_OFFSET + PWM_CFG1); in set_hpm_core_volt()
/device/soc/rockchip/rk2206/hardware/include/lz_hardware/
H A Dpwm.h91 * @brief Starts PWM signal output from a specified port based on the given output frequency and duty cycle.
96 * @param duty Indicates the duty cycle for PWM signal output. The value ranges from 1 to 99.
101 unsigned int LzPwmStart(unsigned int port, unsigned int duty, unsigned int cycle);
/device/soc/rockchip/common/sdk_linux/include/linux/
H A Dpwm.h16 * @PWM_POLARITY_NORMAL: a high signal for the duration of the duty-
19 * @PWM_POLARITY_INVERSED: a low signal for the duration of the duty-
54 * @duty_cycle: PWM duty cycle (in nanoseconds)
128 static inline void pwm_set_duty_cycle(struct pwm_device *pwm, unsigned int duty) in pwm_set_duty_cycle() argument
131 pwm->state.duty_cycle = duty; in pwm_set_duty_cycle()
191 * pwm_get_relative_duty_cycle() - Get a relative duty cycle value
192 * @state: PWM state to extract the duty cycle from
193 * @scale: target scale of the relative duty cycle
195 * This functions converts the absolute duty cycle stored in @state (expressed
201 * duty
[all...]
H A Dclk-provider.h33 /* duty cycle call may be forwarded to the parent clock */
64 * struct clk_duty - Struture encoding the duty cycle ratio of a clock
66 * @num: Numerator of the duty cycle ratio
67 * @den: Denominator of the duty cycle ratio
182 * @get_duty_cycle: Queries the hardware to get the current duty cycle ratio
186 * @set_duty_cycle: Apply the duty cycle ratio to this clock signal specified by
241 int (*get_duty_cycle)(struct clk_hw *hw, struct clk_duty *duty);
242 int (*set_duty_cycle)(struct clk_hw *hw, struct clk_duty *duty);

Completed in 7 milliseconds