Home
last modified time | relevance | path

Searched refs:pwm (Results 1 – 25 of 76) sorted by relevance

1234

/device/soc/asrmicro/asr582x/liteos_m/sdk/drivers/driver/src/
Dduet_pwm.c30 void duet_pwm_pinmux_init(duet_pwm_dev_t *pwm) in duet_pwm_pinmux_init() argument
32 switch (pwm->port) { in duet_pwm_pinmux_init()
72 void duet_pwm_cfg(duet_pwm_dev_t *pwm) in duet_pwm_cfg() argument
75 switch (pwm->port) { in duet_pwm_cfg()
79 tmp_value |= (SYSTEM_CLOCK / pwm->config.freq - 1); in duet_pwm_cfg()
83 tmp_value |= (uint16_t)(SYSTEM_CLOCK / pwm->config.freq * (1 - pwm->config.duty_cycle)); in duet_pwm_cfg()
90 tmp_value |= (SYSTEM_CLOCK / pwm->config.freq - 1); in duet_pwm_cfg()
94 … tmp_value |= (uint16_t)(SYSTEM_CLOCK / pwm->config.freq * (1 - pwm->config.duty_cycle)) << 16; in duet_pwm_cfg()
101 tmp_value |= ((uint16_t)(SYSTEM_CLOCK / pwm->config.freq - 1) << 16); in duet_pwm_cfg()
105 tmp_value |= (uint16_t)(SYSTEM_CLOCK / pwm->config.freq * (1 - pwm->config.duty_cycle)); in duet_pwm_cfg()
[all …]
/device/soc/rockchip/common/sdk_linux/include/linux/
Dpwm.h84 unsigned int pwm; member
98 static inline void pwm_get_state(const struct pwm_device *pwm, struct pwm_state *state) in pwm_get_state() argument
100 *state = pwm->state; in pwm_get_state()
103 static inline bool pwm_is_enabled(const struct pwm_device *pwm) in pwm_is_enabled() argument
107 pwm_get_state(pwm, &state); in pwm_is_enabled()
112 static inline void pwm_set_period(struct pwm_device *pwm, u64 period) in pwm_set_period() argument
114 if (pwm) { in pwm_set_period()
115 pwm->state.period = period; in pwm_set_period()
119 static inline u64 pwm_get_period(const struct pwm_device *pwm) in pwm_get_period() argument
123 pwm_get_state(pwm, &state); in pwm_get_period()
[all …]
/device/soc/rockchip/common/sdk_linux/drivers/pwm/
Dsysfs.c19 struct pwm_device *pwm; member
33 return export->pwm; in child_to_pwm_device()
38 const struct pwm_device *pwm = child_to_pwm_device(child); in period_show() local
41 pwm_get_state(pwm, &state); in period_show()
49 struct pwm_device *pwm = export->pwm; in period_store() local
60 pwm_get_state(pwm, &state); in period_store()
62 ret = pwm_apply_state(pwm, &state); in period_store()
70 const struct pwm_device *pwm = child_to_pwm_device(child); in duty_cycle_show() local
73 pwm_get_state(pwm, &state); in duty_cycle_show()
81 struct pwm_device *pwm = export->pwm; in duty_cycle_store() local
[all …]
DKconfig52 will be called pwm-ab8500.
62 will be called pwm-atmel.
74 will be called pwm-atmel-hlcdc.
86 will be called pwm-atmel-tcb.
98 will be called pwm-bcm-iproc.
109 will be called pwm-bcm-kona.
118 will be called pwm-bcm2835.
127 will be called pwm-berlin.
137 will be called pwm-brcmstb.c.
147 will be called pwm-clps711x.
[all …]
Dpwm-rockchip.c75 static void rockchip_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm, struct pwm_state … in rockchip_pwm_get_state() argument
108 static void rockchip_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, const struct pwm_sta… in rockchip_pwm_config() argument
184 static int rockchip_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm, bool enable) in rockchip_pwm_enable() argument
228 static int rockchip_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, const struct pwm_state… in rockchip_pwm_apply() argument
240 pwm_get_state(pwm, &curstate); in rockchip_pwm_apply()
244 ret = rockchip_pwm_enable(chip, pwm, false); in rockchip_pwm_apply()
251 rockchip_pwm_config(chip, pwm, state); in rockchip_pwm_apply()
253 ret = rockchip_pwm_enable(chip, pwm, state->enabled); in rockchip_pwm_apply()
/device/soc/bestechnic/bes2600/liteos_m/sdk/bsp/platform/hal/
Dhal_pwm.c32 static struct PWM_T * const pwm[] = { variable
135 pwm[index]->EN &= ~(1 << offset); in hal_pwm_enable()
146 pwm[index]->LOAD01 = SET_BITFIELD(pwm[index]->LOAD01, PWM_LOAD01_0, load); in hal_pwm_enable()
147 pwm[index]->TOGGLE01 = SET_BITFIELD(pwm[index]->TOGGLE01, PWM_TOGGLE01_0, toggle); in hal_pwm_enable()
149 pwm[index]->LOAD01 = SET_BITFIELD(pwm[index]->LOAD01, PWM_LOAD01_1, load); in hal_pwm_enable()
150 pwm[index]->TOGGLE01 = SET_BITFIELD(pwm[index]->TOGGLE01, PWM_TOGGLE01_1, toggle); in hal_pwm_enable()
152 pwm[index]->LOAD23 = SET_BITFIELD(pwm[index]->LOAD23, PWM_LOAD23_2, load); in hal_pwm_enable()
153 pwm[index]->TOGGLE23 = SET_BITFIELD(pwm[index]->TOGGLE23, PWM_TOGGLE23_2, toggle); in hal_pwm_enable()
155 pwm[index]->LOAD23 = SET_BITFIELD(pwm[index]->LOAD23, PWM_LOAD23_3, load); in hal_pwm_enable()
156 pwm[index]->TOGGLE23 = SET_BITFIELD(pwm[index]->TOGGLE23, PWM_TOGGLE23_3, toggle); in hal_pwm_enable()
[all …]
/device/board/isoftstone/zhiyuan/kernel/driver/drivers/pwm/
Dpwm-sunxi.c234 struct pwm_device *pwm, in sunxi_pwm_set_polarity_single() argument
242 sel = pwm->pwm - chip->base; in sunxi_pwm_set_polarity_single()
258 struct pwm_device *pwm, in sunxi_pwm_set_polarity_dual() argument
267 sel[0] = pwm->pwm - chip->base; in sunxi_pwm_set_polarity_dual()
296 static int sunxi_pwm_set_polarity(struct pwm_chip *chip, struct pwm_device *pwm, in sunxi_pwm_set_polarity() argument
302 bind_num = pc->config[pwm->pwm - chip->base].bind_pwm; in sunxi_pwm_set_polarity()
304 sunxi_pwm_set_polarity_single(chip, pwm, polarity); in sunxi_pwm_set_polarity()
306 sunxi_pwm_set_polarity_dual(chip, pwm, polarity, bind_num); in sunxi_pwm_set_polarity()
398 static int sunxi_pwm_config_single(struct pwm_chip *chip, struct pwm_device *pwm, in sunxi_pwm_config_single() argument
428 if (pwm->chip_data) { in sunxi_pwm_config_single()
[all …]
/device/board/isoftstone/yangfan/kernel/src/driv/gpu/rockchip/
Drockchip_drm_backlight.c37 struct pwm_device *pwm; member
65 struct pwm_device *pwm, int brightness) in rockchip_pwm_power_on() argument
70 pwm_get_args(pwm, &pargs); in rockchip_pwm_power_on()
72 pwm_config(pwm, duty_cycle, pargs.period); in rockchip_pwm_power_on()
73 pwm_enable(pwm); in rockchip_pwm_power_on()
77 struct pwm_device *pwm) in rockchip_pwm_power_off() argument
82 pwm_get_state(pwm, &state); in rockchip_pwm_power_off()
86 pwm_get_args(pwm, &pargs); in rockchip_pwm_power_off()
87 pwm_config(pwm, 0, pargs.period); in rockchip_pwm_power_off()
88 pwm_disable(pwm); in rockchip_pwm_power_off()
[all …]
/device/board/openvalley/niobeu4/liteos_m/hals/iot_hardware/wifiiot_lite/
Dhal_iot_pwm.c84 pwm_driver_data_t *pwm = &g_pwm[port]; in IoTPwmInit() local
85 if (pwm->pwm_state == PWM_INIT) { in IoTPwmInit()
89 pwm->pwm_state = PWM_INIT; in IoTPwmInit()
90 InitPwm((ledc_channel_t)port, &(pwm->pwm_attr)); in IoTPwmInit()
100 pwm_driver_data_t *pwm = &g_pwm[port]; in IoTPwmDeinit() local
101 if (pwm->pwm_state == PWM_UNINIT) { in IoTPwmDeinit()
105 memset_s(pwm, sizeof(pwm_driver_data_t), 0, sizeof(pwm_driver_data_t)); in IoTPwmDeinit()
115 pwm_driver_data_t *pwm = &g_pwm[port]; in IoTPwmStart() local
116 if (pwm->pwm_state == PWM_UNINIT) { in IoTPwmStart()
147 ret = ledc_channel_config(&(pwm->pwm_attr)); in IoTPwmStart()
[all …]
/device/soc/rockchip/rk2206/adapter/hals/iot_hardware/wifiiot_lite/
Dhal_iot_pwm.c44 .pwm = {
59 .pwm = {.gpio = GPIO0_PB5,
73 .pwm = {
88 .pwm = {
103 .pwm = {
118 .pwm = {
133 .pwm = {
148 .pwm = {
163 .pwm = {
178 .pwm = {
[all …]
/device/soc/asrmicro/asr582x/liteos_m/sdk/drivers/driver/inc/
Dduet_pwm.h49 int32_t duet_pwm_init(duet_pwm_dev_t *pwm);
58 int32_t duet_pwm_start(duet_pwm_dev_t *pwm);
67 int32_t duet_pwm_stop(duet_pwm_dev_t *pwm);
77 int32_t duet_pwm_para_chg(duet_pwm_dev_t *pwm, duet_pwm_config_t para);
86 int32_t duet_pwm_finalize(duet_pwm_dev_t *pwm);
/device/board/talkweb/niobe407/applications/206_hdf_pwm/
DREADME_zh.md2 本示例将演示如何在Niobe407开发板上通过HDF驱动框架,使用TIM2和TIM3定时器模拟pwm进行输出。
18 [*] Enable HDF platform pwm driver
26 [HDF:I/HDF_LOG_TAG]open pwm 2 success!
30 [HDF:I/HDF_LOG_TAG]open pwm 3 success!
45 1. pwm open初始化函数:DevHandle PwmOpen(uint32_t num);
49 2. pwm close去初始化函数:void PwmClose(DevHandle handle);
51 handle: pwm设备句柄,
55 handle: pwm设备句柄,
85 pwm1 :: deviceNode { //pwm config
94 pwm2 :: deviceNode { //pwm config
[all …]
/device/soc/rockchip/common/sdk_linux/drivers/video/backlight/
Dpwm_bl.c23 struct pwm_device *pwm; member
45 pwm_get_state(pb->pwm, &state); in pwm_backlight_power_on()
56 pwm_apply_state(pb->pwm, &state); in pwm_backlight_power_on()
73 pwm_get_state(pb->pwm, &state); in pwm_backlight_power_off()
88 pwm_apply_state(pb->pwm, &state); in pwm_backlight_power_off()
100 pwm_get_state(pb->pwm, &state); in compute_duty_cycle()
125 pwm_get_state(pb->pwm, &state); in pwm_backlight_update_status()
127 pwm_apply_state(pb->pwm, &state); in pwm_backlight_update_status()
429 if (!pwm_is_enabled(pb->pwm)) { in pwm_backlight_initial_power_state()
517 pb->pwm = devm_pwm_get(&pdev->dev, NULL); in pwm_backlight_probe()
[all …]
/device/soc/st/common/platform/pwm/
Dstm32mp1_pwm.c183 int32_t HdfPwmSetConfig(struct PwmDev *pwm, struct PwmConfig *config) in HdfPwmSetConfig() argument
185 struct Mp1xxPwm *stm32mp1 = (struct Mp1xxPwm *)pwm; in HdfPwmSetConfig()
201 int32_t HdfPwmOpen(struct PwmDev *pwm) in HdfPwmOpen() argument
203 (void)pwm; in HdfPwmOpen()
207 int32_t HdfPwmClose(struct PwmDev *pwm) in HdfPwmClose() argument
209 (void)pwm; in HdfPwmClose()
302 struct PwmDev *pwm = NULL; in HdfPwmRelease() local
309 pwm = (struct PwmDev *)obj->service; in HdfPwmRelease()
310 if (pwm == NULL) { in HdfPwmRelease()
314 PwmDeviceRemove(obj, pwm); in HdfPwmRelease()
[all …]
/device/board/openvalley/niobeu4/liteos_m/hdf_drivers/pwm/
Dpwm_esp32u4.c50 static int32_t PwmDevSetConfig(struct PwmDev *pwm, struct PwmConfig *config);
51 static int32_t PwmDevOpen(struct PwmDev *pwm);
52 static int32_t PwmDevClose(struct PwmDev *pwm);
279 static int32_t PwmDevSetConfig(struct PwmDev *pwm, struct PwmConfig *config) in PwmDevSetConfig() argument
282 if (pwm == NULL || config == NULL) { in PwmDevSetConfig()
286 PwmDeviceConfig *pwmDevice = (PwmDeviceConfig *)PwmGetPriv(pwm); in PwmDevSetConfig()
319 static int32_t PwmDevOpen(struct PwmDev *pwm) in PwmDevOpen() argument
321 if (pwm == NULL) { in PwmDevOpen()
326 PwmDeviceConfig *pwmDevice = (PwmDeviceConfig *)PwmGetPriv(pwm); in PwmDevOpen()
334 static int32_t PwmDevClose(struct PwmDev *pwm) in PwmDevClose() argument
/device/soc/hisilicon/common/platform/pwm/
Dpwm_hi35xx.c88 int32_t HiPwmSetConfig(struct PwmDev *pwm, struct PwmConfig *config) in HiPwmSetConfig() argument
90 struct HiPwm *hp = (struct HiPwm *)pwm; in HiPwmSetConfig()
112 if (pwm->cfg.polarity != config->polarity && hp->supportPolarity) { in HiPwmSetConfig()
114 …HDF_LOGI("%s: [HiPwmSetPolarity] done, polarity: %hhu -> %hhu.", __func__, pwm->cfg.polarity, conf… in HiPwmSetConfig()
116 if (pwm->cfg.period != config->period) { in HiPwmSetConfig()
118 …HDF_LOGI("%s: [HiPwmSetPeriod] done, period: %u -> %u", __func__, pwm->cfg.period, config->period); in HiPwmSetConfig()
120 if (pwm->cfg.duty != config->duty) { in HiPwmSetConfig()
122 HDF_LOGI("%s: [HiPwmSetDuty] done, duty: %u -> %u", __func__, pwm->cfg.duty, config->duty); in HiPwmSetConfig()
/device/soc/hpmicro/sdk/hpm_sdk/drivers/src/
Dhpm_pwm_drv.c68 pwm_get_default_pwm_config(pwm_x, &config->pwm[0]); in pwm_get_default_pwm_pair_config()
69 pwm_get_default_pwm_config(pwm_x, &config->pwm[1]); in pwm_get_default_pwm_pair_config()
96 ch_config.invert_output = pwm_pair_config->pwm[0].invert_output; in pwm_setup_waveform_in_pair()
99 ch_config.invert_output = pwm_pair_config->pwm[1].invert_output; in pwm_setup_waveform_in_pair()
102 pwm_config_pwm(pwm_x, pwm_index, &pwm_pair_config->pwm[0], true); in pwm_setup_waveform_in_pair()
103 pwm_config_pwm(pwm_x, pwm_index + 1, &pwm_pair_config->pwm[1], true); in pwm_setup_waveform_in_pair()
/device/soc/amlogic/a311d/soc/arch/arm64/boot/dts/amlogic/
Dmeson-g12b-unionpi-tiger.dtsi11 compatible = "pwm-regulator";
21 pwm-dutycycle-range = <100 0>;
28 compatible = "pwm-regulator";
38 pwm-dutycycle-range = <100 0>;
Dmeson-g12-common.dtsi842 pwm_a_pins: pwm-a {
850 pwm_b_x7_pins: pwm-b-x7 {
858 pwm_b_x19_pins: pwm-b-x19 {
866 pwm_c_c_pins: pwm-c-c {
874 pwm_c_x5_pins: pwm-c-x5 {
882 pwm_c_x8_pins: pwm-c-x8 {
890 pwm_d_x3_pins: pwm-d-x3 {
898 pwm_d_x6_pins: pwm-d-x6 {
906 pwm_e_pins: pwm-e {
914 pwm_f_x_pins: pwm-f-x {
[all …]
/device/board/fnlink/hdf_drivers/pwm/
DBUILD.gn21 sources = [ "//drivers/hdf_core/adapter/platform/pwm/pwm_bes.c" ]
25 "//drivers/hdf_core/framework/support/platform/include/pwm",
26 "//drivers/hdf_core/adapter/platform/pwm",
/device/soc/rockchip/rk2206/hardware/docs/
DPWM.md81 ….pwm = {.gpio = GPIO0_PC3, .func = MUX_FUNC2, .type = PULL_DOWN, .drv = DRIVE_KEEP, .dir = GPIO_DI…
89 //初始化pwm
95 //启动pwm控制蜂鸣器,响铃3秒
/device/board/talkweb/niobe407/liteos_m/hdf_config/
Ddevice_info.hcs33 pwm1 :: deviceNode { // pwm config
42 pwm2 :: deviceNode { // pwm config
51 pwm7 :: deviceNode { // pwm config
/device/board/isoftstone/zhiyuan/kernel/driver/drivers/drm/sunxi_device/
Dsunxi_backlight.c407 struct pwm_config *pwm = &config->pwm; in sunxi_backlight_init() local
448 pwm_tmp = sunxi_backlight_get_same_pwm(lcd_id, pwm->lcd_pwm_ch); in sunxi_backlight_init()
452 lcd_id, pwm->lcd_pwm_ch); in sunxi_backlight_init()
456 pwm_info->channel = pwm->lcd_pwm_ch; in sunxi_backlight_init()
457 pwm_info->polarity = pwm->lcd_pwm_pol; in sunxi_backlight_init()
458 if (pwm->lcd_pwm_freq != 0) { in sunxi_backlight_init()
459 period_ns = 1000 * 1000 * 1000 / pwm->lcd_pwm_freq; in sunxi_backlight_init()
/device/board/isoftstone/zhiyuan/kernel/driver/drivers/video/sunxi/disp2/disp/
Ddisp_sys_intf.c458 __inf("disp_sys_pwm_free pwm %d\n", pwm_dev->pwm); in disp_sys_pwm_free()
475 __inf("disp_sys_pwm_Enable pwm %d\n", pwm_dev->pwm); in disp_sys_pwm_enable()
492 __inf("disp_sys_pwm_Disable pwm %d\n", pwm_dev->pwm); in disp_sys_pwm_disable()
510 pwm_dev->pwm, duty_ns, period_ns); in disp_sys_pwm_config()
532 pwm_dev->pwm, (polarity == 0) ? "high" : "low"); in disp_sys_pwm_set_polarity()
/device/soc/rockchip/rk3588/kernel/arch/arm64/boot/dts/rockchip/
Drk3588s.dtsi1711 pwm0: pwm@fd8b0000 {
1712 compatible = "rockchip,rk3588-pwm", "rockchip,rk3328-pwm";
1714 #pwm-cells = <3>;
1718 clock-names = "pwm", "pclk";
1722 pwm1: pwm@fd8b0010 {
1723 compatible = "rockchip,rk3588-pwm", "rockchip,rk3328-pwm";
1725 #pwm-cells = <3>;
1729 clock-names = "pwm", "pclk";
1733 pwm2: pwm@fd8b0020 {
1734 compatible = "rockchip,rk3588-pwm", "rockchip,rk3328-pwm";
[all …]

1234