本文整理汇总了C++中pr_dbg函数的典型用法代码示例。如果您正苦于以下问题:C++ pr_dbg函数的具体用法?C++ pr_dbg怎么用?C++ pr_dbg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pr_dbg函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: gx1001_set_frontend
static int gx1001_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_parameters *p)
{
struct gx1001_state *state = fe->demodulator_priv;
demod_connect(state, p->frequency,p->u.qam.modulation,p->u.qam.symbol_rate);
state->freq=p->frequency;
state->mode=p->u.qam.modulation ;
state->symbol_rate=p->u.qam.symbol_rate; //these data will be writed to eeprom
pr_dbg("gx1001=>frequency=%d,symbol_rate=%d\r\n",p->frequency,p->u.qam.symbol_rate);
return 0;
}
示例2: dib7090_fe_release
static void dib7090_fe_release(struct aml_dvb *advb, struct aml_fe *fe)
{
if(fe && fe->fe) {
pr_dbg("release fe Dib7090 %d\n", fe->id);
dvb_unregister_frontend(fe->fe);
dvb_frontend_detach(fe->fe);
dib7090_fe_cfg_put(fe->cfg);
fe->fe = NULL;
fe->cfg = NULL;
fe->id = -1;
}
}
示例3: demod_check_locked
int demod_check_locked(unsigned char* lock)
{
if(CXD2837_GetTPLock(cxd2837)==SONY_RESULT_OK)
{
pr_dbg("demod_check_locked !!\n");
*lock =1;
return 1;
}
*lock =0;
return 0;
}
示例4: rdma_rm_modify_qp
int rdma_rm_modify_qp(RdmaDeviceResources *dev_res, RdmaBackendDev *backend_dev,
uint32_t qp_handle, uint32_t attr_mask,
union ibv_gid *dgid, uint32_t dqpn,
enum ibv_qp_state qp_state, uint32_t qkey,
uint32_t rq_psn, uint32_t sq_psn)
{
RdmaRmQP *qp;
int ret;
pr_dbg("qpn=%d\n", qp_handle);
qp = rdma_rm_get_qp(dev_res, qp_handle);
if (!qp) {
return -EINVAL;
}
pr_dbg("qp_type=%d\n", qp->qp_type);
pr_dbg("attr_mask=0x%x\n", attr_mask);
if (qp->qp_type == IBV_QPT_SMI) {
pr_dbg("QP0 unsupported\n");
return -EPERM;
} else if (qp->qp_type == IBV_QPT_GSI) {
pr_dbg("QP1\n");
return 0;
}
if (attr_mask & IBV_QP_STATE) {
qp->qp_state = qp_state;
pr_dbg("qp_state=%d\n", qp->qp_state);
if (qp->qp_state == IBV_QPS_INIT) {
ret = rdma_backend_qp_state_init(backend_dev, &qp->backend_qp,
qp->qp_type, qkey);
if (ret) {
return -EIO;
}
}
if (qp->qp_state == IBV_QPS_RTR) {
ret = rdma_backend_qp_state_rtr(backend_dev, &qp->backend_qp,
qp->qp_type, dgid, dqpn, rq_psn,
qkey, attr_mask & IBV_QP_QKEY);
if (ret) {
return -EIO;
}
}
if (qp->qp_state == IBV_QPS_RTS) {
ret = rdma_backend_qp_state_rts(&qp->backend_qp, qp->qp_type,
sq_psn, qkey,
attr_mask & IBV_QP_QKEY);
if (ret) {
return -EIO;
}
}
}
return 0;
}
示例5: killer
/*
* killer()
* this continually stops and continues the runner process
*/
static void killer(
const char *name,
const pid_t pid,
uint64_t *counter,
const uint64_t max_ops)
{
double start = time_now();
uint64_t last_counter = *counter;
pr_dbg(stderr, "%s: wait: killer started [%d]\n", name, getpid());
do {
(void)kill(pid, SIGSTOP);
(void)kill(pid, SIGCONT);
/*
* The waits may be blocked and
* so the counter is not being updated.
* If it is blocked for too long bail out
* so we don't get stuck in the parent
* waiter indefintely.
*/
if (last_counter == *counter) {
if (time_now() - start > ABORT_TIMEOUT) {
pr_dbg(stderr, "%s: waits were blocked, "
"aborting\n", name);
break;
}
} else {
start = time_now();
last_counter = *counter;
}
} while (opt_do_run && (!max_ops || *counter < max_ops));
/* forcefully kill runner, wait is in parent */
(void)kill(pid, SIGKILL);
/* tell parent to wake up! */
(void)kill(getppid(), SIGALRM);
exit(EXIT_SUCCESS);
}
示例6: cdx2834_fe_release
static void cdx2834_fe_release(struct aml_dvb *advb, struct aml_fe *fe)
{
if(fe && fe->fe) {
pr_dbg("release GX1001 frontend %d\n", fe->id);
dvb_unregister_frontend(fe->fe);
dvb_frontend_detach(fe->fe);
if(fe->cfg){
kfree(fe->cfg);
fe->cfg = NULL;
}
fe->id = -1;
}
}
示例7: file_exists
/**
* file_exists()
* @path: file to check.
* Determine if specified file exists.
*
* Returns: file type if @path exists, else 0.
**/
static int file_exists(const char *path)
{
struct stat st;
if (!path) {
pr_dbg("%s: empty path specified\n", __func__);
return 0;
}
if (stat(path, &st) < 0)
return 0;
return (st.st_mode & S_IFMT);
}
示例8: mxl101_fe_enter_mode
static int mxl101_fe_enter_mode(struct aml_fe *fe, int mode)
{
struct aml_fe_dev *dev = fe->dtv_demod;
pr_dbg("=========================demod init\r\n");
gpio_direction_output(dev->reset_gpio, dev->reset_value);
msleep(300);
gpio_direction_output(dev->reset_gpio, !dev->reset_value); //enable tuner power
msleep(200);
MxL101SF_Init(dev);
return 0;
}
示例9: res_tbl_get
void *rdma_rm_get_cqe_ctx(RdmaDeviceResources *dev_res, uint32_t cqe_ctx_id)
{
void **cqe_ctx;
cqe_ctx = res_tbl_get(&dev_res->cqe_ctx_tbl, cqe_ctx_id);
if (!cqe_ctx) {
return NULL;
}
pr_dbg("ctx=%p\n", *cqe_ctx);
return *cqe_ctx;
}
示例10: modify_qp
static int modify_qp(PVRDMADev *dev, union pvrdma_cmd_req *req,
union pvrdma_cmd_resp *rsp)
{
struct pvrdma_cmd_modify_qp *cmd = &req->modify_qp;
pr_dbg("qp_handle=%d\n", cmd->qp_handle);
memset(rsp, 0, sizeof(*rsp));
rsp->hdr.response = cmd->hdr.response;
rsp->hdr.ack = PVRDMA_CMD_MODIFY_QP_RESP;
rsp->hdr.err = rdma_rm_modify_qp(&dev->rdma_dev_res, &dev->backend_dev,
cmd->qp_handle, cmd->attr_mask,
(union ibv_gid *)&cmd->attrs.ah_attr.grh.dgid,
cmd->attrs.dest_qp_num,
(enum ibv_qp_state)cmd->attrs.qp_state,
cmd->attrs.qkey, cmd->attrs.rq_psn,
cmd->attrs.sq_psn);
pr_dbg("ret=%d\n", rsp->hdr.err);
return rsp->hdr.err;
}
示例11: AVL6211_Blindscan_Cancel
static int AVL6211_Blindscan_Cancel(struct dvb_frontend* fe)
{
blindstart=0;
printk(KERN_INFO "AVL6211_Blindscan_Cancel\n");
while(2!=blindstart){
pr_dbg("wait for scan exit\n");
msleep(100);
}
/*call do_exit() directly*/
dvbs2_task = NULL;
fe_use = NULL;
return 0;
}
示例12: cdx2834_fe_init
static int cdx2834_fe_init(struct aml_dvb *advb, struct platform_device *pdev, struct aml_fe *fe, int id)
{
struct dvb_frontend_ops *ops;
int ret;
struct resource *res;
struct cdx2834_fe_config *cfg;
char buf[32];
pr_dbg("init CDX2834 frontend %d\n", id);
cfg = kzalloc(sizeof(struct cdx2834_fe_config), GFP_KERNEL);
if (!cfg)
return -ENOMEM;
cfg->reset_pin = frontend_reset;
if(cfg->reset_pin==-1) {
snprintf(buf, sizeof(buf), "frontend%d_reset", id);
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, buf);
if (!res) {
pr_error("cannot get resource \"%s\"\n", buf);
ret = -EINVAL;
goto err_resource;
}
cfg->reset_pin = res->start;
}
cfg->i2c_id = frontend_i2c;
if(cfg->i2c_id==-1) {
snprintf(buf, sizeof(buf), "frontend%d_i2c", id);
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, buf);
if (!res) {
pr_error("cannot get resource \"%s\"\n", buf);
ret = -EINVAL;
goto err_resource;
}
cfg->i2c_id = res->start;
}
cfg->tuner_addr = frontend_tuner_addr;
if(cfg->tuner_addr==-1) {
snprintf(buf, sizeof(buf), "frontend%d_tuner_addr", id);
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, buf);
if (!res) {
pr_error("cannot get resource \"%s\"\n", buf);
ret = -EINVAL;
goto err_resource;
}
cfg->tuner_addr = res->start>>1;
}
示例13: cr_access_vmexit_handler
int32_t cr_access_vmexit_handler(struct acrn_vcpu *vcpu)
{
uint64_t reg;
uint32_t idx;
uint64_t exit_qual;
int32_t ret = 0;
exit_qual = vcpu->arch.exit_qualification;
idx = (uint32_t)vm_exit_cr_access_reg_idx(exit_qual);
ASSERT((idx <= 15U), "index out of range");
reg = vcpu_get_gpreg(vcpu, idx);
switch ((vm_exit_cr_access_type(exit_qual) << 4U) | vm_exit_cr_access_cr_num(exit_qual)) {
case 0x00UL:
/* mov to cr0 */
vcpu_set_cr0(vcpu, reg);
break;
case 0x04UL:
/* mov to cr4 */
vcpu_set_cr4(vcpu, reg);
break;
case 0x08UL:
/* mov to cr8 */
/* According to SDM 6.15 "Exception and interrupt Reference":
*
* set reserved bit in CR8 causes GP to guest
*/
if ((reg & ~0xFUL) != 0UL) {
pr_dbg("Invalid cr8 write operation from guest");
vcpu_inject_gp(vcpu, 0U);
break;
}
vlapic_set_cr8(vcpu_vlapic(vcpu), reg);
break;
case 0x18UL:
/* mov from cr8 */
reg = vlapic_get_cr8(vcpu_vlapic(vcpu));
vcpu_set_gpreg(vcpu, idx, reg);
break;
default:
ASSERT(false, "Unhandled CR access");
ret = -EINVAL;
break;
}
TRACE_2L(TRACE_VMEXIT_CR_ACCESS, vm_exit_cr_access_type(exit_qual),
vm_exit_cr_access_cr_num(exit_qual));
return ret;
}
示例14: adkeys_poll
static void adkeys_poll(struct adgpio_key_data *adkey)
{
int advol, i;
static struct adgpio_key *prev_keys = NULL;
static T_ad_check state = PLUGIN_INVALID;
static int is_change_flag = 0;
advol = adc1_read_ad5();
pr_dbg("poll: volatge: %d\n", advol);
for (i = 0; i < adkey->naddet; i++) {
if ((advol > adkey->addet[i].unpress_min)
&&(advol < adkey->addet[i].unpress_max)) {
adkey->keys = adkey->addet[i].fixkeys;
if ((prev_keys != adkey->keys) || (state != adkey->addet[i].plugdev)) {
prev_keys = adkey->keys;
state = adkey->addet[i].plugdev;
is_change_flag = 1;
} else {
is_change_flag = 0;
}
break;
}
}
if (is_change_flag) {
addetect_plugin_notify(state);
}
i = 0;
do {
if ((adkey->keys != NULL)
&& (advol > adkey->keys[i].min) && (advol < adkey->keys[i].max)) {
adkey->press = 1;
adkey->sync_me = 1;
adkey->keycode = adkey->keys[i].code;
adkey->loop = i;
break;
} else
adkey->press = 0;
i++;
} while(i < adkey->nkey);
if (adkey->sync_me) {
mod_timer(&adkey->timer,
jiffies + msecs_to_jiffies(adkey->debounce_interval));
}
}
示例15: smc_hw_read_atr
static int smc_hw_read_atr(smc_dev_t *smc)
{
char *ptr = smc->atr.atr;
int his_len, t, tnext = 0, only_t0 = 1, loop_cnt=0;
pr_dbg("read atr\n");
smc->atr.atr_len = 0;
if(smc_hw_get(smc, 2, 2000)<0)
goto end;
ptr++;
his_len = ptr[0]&0x0F;
do {
tnext = 0;
loop_cnt++;
if(ptr[0]&0x10) {
if(smc_hw_get(smc, 1, 1000)<0)
goto end;
}
if(ptr[0]&0x20) {
if(smc_hw_get(smc, 1, 1000)<0)
goto end;
}
if(ptr[0]&0x40) {
if(smc_hw_get(smc, 1, 1000)<0)
goto end;
}
if(ptr[0]&0x80) {
if(smc_hw_get(smc, 1, 1000)<0)
goto end;
ptr = &smc->atr.atr[smc->atr.atr_len-1];
t = ptr[0]&0x0F;
if(t) {
only_t0 = 0;
}
if(ptr[0]&0xF0) {
tnext = 1;
}
}
} while(tnext && loop_cnt<4);
if(!only_t0) his_len++;
smc_hw_get(smc, his_len, 1000);
return 0;
end:
return -EIO;
}