Lines Matching refs:priv
40 struct VibratorDevice *priv = GetVibratorDevicePriv(); in SendVibratorMsg() local
42 CHECK_NULL_PTR_RETURN_VALUE(priv, HDF_FAILURE); in SendVibratorMsg()
43 CHECK_NULL_PTR_RETURN_VALUE(priv->ioService, HDF_FAILURE); in SendVibratorMsg()
44 CHECK_NULL_PTR_RETURN_VALUE(priv->ioService->dispatcher, HDF_FAILURE); in SendVibratorMsg()
45 CHECK_NULL_PTR_RETURN_VALUE(priv->ioService->dispatcher->Dispatch, HDF_FAILURE); in SendVibratorMsg()
47 int32_t ret = priv->ioService->dispatcher->Dispatch(&priv->ioService->object, cmd, msg, reply); in SendVibratorMsg()
56 static int32_t ReadVibratorInfo(struct HdfSBuf *reply, struct VibratorDevice *priv) in ReadVibratorInfo() argument
58 CHECK_NULL_PTR_RETURN_VALUE(priv, HDF_FAILURE); in ReadVibratorInfo()
72 …if (memcpy_s(&priv->vibratorInfoEntry, sizeof(priv->vibratorInfoEntry), buf, sizeof(*buf)) != EOK)… in ReadVibratorInfo()
87 struct VibratorDevice *priv = GetVibratorDevicePriv(); in GetVibratorInfo() local
89 CHECK_NULL_PTR_RETURN_VALUE(priv, HDF_FAILURE); in GetVibratorInfo()
91 (void)OsalMutexLock(&priv->mutex); in GetVibratorInfo()
95 (void)OsalMutexUnlock(&priv->mutex); in GetVibratorInfo()
103 (void)OsalMutexUnlock(&priv->mutex); in GetVibratorInfo()
107 if (ReadVibratorInfo(reply, priv) != HDF_SUCCESS) { in GetVibratorInfo()
109 (void)OsalMutexUnlock(&priv->mutex); in GetVibratorInfo()
114 (void)OsalMutexUnlock(&priv->mutex); in GetVibratorInfo()
116 *vibratorInfo = &priv->vibratorInfoEntry; in GetVibratorInfo()
123 struct VibratorDevice *priv = GetVibratorDevicePriv(); in ValidityJudgment() local
124 CHECK_NULL_PTR_RETURN_VALUE(priv, HDF_FAILURE); in ValidityJudgment()
130 …if ((priv->vibratorInfoEntry.isSupportIntensity == 0) || (intensity < priv->vibratorInfoEntry.inte… in ValidityJudgment()
131 (intensity > priv->vibratorInfoEntry.intensityMaxValue)) { in ValidityJudgment()
136 …if ((priv->vibratorInfoEntry.isSupportFrequency == 0) || (frequency < priv->vibratorInfoEntry.freq… in ValidityJudgment()
137 (frequency > priv->vibratorInfoEntry.frequencyMaxValue)) { in ValidityJudgment()
148 struct VibratorDevice *priv = GetVibratorDevicePriv(); in EnableVibratorModulation() local
156 (void)OsalMutexLock(&priv->mutex); in EnableVibratorModulation()
160 (void)OsalMutexUnlock(&priv->mutex); in EnableVibratorModulation()
167 (void)OsalMutexUnlock(&priv->mutex); in EnableVibratorModulation()
174 (void)OsalMutexUnlock(&priv->mutex); in EnableVibratorModulation()
181 (void)OsalMutexUnlock(&priv->mutex); in EnableVibratorModulation()
189 (void)OsalMutexUnlock(&priv->mutex); in EnableVibratorModulation()
197 struct VibratorDevice *priv = GetVibratorDevicePriv(); in StartOnce() local
198 CHECK_NULL_PTR_RETURN_VALUE(priv, HDF_FAILURE); in StartOnce()
200 (void)OsalMutexLock(&priv->mutex); in StartOnce()
204 (void)OsalMutexUnlock(&priv->mutex); in StartOnce()
211 (void)OsalMutexUnlock(&priv->mutex); in StartOnce()
220 (void)OsalMutexUnlock(&priv->mutex); in StartOnce()
228 struct VibratorDevice *priv = GetVibratorDevicePriv(); in Start() local
229 CHECK_NULL_PTR_RETURN_VALUE(priv, HDF_FAILURE); in Start()
236 (void)OsalMutexLock(&priv->mutex); in Start()
241 (void)OsalMutexUnlock(&priv->mutex); in Start()
248 (void)OsalMutexUnlock(&priv->mutex); in Start()
257 (void)OsalMutexUnlock(&priv->mutex); in Start()
283 struct VibratorDevice *priv = GetVibratorDevicePriv(); in Stop() local
284 CHECK_NULL_PTR_RETURN_VALUE(priv, HDF_FAILURE); in Stop()
286 (void)OsalMutexLock(&priv->mutex); in Stop()
290 (void)OsalMutexUnlock(&priv->mutex); in Stop()
297 (void)OsalMutexUnlock(&priv->mutex); in Stop()
306 (void)OsalMutexUnlock(&priv->mutex); in Stop()
334 struct VibratorDevice *priv = GetVibratorDevicePriv(); in NewVibratorInterfaceInstance() local
336 if (priv == NULL) { in NewVibratorInterfaceInstance()
339 if (priv->initState) { in NewVibratorInterfaceInstance()
343 OsalMutexInit(&priv->mutex); in NewVibratorInterfaceInstance()
354 priv->ioService = HdfIoServiceBind(VIBRATOR_SERVICE_NAME); in NewVibratorInterfaceInstance()
355 if (priv->ioService == NULL) { in NewVibratorInterfaceInstance()
357 OsalMutexDestroy(&priv->mutex); in NewVibratorInterfaceInstance()
361 priv->initState = true; in NewVibratorInterfaceInstance()
368 struct VibratorDevice *priv = GetVibratorDevicePriv(); in FreeVibratorInterfaceInstance() local
370 CHECK_NULL_PTR_RETURN_VALUE(priv, HDF_FAILURE); in FreeVibratorInterfaceInstance()
372 if (!priv->initState) { in FreeVibratorInterfaceInstance()
377 if (priv->ioService != NULL) { in FreeVibratorInterfaceInstance()
378 HdfIoServiceRecycle(priv->ioService); in FreeVibratorInterfaceInstance()
381 OsalMutexDestroy(&priv->mutex); in FreeVibratorInterfaceInstance()