mirror of
https://github.com/openharmony/drivers_framework.git
synced 2026-08-26 18:17:07 -04:00
fix: clear code alarm in platform source files.
Signed-off-by: jiaziyang <jiaziyang1@huawei.com>
This commit is contained in:
@@ -101,7 +101,7 @@ void GpioCntlrIrqCallback(struct GpioCntlr *cntlr, uint16_t local)
|
||||
}
|
||||
ginfo = &cntlr->ginfos[local];
|
||||
if (ginfo == NULL) {
|
||||
PLAT_LOGW("GpioCntlrIrqCallback: ginfo null(start:%u, local:%u)", cntlr->start, local);
|
||||
PLAT_LOGW("GpioCntlrIrqCallback: ginfo null(start:%hu, local:%hu)", cntlr->start, local);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ void GpioCntlrIrqCallback(struct GpioCntlr *cntlr, uint16_t local)
|
||||
irqRecord = ginfo->irqRecord;
|
||||
|
||||
if (irqRecord == NULL) {
|
||||
PLAT_LOGW("GpioCntlrIrqCallback: irq not set (start:%u, local:%u)", cntlr->start, local);
|
||||
PLAT_LOGW("GpioCntlrIrqCallback: irq not set (start:%hu, local:%hu)", cntlr->start, local);
|
||||
GpioInfoUnlock(ginfo);
|
||||
return;
|
||||
}
|
||||
@@ -137,7 +137,7 @@ static int32_t GpioCntlrIrqThreadHandler(void *data)
|
||||
}
|
||||
(void)OsalSpinLockIrqSave(&irqRecord->spin, &irqSave);
|
||||
(void)OsalSpinUnlockIrqRestore(&irqRecord->spin, &irqSave); // last post done
|
||||
PLAT_LOGI("GpioCntlrIrqThreadHandler: gpio(%u) thread exit", irqRecord->global);
|
||||
PLAT_LOGI("GpioCntlrIrqThreadHandler: gpio(%hu) thread exit", irqRecord->global);
|
||||
(void)OsalSemDestroy(&irqRecord->sem);
|
||||
(void)OsalSpinDestroy(&irqRecord->spin);
|
||||
(void)OsalThreadDestroy(&irqRecord->thread);
|
||||
@@ -159,7 +159,7 @@ static int32_t GpioCntlrSetIrqInner(struct GpioInfo *ginfo, struct GpioIrqRecord
|
||||
|
||||
if (ginfo->irqRecord != NULL) {
|
||||
GpioInfoUnlock(ginfo);
|
||||
PLAT_LOGE("GpioCntlrSetIrqInner: gpio(%u+%u) irq already set", cntlr->start, local);
|
||||
PLAT_LOGE("GpioCntlrSetIrqInner: gpio(%hu+%hu) irq already set", cntlr->start, local);
|
||||
return HDF_ERR_NOT_SUPPORT;
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ static int32_t GpioIrqRecordCreate(struct GpioInfo *ginfo, uint16_t mode, GpioIr
|
||||
PLAT_LOGE("GpioIrqRecordCreate: start irq thread failed:%d", ret);
|
||||
return ret;
|
||||
}
|
||||
PLAT_LOGI("GpioIrqRecordCreate: gpio(%u) thread started", GpioInfoToGlobal(ginfo));
|
||||
PLAT_LOGI("GpioIrqRecordCreate: gpio(%hu) thread started", GpioInfoToGlobal(ginfo));
|
||||
}
|
||||
|
||||
*new = irqRecord;
|
||||
@@ -269,13 +269,13 @@ int32_t GpioCntlrUnsetIrq(struct GpioCntlr *cntlr, uint16_t local, void *arg)
|
||||
GpioInfoLock(ginfo);
|
||||
if (ginfo->irqRecord == NULL) {
|
||||
GpioInfoUnlock(ginfo);
|
||||
PLAT_LOGE("GpioCntlrUnsetIrq: gpio(%u+%u) irq not set yet", cntlr->start, local);
|
||||
PLAT_LOGE("GpioCntlrUnsetIrq: gpio(%hu+%hu) irq not set yet", cntlr->start, local);
|
||||
return HDF_ERR_NOT_SUPPORT;
|
||||
}
|
||||
irqRecord = ginfo->irqRecord;
|
||||
if (arg != irqRecord->irqData) {
|
||||
GpioInfoUnlock(ginfo);
|
||||
PLAT_LOGE("GpioCntlrUnsetIrq: gpio(%u+%u) arg not match", cntlr->start, local);
|
||||
PLAT_LOGE("GpioCntlrUnsetIrq: gpio(%hu+%hu) arg not match", cntlr->start, local);
|
||||
return HDF_ERR_INVALID_PARAM;
|
||||
}
|
||||
ret = cntlr->ops->unsetIrq(cntlr, local);
|
||||
|
||||
@@ -14,18 +14,18 @@
|
||||
|
||||
#define PLAT_LOG_TAG gpio_if_u
|
||||
|
||||
static void *GpioManagerServiceGet(void)
|
||||
static struct HdfIoService *GpioManagerServiceGet(void)
|
||||
{
|
||||
static void *manager = NULL;
|
||||
static struct HdfIoService *service = NULL;
|
||||
|
||||
if (manager != NULL) {
|
||||
return manager;
|
||||
if (service != NULL) {
|
||||
return service;
|
||||
}
|
||||
manager = (void *)HdfIoServiceBind("HDF_PLATFORM_GPIO_MANAGER");
|
||||
if (manager == NULL) {
|
||||
service = HdfIoServiceBind("HDF_PLATFORM_GPIO_MANAGER");
|
||||
if (service == NULL) {
|
||||
HDF_LOGE("%s: fail to get gpio manager service!", __func__);
|
||||
}
|
||||
return manager;
|
||||
return service;
|
||||
}
|
||||
|
||||
int32_t GpioRead(uint16_t gpio, uint16_t *val)
|
||||
@@ -35,7 +35,7 @@ int32_t GpioRead(uint16_t gpio, uint16_t *val)
|
||||
struct HdfSBuf *data = NULL;
|
||||
struct HdfSBuf *reply = NULL;
|
||||
|
||||
service = (struct HdfIoService *)GpioManagerServiceGet();
|
||||
service = GpioManagerServiceGet();
|
||||
if (service == NULL || service->dispatcher == NULL || service->dispatcher->Dispatch == NULL) {
|
||||
HDF_LOGE("%s: get gpio manager service fail!", __func__);
|
||||
return HDF_PLT_ERR_DEV_GET;
|
||||
@@ -87,7 +87,7 @@ int32_t GpioWrite(uint16_t gpio, uint16_t val)
|
||||
struct HdfIoService *service = NULL;
|
||||
struct HdfSBuf *data = NULL;
|
||||
|
||||
service = (struct HdfIoService *)GpioManagerServiceGet();
|
||||
service = GpioManagerServiceGet();
|
||||
if (service == NULL || service->dispatcher == NULL || service->dispatcher->Dispatch == NULL) {
|
||||
HDF_LOGE("%s: get gpio manager service fail!", __func__);
|
||||
return HDF_PLT_ERR_DEV_GET;
|
||||
@@ -134,7 +134,7 @@ int32_t GpioGetDir(uint16_t gpio, uint16_t *dir)
|
||||
return HDF_ERR_INVALID_OBJECT;
|
||||
}
|
||||
|
||||
service = (struct HdfIoService *)GpioManagerServiceGet();
|
||||
service = GpioManagerServiceGet();
|
||||
if (service == NULL || service->dispatcher == NULL || service->dispatcher->Dispatch == NULL) {
|
||||
HDF_LOGE("%s: get gpio manager service fail!", __func__);
|
||||
return HDF_PLT_ERR_DEV_GET;
|
||||
@@ -186,7 +186,7 @@ int32_t GpioSetDir(uint16_t gpio, uint16_t dir)
|
||||
struct HdfIoService *service = NULL;
|
||||
struct HdfSBuf *data = NULL;
|
||||
|
||||
service = (struct HdfIoService *)GpioManagerServiceGet();
|
||||
service = GpioManagerServiceGet();
|
||||
if (service == NULL || service->dispatcher == NULL || service->dispatcher->Dispatch == NULL) {
|
||||
HDF_LOGE("%s: get gpio manager service fail!", __func__);
|
||||
return HDF_PLT_ERR_DEV_GET;
|
||||
@@ -225,10 +225,11 @@ int32_t GpioSetIrq(uint16_t gpio, uint16_t mode, GpioIrqFunc func, void *arg)
|
||||
int32_t ret;
|
||||
struct HdfIoService *service = NULL;
|
||||
struct HdfSBuf *data = NULL;
|
||||
|
||||
(void) func;
|
||||
(void) arg;
|
||||
|
||||
service = (struct HdfIoService *)GpioManagerServiceGet();
|
||||
service = GpioManagerServiceGet();
|
||||
if (service == NULL || service->dispatcher == NULL || service->dispatcher->Dispatch == NULL) {
|
||||
HDF_LOGE("%s: get gpio manager service fail!", __func__);
|
||||
return HDF_PLT_ERR_DEV_GET;
|
||||
@@ -268,8 +269,10 @@ int32_t GpioUnsetIrq(uint16_t gpio, void *arg)
|
||||
int32_t ret;
|
||||
struct HdfIoService *service = NULL;
|
||||
struct HdfSBuf *data = NULL;
|
||||
|
||||
(void) arg;
|
||||
service = (struct HdfIoService *)GpioManagerServiceGet();
|
||||
|
||||
service = GpioManagerServiceGet();
|
||||
if (service == NULL || service->dispatcher == NULL || service->dispatcher->Dispatch == NULL) {
|
||||
HDF_LOGE("%s: get gpio manager service fail!", __func__);
|
||||
return HDF_PLT_ERR_DEV_GET;
|
||||
@@ -304,7 +307,7 @@ int32_t GpioEnableIrq(uint16_t gpio)
|
||||
struct HdfIoService *service = NULL;
|
||||
struct HdfSBuf *data = NULL;
|
||||
|
||||
service = (struct HdfIoService *)GpioManagerServiceGet();
|
||||
service = GpioManagerServiceGet();
|
||||
if (service == NULL || service->dispatcher == NULL || service->dispatcher->Dispatch == NULL) {
|
||||
HDF_LOGE("%s: get gpio manager service fail!", __func__);
|
||||
return HDF_PLT_ERR_DEV_GET;
|
||||
@@ -339,7 +342,7 @@ int32_t GpioDisableIrq(uint16_t gpio)
|
||||
struct HdfIoService *service = NULL;
|
||||
struct HdfSBuf *data = NULL;
|
||||
|
||||
service = (struct HdfIoService *)GpioManagerServiceGet();
|
||||
service = GpioManagerServiceGet();
|
||||
if (service == NULL || service->dispatcher == NULL || service->dispatcher->Dispatch == NULL) {
|
||||
HDF_LOGE("%s: get gpio manager service fail!", __func__);
|
||||
return HDF_PLT_ERR_DEV_GET;
|
||||
|
||||
@@ -53,7 +53,7 @@ static int32_t GpioCntlrCheckStart(struct GpioCntlr *cntlr, struct DListHead *li
|
||||
if (cntlr->start >= (cntlrLast->start + cntlrLast->count)) {
|
||||
return HDF_SUCCESS;
|
||||
}
|
||||
PLAT_LOGE("GpioCntlrCheckStart: start:%u(%u) not available(lastStart:%u, lastCount:%u)",
|
||||
PLAT_LOGE("GpioCntlrCheckStart: start:%hu(%hu) not available(lastStart:%hu, lastCount:%hu)",
|
||||
cntlr->start, cntlr->count, cntlrLast->start, cntlrLast->count);
|
||||
return GPIO_NUM_MAX;
|
||||
}
|
||||
@@ -65,12 +65,12 @@ static int32_t GpioManagerAdd(struct PlatformManager *manager, struct PlatformDe
|
||||
|
||||
ret = GpioCntlrCheckStart(cntlr, &manager->devices);
|
||||
if (ret != HDF_SUCCESS) {
|
||||
PLAT_LOGE("GpioManagerAdd: start:%u(%u) invalid:%d", cntlr->start, cntlr->count, ret);
|
||||
PLAT_LOGE("GpioManagerAdd: start:%hu(%hu) invalid:%d", cntlr->start, cntlr->count, ret);
|
||||
return HDF_ERR_INVALID_PARAM;
|
||||
}
|
||||
|
||||
DListInsertTail(&device->node, &manager->devices);
|
||||
PLAT_LOGI("GpioManagerAdd: start:%u count:%u added success", cntlr->start, cntlr->count);
|
||||
PLAT_LOGI("GpioManagerAdd: start:%hu count:%hu added success", cntlr->start, cntlr->count);
|
||||
return HDF_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ static int32_t GpioCntlrCreateGpioInfos(struct GpioCntlr *cntlr)
|
||||
for (i = 0; i < cntlr->count; i++) {
|
||||
cntlr->ginfos[i].cntlr = cntlr;
|
||||
if (snprintf_s(cntlr->ginfos[i].name, GPIO_NAME_LEN, GPIO_NAME_LEN - 1,
|
||||
"GPIO%u+%u", cntlr->start, i) < 0) {
|
||||
"GPIO%hu+%hu", cntlr->start, i) < 0) {
|
||||
PLAT_LOGE("GpioCntlrCreateGpioInfos: format gpio name fail");
|
||||
ret = HDF_PLT_ERR_OS_API;
|
||||
goto ERROR_EXIT;
|
||||
@@ -155,7 +155,7 @@ int32_t GpioCntlrAdd(struct GpioCntlr *cntlr)
|
||||
}
|
||||
|
||||
if (cntlr->count == 0 || cntlr->count >= MAX_CNT_PER_CNTLR) {
|
||||
PLAT_LOGE("GpioCntlrAdd: invalid gpio count:%u", cntlr->count);
|
||||
PLAT_LOGE("GpioCntlrAdd: invalid gpio count:%hu", cntlr->count);
|
||||
return HDF_ERR_INVALID_PARAM;
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ struct GpioCntlr *GpioCntlrGetByGpio(uint16_t gpio)
|
||||
|
||||
device = PlatformManagerFindDevice(gpioMgr, (void *)(uintptr_t)gpio, GpioCntlrFindMatch);
|
||||
if (device == NULL) {
|
||||
PLAT_LOGE("GpioCntlrGetByGpio: gpio %u not in any controllers!", gpio);
|
||||
PLAT_LOGE("GpioCntlrGetByGpio: gpio %hu not in any controllers!", gpio);
|
||||
return NULL;
|
||||
}
|
||||
return CONTAINER_OF(device, struct GpioCntlr, device);
|
||||
|
||||
@@ -57,7 +57,7 @@ static int32_t HdmiEdidHeaderPhase(struct HdmiEdid *edid)
|
||||
|
||||
for (i = 0; i < HDMI_EDID_BLOCK_HEADER_FIELD_LEN; i++) {
|
||||
if (block->header[i] != g_edidHeader[i]) {
|
||||
HDF_LOGE("header[%d] = 0x%x, is error.", i, block->header[i]);
|
||||
HDF_LOGE("header[%u] = 0x%x, is error.", i, block->header[i]);
|
||||
return HDF_ERR_INVALID_PARAM;
|
||||
}
|
||||
}
|
||||
@@ -124,10 +124,10 @@ static int32_t HdmiEdidVersionInfoPhase(struct HdmiEdid *edid)
|
||||
sinkCap->verInfo.version = block->version;
|
||||
sinkCap->verInfo.revision = block->revision;
|
||||
if (sinkCap->verInfo.version != HDMI_EDID_VERSION_NUM) {
|
||||
HDF_LOGW("edid version is %d", sinkCap->verInfo.version);
|
||||
HDF_LOGW("edid version is %hhu", sinkCap->verInfo.version);
|
||||
}
|
||||
if (sinkCap->verInfo.revision != HDMI_EDID_REVISION_NUM) {
|
||||
HDF_LOGW("edid revision is %d", sinkCap->verInfo.revision);
|
||||
HDF_LOGW("edid revision is %hhu", sinkCap->verInfo.revision);
|
||||
}
|
||||
return HDF_SUCCESS;
|
||||
}
|
||||
@@ -139,7 +139,7 @@ static int32_t HdmiEdidBasicDispPhase(struct HdmiEdid *edid)
|
||||
|
||||
sinkCap->disp.width = block->width;
|
||||
sinkCap->disp.height = block->height;
|
||||
HDF_LOGI("width = %d, height = %d", block->width, block->height);
|
||||
HDF_LOGI("width = %hhu, height = %hhu", block->width, block->height);
|
||||
return HDF_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ static uint32_t HdmiEdidGetStandardTimingVertPixel(uint32_t aspectRatio, uint32_
|
||||
vertPixel = horizPixel * VIDEO_WIDTH_9 / VIDEO_LENGTH_16;
|
||||
break;
|
||||
default:
|
||||
HDF_LOGE("aspectRatio %d is invalid.", aspectRatio);
|
||||
HDF_LOGE("aspectRatio %u is invalid.", aspectRatio);
|
||||
break;
|
||||
}
|
||||
return vertPixel;
|
||||
@@ -310,7 +310,7 @@ static void HdmiEdidDetailedTimingDescriptorPhase(struct HdmiSinkDeviceCapabilit
|
||||
HDMI_ONE_BYTE_SHIFT) |
|
||||
(block->pixelClk[UINT8_ARRAY_TElEMENT_0]);
|
||||
if (pixelClock == 0) {
|
||||
HDF_LOGD(" pixel clock is 0. preTimingCnt = %d", cap->preTimingCnt);
|
||||
HDF_LOGD(" pixel clock is 0. preTimingCnt = %u", cap->preTimingCnt);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -387,9 +387,9 @@ static int32_t HdmiEdidExtBlockNumPhase(struct HdmiEdid *edid)
|
||||
struct HdmiSinkDeviceCapability *sinkCap = &(edid->sinkCap);
|
||||
|
||||
sinkCap->extBlockNum = edid->raw[HDMI_EDID_EXTENSION_BLOCK_ADDR];
|
||||
HDF_LOGD("edid extBlockNum = %d.", sinkCap->extBlockNum);
|
||||
HDF_LOGD("edid extBlockNum = %hhu.", sinkCap->extBlockNum);
|
||||
if (sinkCap->extBlockNum > (HDMI_EDID_MAX_BLOCK_NUM - 1)) {
|
||||
HDF_LOGW("ext block number %d is invallid.", sinkCap->extBlockNum);
|
||||
HDF_LOGW("ext block number %hhu is invallid.", sinkCap->extBlockNum);
|
||||
sinkCap->extBlockNum = HDMI_EDID_MAX_BLOCK_NUM - 1;
|
||||
}
|
||||
return HDF_SUCCESS;
|
||||
@@ -817,13 +817,13 @@ static void HdmiEdidHfVsdb21Phase(struct HdmiSinkDeviceCapability *sinkCap, uint
|
||||
static int32_t HdmiEdidHfVsdbPhase(struct HdmiSinkDeviceCapability *sinkCap, uint8_t *data, uint8_t len)
|
||||
{
|
||||
if (len < HDMI_EDID_EXTENSION_HFVSDB_MIN_INVALID_LEN) {
|
||||
HDF_LOGD("vsdb: data len %d is too short.", len);
|
||||
HDF_LOGD("vsdb: data len %hhu is too short.", len);
|
||||
return HDF_SUCCESS;
|
||||
}
|
||||
|
||||
/* byte3: Version */
|
||||
if (data[UINT8_ARRAY_TElEMENT_3] != HDMI_EDID_EXTENSION_HFVSDB_VERSION) {
|
||||
HDF_LOGD("vsdb: verdion %d is invalid.", data[UINT8_ARRAY_TElEMENT_3]);
|
||||
HDF_LOGD("vsdb: verdion %hhu is invalid.", data[UINT8_ARRAY_TElEMENT_3]);
|
||||
}
|
||||
/* byte4: Max_TMDS_Character_Rate */
|
||||
sinkCap->maxTmdsClk = data[UINT8_ARRAY_TElEMENT_4] * HDMI_EDID_EXTENSION_TMDS_FACTOR;
|
||||
@@ -1174,7 +1174,7 @@ static int32_t HdmiEdidExtDataBlockPhase(struct HdmiSinkDeviceCapability *sinkCa
|
||||
ret = HdmiEdidExtUseExtDataBlockPhase(sinkCap, data, len);
|
||||
break;
|
||||
default:
|
||||
HDF_LOGD("tag = %d is reserved or unphase block", tag);
|
||||
HDF_LOGD("tag = %hhu is reserved or unphase block", tag);
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
@@ -1186,7 +1186,8 @@ static void HdmiEdidExtSeveralDataBlockPhase(struct HdmiEdid *edid, uint8_t bloc
|
||||
struct HdmiSinkDeviceCapability *sinkCap = &(edid->sinkCap);
|
||||
uint8_t blkOffset = HDMI_EDID_EXTENSION_BLOCK_OFFSET;
|
||||
uint8_t dtdOffset = data[UINT8_ARRAY_TElEMENT_2];
|
||||
uint8_t dbTagCode, blkLen;
|
||||
uint8_t dbTagCode;
|
||||
uint8_t blkLen;
|
||||
int32_t ret;
|
||||
|
||||
data += blkOffset;
|
||||
@@ -1220,14 +1221,14 @@ static int32_t HdmiEdidExtBlockPhase(struct HdmiEdid *edid, uint8_t blockNum)
|
||||
int32_t ret;
|
||||
|
||||
if (blockNum >= HDMI_EDID_MAX_BLOCK_NUM) {
|
||||
HDF_LOGE("blockNum %d is invalid", blockNum);
|
||||
HDF_LOGE("blockNum %hhu is invalid", blockNum);
|
||||
return HDF_ERR_INVALID_PARAM;
|
||||
}
|
||||
|
||||
data += (blockNum * HDMI_EDID_SINGLE_BLOCK_SIZE);
|
||||
ret = HdmiEdidBlockCheckSum(data);
|
||||
if (ret != HDF_SUCCESS) {
|
||||
HDF_LOGE("edid block%d check sum fail.", blockNum);
|
||||
HDF_LOGE("edid block%hhu check sum fail.", blockNum);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1237,7 +1238,7 @@ static int32_t HdmiEdidExtBlockPhase(struct HdmiEdid *edid, uint8_t blockNum)
|
||||
}
|
||||
/* byte1: Extension Revision Number */
|
||||
if (data[UINT8_ARRAY_TElEMENT_1] != HDMI_EDID_CTA_EXTENSION3_REVISION) {
|
||||
HDF_LOGD("revision number is %d", data[UINT8_ARRAY_TElEMENT_1]);
|
||||
HDF_LOGD("revision number is %hhu", data[UINT8_ARRAY_TElEMENT_1]);
|
||||
}
|
||||
/*
|
||||
* byte2: Byte number offset d where 18-byte descriptors begin (typically Detailed Timing Descriptors).
|
||||
@@ -1245,7 +1246,7 @@ static int32_t HdmiEdidExtBlockPhase(struct HdmiEdid *edid, uint8_t blockNum)
|
||||
* descriptors are provided and no data is provided in the reserved data block collection.
|
||||
*/
|
||||
if (data[UINT8_ARRAY_TElEMENT_2] < HDMI_EDID_EXTENSION_D_INVALID_MIN_VAL) {
|
||||
HDF_LOGD("ext block%d no dtd", blockNum);
|
||||
HDF_LOGD("ext block%hhu no dtd", blockNum);
|
||||
return HDF_SUCCESS;
|
||||
}
|
||||
/* byte3: indication of underscan support, audio support, support of YCBCR and total number of native DTDs. */
|
||||
|
||||
@@ -74,7 +74,7 @@ void RegulatorNodeListPrint(void)
|
||||
}
|
||||
|
||||
DLIST_FOR_EACH_ENTRY_SAFE(pos, tmp, &manager->regulatorHead, struct RegulatorNode, node) {
|
||||
HDF_LOGI("RegulatorNodeListPrint: name[%s], [%d][%d][%d], [%d][%d]--[%d][%d]",
|
||||
HDF_LOGI("RegulatorNodeListPrint: name[%s], [%u][%hhu][%hhu], [%u][%u]--[%u][%u]",
|
||||
pos->regulatorInfo.name, pos->regulatorInfo.status,
|
||||
pos->regulatorInfo.constraints.alwaysOn, pos->regulatorInfo.constraints.mode,
|
||||
pos->regulatorInfo.constraints.minUv, pos->regulatorInfo.constraints.maxUv,
|
||||
@@ -346,7 +346,7 @@ int32_t RegulatorNodeStatusCb(struct RegulatorNode *node)
|
||||
|
||||
info.status = node->regulatorInfo.status;
|
||||
info.name = node->regulatorInfo.name;
|
||||
HDF_LOGI("%s: Cb %s %d", __func__, info.name, info.status);
|
||||
HDF_LOGI("%s: Cb %s %u", __func__, info.name, info.status);
|
||||
|
||||
return node->regulatorInfo.cb(&info);
|
||||
}
|
||||
@@ -394,7 +394,7 @@ int32_t RegulatorNodeDisable(struct RegulatorNode *node)
|
||||
{
|
||||
CHECK_NULL_PTR_RETURN_VALUE(node, HDF_ERR_INVALID_PARAM);
|
||||
if ((node->regulatorInfo.status == REGULATOR_STATUS_OFF) || (node->regulatorInfo.constraints.alwaysOn)) {
|
||||
HDF_LOGI("RegulatorNodeDisable: %s [%d][%d], unsatisfied closing adjusment",
|
||||
HDF_LOGI("RegulatorNodeDisable: %s [%u][%hhu], unsatisfied closing adjusment",
|
||||
node->regulatorInfo.name, node->regulatorInfo.status, node->regulatorInfo.constraints.alwaysOn);
|
||||
return HDF_SUCCESS;
|
||||
}
|
||||
@@ -512,7 +512,7 @@ int32_t RegulatorNodeSetVoltage(struct RegulatorNode *node, uint32_t minUv, uint
|
||||
if ((minUv > maxUv) ||
|
||||
(minUv < node->regulatorInfo.constraints.minUv ||
|
||||
maxUv > node->regulatorInfo.constraints.maxUv)) {
|
||||
HDF_LOGE("RegulatorNodeSetVoltage: %s Uv [%d, %d] invalid!",
|
||||
HDF_LOGE("RegulatorNodeSetVoltage: %s Uv [%u, %u] invalid!",
|
||||
node->regulatorInfo.name, minUv, maxUv);
|
||||
return HDF_FAILURE;
|
||||
}
|
||||
@@ -542,7 +542,7 @@ int32_t RegulatorNodeGetVoltage(struct RegulatorNode *node, uint32_t *voltage)
|
||||
CHECK_NULL_PTR_RETURN_VALUE(voltage, HDF_ERR_INVALID_PARAM);
|
||||
|
||||
if (node->regulatorInfo.constraints.mode != REGULATOR_CHANGE_VOLTAGE) {
|
||||
HDF_LOGE("RegulatorNodeSetVoltage: %s mode %d invalid!",
|
||||
HDF_LOGE("RegulatorNodeSetVoltage: %s mode %hhu invalid!",
|
||||
node->regulatorInfo.name, node->regulatorInfo.constraints.mode);
|
||||
return HDF_FAILURE;
|
||||
}
|
||||
@@ -560,7 +560,7 @@ int32_t RegulatorNodeSetCurrent(struct RegulatorNode *node, uint32_t minUA, uint
|
||||
{
|
||||
CHECK_NULL_PTR_RETURN_VALUE(node, HDF_ERR_INVALID_PARAM);
|
||||
if (node->regulatorInfo.constraints.mode != REGULATOR_CHANGE_CURRENT) {
|
||||
HDF_LOGE("RegulatorNodeSetVoltage: %s mode %d invalid!",
|
||||
HDF_LOGE("RegulatorNodeSetVoltage: %s mode %hhu invalid!",
|
||||
node->regulatorInfo.name, node->regulatorInfo.constraints.mode);
|
||||
return HDF_FAILURE;
|
||||
}
|
||||
@@ -600,7 +600,7 @@ int32_t RegulatorNodeGetCurrent(struct RegulatorNode *node, uint32_t *regCurrent
|
||||
CHECK_NULL_PTR_RETURN_VALUE(node, HDF_ERR_INVALID_OBJECT);
|
||||
CHECK_NULL_PTR_RETURN_VALUE(regCurrent, HDF_ERR_INVALID_OBJECT);
|
||||
if (node->regulatorInfo.constraints.mode != REGULATOR_CHANGE_CURRENT) {
|
||||
HDF_LOGE("RegulatorNodeGetCurrent: %s mode %d invalid!",
|
||||
HDF_LOGE("RegulatorNodeGetCurrent: %s mode %hhu invalid!",
|
||||
node->regulatorInfo.name, node->regulatorInfo.constraints.mode);
|
||||
return HDF_FAILURE;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ int32_t RegulatorSetVoltage(DevHandle handle, uint32_t minUv, uint32_t maxUv)
|
||||
}
|
||||
|
||||
if (minUv > maxUv) {
|
||||
HDF_LOGE("RegulatorSetVoltage: %s Uv [%d, %d] invalid!",
|
||||
HDF_LOGE("RegulatorSetVoltage: %s Uv [%u, %u] invalid!",
|
||||
node->regulatorInfo.name, minUv, maxUv);
|
||||
return HDF_FAILURE;
|
||||
}
|
||||
@@ -133,7 +133,7 @@ int32_t RegulatorSetCurrent(DevHandle handle, uint32_t minUa, uint32_t maxUa)
|
||||
}
|
||||
|
||||
if (minUa > maxUa) {
|
||||
HDF_LOGE("RegulatorSetCurrent: %s Ua [%d, %d] invalid!",
|
||||
HDF_LOGE("RegulatorSetCurrent: %s Ua [%u, %u] invalid!",
|
||||
node->regulatorInfo.name, minUa, maxUa);
|
||||
return HDF_FAILURE;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ static int32_t SpiMsgWriteArray(struct SpiObject *object, struct HdfSBuf *data,
|
||||
}
|
||||
|
||||
if (!HdfSbufWriteBuffer(data, (uint8_t *)msgs[i].wbuf, msgs[i].len)) {
|
||||
HDF_LOGE("%s: write msg[%d] buf failed!", __func__, i);
|
||||
HDF_LOGE("%s: write msg[%u] buf failed!", __func__, i);
|
||||
return HDF_ERR_IO;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user