Home
last modified time | relevance | path

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

12

/drivers/hdf_core/framework/support/platform/src/pwm/
Dpwm_core.c15 int32_t PwmDeviceGet(struct PwmDev *pwm) in PwmDeviceGet() argument
19 if (pwm == NULL) { in PwmDeviceGet()
24 (void)OsalSpinLock(&(pwm->lock)); in PwmDeviceGet()
25 if (pwm->busy) { in PwmDeviceGet()
26 (void)OsalSpinUnlock(&(pwm->lock)); in PwmDeviceGet()
27 HDF_LOGE("PwmDeviceGet: pwm%u is busy!", pwm->num); in PwmDeviceGet()
30 if (pwm->method != NULL && pwm->method->open != NULL) { in PwmDeviceGet()
31 ret = pwm->method->open(pwm); in PwmDeviceGet()
33 (void)OsalSpinUnlock(&(pwm->lock)); in PwmDeviceGet()
39 pwm->busy = true; in PwmDeviceGet()
[all …]
Dpwm_if.c21 void *pwm = NULL; in PwmGetDevByNum() local
33 pwm = (void *)DevSvcManagerClntGetService(name); in PwmGetDevByNum()
34 if (pwm == NULL) { in PwmGetDevByNum()
40 return pwm; in PwmGetDevByNum()
46 void *pwm = PwmGetDevByNum(num); in PwmOpen() local
48 if (pwm == NULL) { in PwmOpen()
53 ret = PwmDeviceGet((struct PwmDev *)pwm); in PwmOpen()
58 return (DevHandle)pwm; in PwmOpen()
192 struct PwmDev *pwm = NULL; in PwmGetConfig() local
202 pwm = (struct PwmDev *)handle; in PwmGetConfig()
[all …]
Dpwm_if_u.c21 void *pwm = NULL; in PwmGetDevByNum() local
29 pwm = (void *)HdfIoServiceBind(name); in PwmGetDevByNum()
30 if (pwm == NULL) { in PwmGetDevByNum()
35 return pwm; in PwmGetDevByNum()
51 void *pwm = PwmGetDevByNum(num); in PwmOpen() local
53 if (pwm == NULL) { in PwmOpen()
58 struct HdfIoService *service = (struct HdfIoService *)pwm; in PwmOpen()
61 PwmPutObjByPointer(pwm); in PwmOpen()
68 PwmPutObjByPointer(pwm); in PwmOpen()
72 return (DevHandle)pwm; in PwmOpen()
/drivers/hdf_core/adapter/khdf/linux/platform/pwm/
Dpwm_adapter.c27 static int32_t HdfPwmOpen(struct PwmDev *pwm) in HdfPwmOpen() argument
31 if (pwm == NULL) { in HdfPwmOpen()
35 device = pwm_request(pwm->num, NULL); in HdfPwmOpen()
37 HDF_LOGE("HdfPwmOpen: pwm_request pwm%d fail!", pwm->num); in HdfPwmOpen()
40 pwm->cfg.period = device->state.period; in HdfPwmOpen()
41 pwm->cfg.duty = device->state.duty_cycle; in HdfPwmOpen()
42 pwm->cfg.polarity = device->state.polarity; in HdfPwmOpen()
43 pwm->cfg.status = device->state.enabled ? PWM_ENABLE_STATUS : PWM_DISABLE_STATUS; in HdfPwmOpen()
44 pwm->priv = device; in HdfPwmOpen()
48 static int32_t HdfPwmClose(struct PwmDev *pwm) in HdfPwmClose() argument
[all …]
Dpwm_hi35xx_linux.c39 static int Hi35xxPwmApply(struct pwm_chip *chip, struct pwm_device *pwm, const struct pwm_state *st… in Hi35xxPwmApply() argument
41 static int Hi35xxPwmApply(struct pwm_chip *chip, struct pwm_device *pwm, struct pwm_state *state) in Hi35xxPwmApply()
47 if (hi35xxChip == NULL || pwm == NULL || state == NULL) { in Hi35xxPwmApply()
69 if (pwm->state.polarity != state->polarity) { in Hi35xxPwmApply()
71 …HDF_LOGI("Hi35xxPwmApply: [HiPwmSetPolarity] done, polarity: %u -> %u!", pwm->state.polarity, stat… in Hi35xxPwmApply()
73 if (pwm->state.period != state->period) { in Hi35xxPwmApply()
75 …HDF_LOGI("Hi35xxPwmApply: [HiPwmSetPeriod] done, period: %llu -> %llu!", pwm->state.period, state-… in Hi35xxPwmApply()
77 if (pwm->state.duty_cycle != state->duty_cycle) { in Hi35xxPwmApply()
79 …HDF_LOGI("Hi35xxPwmApply: [HiPwmSetDuty] done, duty: %llu -> %llu!", pwm->state.duty_cycle, state-… in Hi35xxPwmApply()
93 static void Hi35xxGetState(struct pwm_chip *chip, struct pwm_device *pwm, struct pwm_state *state) in Hi35xxGetState() argument
[all …]
DMakefile16 obj-$(CONFIG_DRIVERS_HDF_PLATFORM_PWM) += $(HDF_PLATFORM_FRAMEWORKS_ROOT)/src/pwm/pwm_core.o \
17 $(HDF_PLATFORM_FRAMEWORKS_ROOT)/src/pwm/pwm_if.o \
/drivers/hdf_core/framework/support/platform/include/pwm/
Dpwm_core.h27 int32_t (*setConfig)(struct PwmDev *pwm, struct PwmConfig *config);
28 int32_t (*open)(struct PwmDev *pwm);
29 int32_t (*close)(struct PwmDev *pwm);
43 int32_t PwmDeviceGet(struct PwmDev *pwm);
44 int32_t PwmDevicePut(struct PwmDev *pwm);
45 int32_t PwmDeviceSetConfig(struct PwmDev *pwm, struct PwmConfig *config);
46 int32_t PwmDeviceGetConfig(struct PwmDev *pwm, struct PwmConfig *config);
47 void *PwmGetPriv(const struct PwmDev *pwm);
48 int32_t PwmSetPriv(struct PwmDev *pwm, void *priv);
49 int32_t PwmDeviceAdd(struct HdfDeviceObject *obj, struct PwmDev *pwm);
[all …]
/drivers/hdf_core/framework/test/unittest/platform/virtual/
Dpwm_virtual.c26 int32_t VirtualPwmDeviceGet(struct PwmDev *pwm) in VirtualPwmDeviceGet() argument
28 if (pwm == NULL) { in VirtualPwmDeviceGet()
35 int32_t VirtualPwmDevicePut(struct PwmDev *pwm) in VirtualPwmDevicePut() argument
37 if (pwm == NULL) { in VirtualPwmDevicePut()
45 int32_t VirtualPwmSetConfig(struct PwmDev *pwm, struct PwmConfig *config) in VirtualPwmSetConfig() argument
47 if (pwm == NULL || config == NULL) { in VirtualPwmSetConfig()
64 pwm->cfg = *config; in VirtualPwmSetConfig()
/drivers/hdf_core/adapter/platform/pwm/
Dpwm_bes.c49 static int32_t PwmDevSetConfig(struct PwmDev *pwm, struct PwmConfig *config);
50 static int32_t PwmDevOpen(struct PwmDev *pwm);
51 static int32_t PwmDevClose(struct PwmDev *pwm);
278 static int32_t PwmDevSetConfig(struct PwmDev *pwm, struct PwmConfig *config) argument
284 if (pwm == NULL || config == NULL || (config->period > UNTIL_NAN0SECONDS)) {
289 prvPwm = (struct PwmDevice *)PwmGetPriv(pwm);
310 static int32_t PwmDevOpen(struct PwmDev *pwm) argument
312 if (pwm == NULL) {
320 static int32_t PwmDevClose(struct PwmDev *pwm) argument
325 if (pwm == NULL) {
[all …]
Dpwm_stm32f4xx.c137 static int32_t PwmDevSetConfig(struct PwmDev *pwm, struct PwmConfig *config);
138 static int32_t PwmDevOpen(struct PwmDev *pwm);
139 static int32_t PwmDevClose(struct PwmDev *pwm);
514 static int32_t PwmDevSetConfig(struct PwmDev *pwm, struct PwmConfig *config) argument
522 if (pwm == NULL || config == NULL || (config->period > PER_SEC_NSEC)) {
527 prvPwm = (struct PwmDevice *)PwmGetPriv(pwm);
560 static int32_t PwmDevOpen(struct PwmDev *pwm) argument
562 if (pwm == NULL) {
570 static int32_t PwmDevClose(struct PwmDev *pwm) argument
575 if (pwm == NULL) {
[all …]
Dpwm_wm.c29 static int32_t PwmDevSetConfig(struct PwmDev *pwm, struct PwmConfig *config);
35 static int32_t PwmDevSetConfig(struct PwmDev *pwm, struct PwmConfig *config) in PwmDevSetConfig() argument
41 if (pwm == NULL || config == NULL) { in PwmDevSetConfig()
46 prvPwm = (struct PwmDevice *)PwmGetPriv(pwm); in PwmDevSetConfig()
/drivers/hdf_core/adapter/khdf/linux/
DREADME_zh.md36 │ ├── pwm #pwm接口
DREADME.md36 │ ├── pwm # PWM APIs
/drivers/hdf_core/adapter/khdf/linux/platform/
DMakefile21 obj-$(CONFIG_DRIVERS_HDF_PLATFORM_PWM) += pwm/
DKconfig51 bool "Enable HDF platform pwm driver"
54 Answer Y to enable HDF platform pwm driver.
98 bool "hi35xx pwm driver"
101 Answer Y to enable hi35xx pwm driver
Dplatform.mk27 -I$(srctree)/drivers/hdf/framework/support/platform/include/pwm \
/drivers/hdf_core/adapter/platform/
DBUILD.gn15 "pwm",
/drivers/hdf_core/adapter/khdf/uniproton/platform/
DBUILD.gn68 "$HDF_FRAMEWORKS_PATH/support/platform/src/pwm/pwm_core.c",
69 "$HDF_FRAMEWORKS_PATH/support/platform/src/pwm/pwm_if.c",
137 include_dirs += [ "$HDF_FRAMEWORKS_PATH/support/platform/include/pwm" ]
/drivers/hdf_core/adapter/uhdf/platform/
DBUILD.gn37 "$hdf_framework_path/support/platform/include/pwm",
66 "$hdf_framework_path/support/platform/src/pwm/pwm_if_u.c",
/drivers/hdf_core/adapter/khdf/liteos_m/platform/
DBUILD.gn70 "$HDF_FRAMEWORKS_PATH/support/platform/src/pwm/pwm_core.c",
71 "$HDF_FRAMEWORKS_PATH/support/platform/src/pwm/pwm_if.c",
139 include_dirs += [ "$HDF_FRAMEWORKS_PATH/support/platform/include/pwm" ]
/drivers/hdf_core/framework/model/display/driver/lcdkit/
Dlite_lcdkit.c66 panelCfg->pwmHandle = PwmOpen(panelCfg->info.pwm.dev); in LcdkitInit()
207 duty = (level * panelCfg->info.pwm.period) / panelCfg->info.blk.maxLevel; in SetBacklightByPwm()
/drivers/hdf_core/framework/model/display/driver/
Dhdf_disp.h90 struct PwmCfg pwm; member
/drivers/hdf_core/adapter/uhdf2/platform/
DBUILD.gn42 "$HDF_FRAMEWORKS/support/platform/src/pwm/pwm_if_u.c",
/drivers/hdf_core/adapter/khdf/liteos/platform/
DBUILD.gn128 "$HDF_FRAMEWORKS_PATH/support/platform/src/pwm/pwm_core.c",
129 "$HDF_FRAMEWORKS_PATH/support/platform/src/pwm/pwm_if.c",
253 "$HDF_FRAMEWORKS_PATH/support/platform/include/pwm",
DMakefile105 LOCAL_SRCS += $(HDF_FRAMEWORKS)/support/platform/src/pwm/pwm_if.c \
106 $(HDF_FRAMEWORKS)/support/platform/src/pwm/pwm_core.c

12