Home
last modified time | relevance | path

Searched refs:pwm (Results 1 - 18 of 18) sorted by relevance

/drivers/hdf_core/framework/support/platform/src/pwm/
H A Dpwm_core.c15 int32_t PwmDeviceGet(struct PwmDev *pwm) in PwmDeviceGet() argument
19 if (pwm == NULL) { in PwmDeviceGet()
20 HDF_LOGE("PwmDeviceGet: pwm is null!\n"); 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 in PwmDeviceGet()
44 PwmDevicePut(struct PwmDev *pwm) PwmDevicePut() argument
66 PwmDeviceSetConfig(struct PwmDev *pwm, struct PwmConfig *config) PwmDeviceSetConfig() argument
97 PwmDeviceGetConfig(struct PwmDev *pwm, struct PwmConfig *config) PwmDeviceGetConfig() argument
110 PwmSetPriv(struct PwmDev *pwm, void *priv) PwmSetPriv() argument
123 PwmGetPriv(const struct PwmDev *pwm) PwmGetPriv() argument
132 PwmUserSetConfig(struct PwmDev *pwm, struct HdfSBuf *data) PwmUserSetConfig() argument
153 PwmUserGetConfig(struct PwmDev *pwm, struct HdfSBuf *reply) PwmUserGetConfig() argument
178 struct PwmDev *pwm = NULL; PwmIoDispatch() local
201 PwmDeviceAdd(struct HdfDeviceObject *obj, struct PwmDev *pwm) PwmDeviceAdd() argument
221 PwmDeviceRemove(struct HdfDeviceObject *obj, struct PwmDev *pwm) PwmDeviceRemove() argument
[all...]
H A 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()
49 HDF_LOGE("PwmOpen: pwm is null!"); in PwmOpen()
53 ret = PwmDeviceGet((struct PwmDev *)pwm); in PwmOpen()
58 return (DevHandle)pwm; in PwmOpen()
192 struct PwmDev *pwm in PwmGetConfig() local
[all...]
H A 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()
54 HDF_LOGE("PwmOpen: pwm is null!"); in PwmOpen()
58 struct HdfIoService *service = (struct HdfIoService *)pwm; in PwmOpen()
61 PwmPutObjByPointer(pwm); in PwmOpen()
68 PwmPutObjByPointer(pwm); in PwmOpen()
[all...]
/drivers/hdf_core/adapter/khdf/linux/platform/pwm/
H A Dpwm_adapter.c4 * pwm driver adapter of linux
19 #include <linux/pwm.h>
27 static int32_t HdfPwmOpen(struct PwmDev *pwm) in HdfPwmOpen() argument
31 if (pwm == NULL) { in HdfPwmOpen()
32 HDF_LOGE("HdfPwmOpen: pwm is 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 in HdfPwmOpen()
48 HdfPwmClose(struct PwmDev *pwm) HdfPwmClose() argument
58 HdfPwmSetConfig(struct PwmDev *pwm, struct PwmConfig *config) HdfPwmSetConfig() argument
99 struct PwmDev *pwm = NULL; HdfPwmInit() local
135 struct PwmDev *pwm = NULL; HdfPwmRelease() local
[all...]
H A Dpwm_hi35xx_linux.c4 * pwm driver of hi35xx
23 #include <linux/pwm.h>
39 static int Hi35xxPwmApply(struct pwm_chip *chip, struct pwm_device *pwm, const struct pwm_state *state) 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, state->polarity); in Hi35xxPwmApply()
73 if (pwm->state.period != state->period) { in Hi35xxPwmApply()
75 HDF_LOGI("Hi35xxPwmApply: [HiPwmSetPeriod] done, period: %llu -> %llu!", pwm->state.period, state->period); in Hi35xxPwmApply()
77 if (pwm in Hi35xxPwmApply()
93 Hi35xxGetState(struct pwm_chip *chip, struct pwm_device *pwm, struct pwm_state *state) Hi35xxGetState() argument
[all...]
/drivers/hdf_core/framework/support/platform/include/pwm/
H A 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/
H A Dpwm_virtual.c13 #include "pwm/pwm_core.h"
26 int32_t VirtualPwmDeviceGet(struct PwmDev *pwm) in VirtualPwmDeviceGet() argument
28 if (pwm == NULL) { in VirtualPwmDeviceGet()
29 HDF_LOGE("VirtualPwmDeviceGet: pwm is null!"); in VirtualPwmDeviceGet()
35 int32_t VirtualPwmDevicePut(struct PwmDev *pwm) in VirtualPwmDevicePut() argument
37 if (pwm == NULL) { in VirtualPwmDevicePut()
38 HDF_LOGE("VirtualPwmDevicePut: pwm is null!"); in VirtualPwmDevicePut()
45 int32_t VirtualPwmSetConfig(struct PwmDev *pwm, struct PwmConfig *config) in VirtualPwmSetConfig() argument
47 if (pwm == NULL || config == NULL) { in VirtualPwmSetConfig()
48 HDF_LOGE("VirtualPwmSetConfig: pwm o in VirtualPwmSetConfig()
[all...]
/drivers/hdf_core/adapter/platform/pwm/
H A 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
[all...]
H A 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
[all...]
H A 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/framework/model/display/driver/
H A Dhdf_disp.h90 struct PwmCfg pwm; member
/drivers/hdf_core/framework/model/display/driver/lcdkit/
H A 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()
H A Dlcdkit_parse_config.c145 /* pwm setting */ in ParsePanelInfo()
147 PARSE_PANEL_SYMBOL(node, drsOps, "pwmDev", &info->pwm.dev); in ParsePanelInfo()
148 PARSE_PANEL_SYMBOL(node, drsOps, "pwmPeriod", &info->pwm.period); in ParsePanelInfo()
/drivers/hdf_core/adapter/khdf/linux/platform/
H A Dplatform.mk28 -I$(srctree)/drivers/hdf/framework/support/platform/include/pwm \
/drivers/hdf_core/adapter/khdf/liteos/
H A Dlite.mk73 HDF_INCLUDE += -I $(HDF_ROOT_DIR)/framework/support/platform/include/pwm
/drivers/hdf_core/adapter/khdf/liteos/platform/
H A DMakefile105 LOCAL_SRCS += $(HDF_FRAMEWORKS)/support/platform/src/pwm/pwm_if.c \
106 $(HDF_FRAMEWORKS)/support/platform/src/pwm/pwm_core.c
/drivers/hdf_core/framework/model/display/driver/adapter_soc/
H A Dhi35xx_disp.c122 /* pwm pin config */ in PwmPinMuxCfg()
133 HDF_LOGE("%s: not support pwm dev: %d", __func__, dev); in PwmPinMuxCfg()
286 PwmPinMuxCfg(info->pwm.dev); in Hi35xxHardWareInit()
/drivers/hdf_core/framework/model/display/driver/panel/
H A Dmipi_icn9700.c275 .pwm = { BLK_PWM1, PWM_MAX_PERIOD },

Completed in 8 milliseconds