本文整理汇总了C++中dev_vdbg函数的典型用法代码示例。如果您正苦于以下问题:C++ dev_vdbg函数的具体用法?C++ dev_vdbg怎么用?C++ dev_vdbg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dev_vdbg函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: show_proxim_data
/* Display proxim data */
static ssize_t show_proxim_data(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct iio_dev *indio_dev = dev_to_iio_dev(dev);
struct ltr558_chip *chip = iio_priv(indio_dev);
int prox_data = 0;
ssize_t buf_count = 0;
dev_vdbg(dev, "%s()\n", __func__);
mutex_lock(&chip->lock);
if (chip->is_prox_enable) {
prox_data = ltr558_ps_read(chip->client);
chip->prox_reading = prox_data;
buf_count = sprintf(buf, "%d\n", prox_data);
}
else
buf_count = sprintf(buf, "%d\n", chip->prox_reading);
mutex_unlock(&chip->lock);
return buf_count;
}
开发者ID:FrozenCow,项目名称:FIRE-ICE,代码行数:22,代码来源:ltr558als.c
示例2: cyttsp4_log_btn_data
static void cyttsp4_log_btn_data(struct cyttsp4_btn_data *bd)
{
struct device *dev = bd->dev;
struct cyttsp4_core_data *cd = dev_get_drvdata(dev);
u8 *pr_buf = cd->pr_buf;
struct cyttsp4_sysinfo *si = bd->si;
int cur;
int t;
for (cur = 0; cur < si->si_ofs.num_btns; cur++) {
pr_buf[0] = 0;
snprintf(pr_buf, CY_MAX_PRBUF_SIZE, "btn_rec[%d]=0x", cur);
/*for (t = 0; t < si->si_ofs.btn_rec_size; t++)
snprintf(pr_buf, CY_MAX_PRBUF_SIZE, "%s%02X",
pr_buf, si->btn_rec_data
[(cur * si->si_ofs.btn_rec_size) + t]);*/
dev_vdbg(dev, "%s: %s\n", __func__, pr_buf);
}
return;
}
开发者ID:GalaxyTab4,项目名称:android_kernel_samsung_matissewifi.bak,代码行数:21,代码来源:cyttsp4_btn.c
示例3: cyttsp4_btn_open
static int cyttsp4_btn_open(struct input_dev *input)
{
struct device *dev = input->dev.parent;
struct cyttsp4_core_data *cd = dev_get_drvdata(dev);
pm_runtime_get_sync(dev);
cd->number_of_open_input_device++;
cd->pm_runtime_usage_count++;
dev_vdbg(dev, "%s: setup subscriptions\n", __func__);
/* set up touch call back */
_cyttsp4_subscribe_attention(dev, CY_ATTEN_IRQ, CY_MODULE_BTN,
cyttsp4_btn_attention, CY_MODE_OPERATIONAL);
/* set up startup call back */
_cyttsp4_subscribe_attention(dev, CY_ATTEN_STARTUP, CY_MODULE_BTN,
cyttsp4_startup_attention, 0);
return 0;
}
开发者ID:GalaxyTab4,项目名称:android_kernel_samsung_matissewifi.bak,代码行数:21,代码来源:cyttsp4_btn.c
示例4: cyttsp4_xy_worker
/* read xy_data for all current CapSense button touches */
static int cyttsp4_xy_worker(struct cyttsp4_btn_data *bd)
{
struct device *dev = &bd->ttsp->dev;
struct cyttsp4_sysinfo *si = bd->si;
u8 rep_stat = si->xy_mode[si->si_ofs.rep_ofs + 1];
#ifdef VERBOSE_DEBUG
int rc;
#endif
/* rep_data for bad packet check */
if (IS_BAD_PKT(rep_stat)) {
dev_dbg(dev, "%s: Invalid buffer detected\n", __func__);
return 0;
}
/* extract button press/release touch information */
if (si->si_ofs.num_btns > 0) {
cyttsp4_get_btn_touches(bd);
#ifdef VERBOSE_DEBUG
/* read button diff data */
rc = cyttsp4_read(bd->ttsp, CY_MODE_OPERATIONAL,
si->si_ofs.tt_stat_ofs + 1 +
si->si_ofs.max_tchs * si->si_ofs.tch_rec_size,
si->btn_rec_data,
si->si_ofs.num_btns * si->si_ofs.btn_rec_size);
if (rc < 0) {
dev_err(dev, "%s: read fail on button regs r=%d\n",
__func__, rc);
return 0;
}
/* log button press/release touch information */
cyttsp4_log_btn_data(bd);
#endif
}
dev_vdbg(dev, "%s: done\n", __func__);
return 0;
}
开发者ID:XePeleato,项目名称:android_kernel_huawei_venus,代码行数:41,代码来源:cyttsp4_btn.c
示例5: cyttsp5_spi_xfer
static int cyttsp5_spi_xfer(u8 op, struct cyttsp5_spi *ts, u8 *buf, int length)
{
struct device *dev = &ts->client->dev;
struct spi_message msg;
struct spi_transfer xfer[2];
u8 w_header[2];
u8 r_header[2];
int rc;
memset(xfer, 0, sizeof(xfer));
spi_message_init(&msg);
cyttsp5_spi_add_rw_msg(&msg, &xfer[0], w_header, r_header, op);
switch (op) {
case CY_SPI_RD_OP:
xfer[1].rx_buf = buf;
xfer[1].len = length;
spi_message_add_tail(&xfer[1], &msg);
break;
case CY_SPI_WR_OP:
xfer[1].tx_buf = buf;
xfer[1].len = length;
spi_message_add_tail(&xfer[1], &msg);
break;
default:
rc = -EIO;
goto exit;
}
rc = spi_sync(ts->client, &msg);
exit:
if (rc < 0)
dev_vdbg(dev, "%s: spi_sync() error %d\n", __func__, rc);
if (r_header[0] != CY_SPI_SYNC_ACK)
return -EIO;
return rc;
}
开发者ID:98416,项目名称:Z7Max_NX505J_H129_kernel,代码行数:40,代码来源:cyttsp5_spi.c
示例6: ab8500_regulator_set_mode
static int ab8500_regulator_set_mode(struct regulator_dev *rdev,
unsigned int mode)
{
int ret = 0;
struct ab8500_regulator_info *info = rdev_get_drvdata(rdev);
if (info == NULL) {
dev_err(rdev_get_dev(rdev), "regulator info null pointer\n");
return -EINVAL;
}
switch (mode) {
case REGULATOR_MODE_NORMAL:
info->update_val = info->update_val_normal;
break;
case REGULATOR_MODE_IDLE:
info->update_val = info->update_val_idle;
break;
default:
return -EINVAL;
}
if (info->is_enabled) {
ret = abx500_mask_and_set_register_interruptible(info->dev,
info->update_bank, info->update_reg,
info->update_mask, info->update_val);
if (ret < 0)
dev_err(rdev_get_dev(rdev),
"couldn't set regulator mode\n");
dev_vdbg(rdev_get_dev(rdev),
"%s-set_mode (bank, reg, mask, value): "
"0x%x, 0x%x, 0x%x, 0x%x\n",
info->desc.name, info->update_bank, info->update_reg,
info->update_mask, info->update_val);
}
return ret;
}
开发者ID:krachlatte,项目名称:Sony-Xperia-Go-ST27i,代码行数:40,代码来源:ab8500.c
示例7: exynos_drd_switch_start_peripheral
static int exynos_drd_switch_start_peripheral(struct usb_otg *otg, int on)
{
int ret;
if (!otg->gadget)
return -EINVAL;
dev_dbg(otg->phy->dev, "Turn %s gadget %s\n",
on ? "on" : "off", otg->gadget->name);
/* Samsung KOR S/W GROUP kmato.kim for MDM*/
if (is_usb_locked) {
ret = usb_gadget_vbus_disconnect(otg->gadget);
pr_info("%s: Becuase MDM abnomal deleted, usb vbus disconnect \n",
__func__);
return ret;
}
if (on) {
/* Start device only if host is off */
if (!exynos_drd_switch_is_host_off(otg)) {
/*
* REVISIT: if host is not suspended shall we check
* runtime_error flag and clear it, if it is set?
* It will give an additional chance to the host
* to be suspended if runtime error happened.
*/
dev_vdbg(otg->phy->dev, "%s: host is still active\n",
__func__);
return -EAGAIN;
}
ret = usb_gadget_vbus_connect(otg->gadget);
} else {
ret = usb_gadget_vbus_disconnect(otg->gadget);
/* Currently always return 0 */
}
return ret;
}
开发者ID:Svard73,项目名称:SM-T700-T705-Kernel,代码行数:40,代码来源:exynos-drd-switch.c
示例8: cyttsp4_mt_process_touch
static void cyttsp4_mt_process_touch(struct cyttsp4_mt_data *md,
struct cyttsp4_touch *touch)
{
struct device *dev = md->dev;
int tmp;
bool flipped;
if (md->pdata->flags & CY_MT_FLAG_FLIP) {
tmp = touch->abs[CY_TCH_X];
touch->abs[CY_TCH_X] = touch->abs[CY_TCH_Y];
touch->abs[CY_TCH_Y] = tmp;
flipped = true;
} else
flipped = false;
if (md->pdata->flags & CY_MT_FLAG_INV_X) {
if (flipped)
touch->abs[CY_TCH_X] = md->si->si_ofs.max_y -
touch->abs[CY_TCH_X];
else
touch->abs[CY_TCH_X] = md->si->si_ofs.max_x -
touch->abs[CY_TCH_X];
}
if (md->pdata->flags & CY_MT_FLAG_INV_Y) {
if (flipped)
touch->abs[CY_TCH_Y] = md->si->si_ofs.max_x -
touch->abs[CY_TCH_Y];
else
touch->abs[CY_TCH_Y] = md->si->si_ofs.max_y -
touch->abs[CY_TCH_Y];
}
dev_vdbg(dev, "%s: flip=%s inv-x=%s inv-y=%s x=%04X(%d) y=%04X(%d)\n",
__func__, flipped ? "true" : "false",
md->pdata->flags & CY_MT_FLAG_INV_X ? "true" : "false",
md->pdata->flags & CY_MT_FLAG_INV_Y ? "true" : "false",
touch->abs[CY_TCH_X], touch->abs[CY_TCH_X],
touch->abs[CY_TCH_Y], touch->abs[CY_TCH_Y]);
}
开发者ID:GalaxyTab4,项目名称:android_kernel_samsung_matissewifi.bak,代码行数:39,代码来源:cyttsp4_mt_common.c
示例9: ux500_pd_amba_runtime_idle
static int ux500_pd_amba_runtime_idle(struct device *dev)
{
int (*callback)(struct device *) = NULL;
int ret;
dev_vdbg(dev, "%s()\n", __func__);
/*
* Do not bypass AMBA bus runtime functions by calling generic runtime
* directly. A future fix could be to implement a
* "pm_bus_generic_runtime_*" API which we can use instead.
*/
if (dev->bus && dev->bus->pm)
callback = dev->bus->pm->runtime_idle;
if (callback)
ret = callback(dev);
else
ret = pm_generic_runtime_idle(dev);
return ret;
}
开发者ID:1DeMaCr,项目名称:Codina_Kernel-3.x,代码行数:22,代码来源:runtime.c
示例10: exynos_drd_switch_start_peripheral
static int exynos_drd_switch_start_peripheral(struct usb_otg *otg, int on)
{
int ret;
if (!otg->gadget)
return -EINVAL;
dev_dbg(otg->phy->dev, "Turn %s gadget %s\n",
on ? "on" : "off", otg->gadget->name);
#ifdef CONFIG_TARGET_LOCALE_KOR
if (is_usb_locked) {
ret = usb_gadget_vbus_disconnect(otg->gadget);
return ret;
}
#endif
if (on) {
/* Start device only if host is off */
if (!exynos_drd_switch_is_host_off(otg)) {
/*
* REVISIT: if host is not suspended shall we check
* runtime_error flag and clear it, if it is set?
* It will give an additional chance to the host
* to be suspended if runtime error happened.
*/
dev_vdbg(otg->phy->dev, "%s: host is still active\n",
__func__);
return -EAGAIN;
}
ret = usb_gadget_vbus_connect(otg->gadget);
} else {
ret = usb_gadget_vbus_disconnect(otg->gadget);
/* Currently always return 0 */
}
return ret;
}
开发者ID:android-armv7a-belalang-tempur,项目名称:Adam-Kernel-GS4,代码行数:39,代码来源:exynos-drd-switch.c
示例11: cyttsp5_command_store
static ssize_t cyttsp5_command_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t size)
{
struct cyttsp5_device_access_data *dad
= cyttsp5_get_device_access_data(dev);
ssize_t length;
int rc;
mutex_lock(&dad->sysfs_lock);
dad->status = 0;
dad->response_length = 0;
length = cyttsp5_ic_parse_input(dev, buf, size, dad->ic_buf,
CY_MAX_PRBUF_SIZE);
if (length <= 0) {
dev_err(dev, "%s: %s Group Data store\n", __func__,
"Malformed input for");
goto exit;
}
/* write ic_buf to log */
cyttsp5_pr_buf(dev, dad->pr_buf, dad->ic_buf, length, "ic_buf");
//pm_runtime_get_sync(dev);
rc = cmd->cmd->user_cmd(dev, 1, CY_MAX_PRBUF_SIZE,
dad->response_buf, length, dad->ic_buf,
&dad->response_length);
//pm_runtime_put(dev);
if (rc) {
dad->response_length = 0;
dev_err(dev, "%s: Failed to store command\n", __func__);
} else {
dad->status = 1;
}
exit:
mutex_unlock(&dad->sysfs_lock);
dev_vdbg(dev, "%s: return size=%d\n", __func__, size);
return size;
}
开发者ID:vikrant82,项目名称:t320_kernel,代码行数:39,代码来源:cyttsp5_device_access.c
示例12: store_als_persist
static ssize_t store_als_persist(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
struct iio_dev *indio_dev = dev_get_drvdata(dev);
struct isl29028_chip *chip = iio_priv(indio_dev);
unsigned long lval;
dev_vdbg(dev, "%s()\n", __func__);
if (strict_strtoul(buf, 10, &lval))
return -EINVAL;
if ((lval > 16) || (lval < 0x0)) {
dev_err(dev, "The als persist is not supported\n");
return -EINVAL;
}
mutex_lock(&chip->lock);
chip->als_persist = (int)lval;
mutex_unlock(&chip->lock);
return count;
}
开发者ID:Mrchenkeyu,项目名称:android_kernel_zte_pluto,代码行数:22,代码来源:isl29028.c
示例13: wm8994_read
static int wm8994_read(struct wm8994 *wm8994, unsigned short reg,
int bytes, void *dest)
{
int ret, i;
u16 *buf = dest;
BUG_ON(bytes % 2);
BUG_ON(bytes <= 0);
ret = wm8994->read_dev(wm8994, reg, bytes, dest);
if (ret < 0)
return ret;
for (i = 0; i < bytes / 2; i++) {
buf[i] = be16_to_cpu(buf[i]);
dev_vdbg(wm8994->dev, "Read %04x from R%d(0x%x)\n",
buf[i], reg + i, reg + i);
}
return 0;
}
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:22,代码来源:wm8994-core.c
示例14: cyttsp4_spi_write_block_data
static s32 cyttsp4_spi_write_block_data(struct cyttsp4_spi *ts, u16 addr,
int length, const void *data, int max_xfer)
{
int rc = -EINVAL;
int retry = 0;
int trans_len;
struct device *dev = &ts->client->dev;
dev_vdbg(dev, "%s: Enter\n", __func__);
while (length > 0) {
trans_len = min(length, max_xfer);
rc = cyttsp4_spi_xfer(CY_SPI_WR_OP, ts, addr, (void *)data,
trans_len);
if (rc < 0) {
dev_err(dev, "%s: Fail write r=%d\n", __func__, rc);
goto exit;
} else if (rc > 0) {
/* Perform retry or fail */
if (retry++ < CY_SPI_NUM_RETRY) {
dev_dbg(dev, "%s: ACK error, retry %d\n",
__func__, retry);
continue;
} else {
dev_err(dev, "%s: ACK error\n", __func__);
rc = -EIO;
goto exit;
}
}
length -= trans_len;
data += trans_len;
addr += trans_len;
}
exit:
return rc;
}
开发者ID:jarpii,项目名称:android_kernel_huawei_Soulfire,代码行数:38,代码来源:cyttsp4_spi.c
示例15: dwc3_gadget_ep0_queue
int dwc3_gadget_ep0_queue(struct usb_ep *ep, struct usb_request *request,
gfp_t gfp_flags)
{
struct dwc3_request *req = to_dwc3_request(request);
struct dwc3_ep *dep = to_dwc3_ep(ep);
struct dwc3 *dwc = dep->dwc;
unsigned long flags;
int ret;
spin_lock_irqsave(&dwc->lock, flags);
if (!dep->desc) {
dev_dbg(dwc->dev, "trying to queue request %p to disabled %s\n",
request, dep->name);
ret = -ESHUTDOWN;
goto out;
}
/* we share one TRB for ep0/1 */
if (!list_empty(&dwc->eps[0]->request_list) ||
!list_empty(&dwc->eps[1]->request_list) ||
dwc->ep0_status_pending) {
ret = -EBUSY;
goto out;
}
dev_vdbg(dwc->dev, "queueing request %p to %s length %d, state '%s'\n",
request, dep->name, request->length,
dwc3_ep0_state_string(dwc->ep0state));
ret = __dwc3_gadget_ep0_queue(dep, req);
out:
spin_unlock_irqrestore(&dwc->lock, flags);
return ret;
}
开发者ID:ashang,项目名称:xpenology-3.x,代码行数:38,代码来源:ep0.c
示例16: delta_mjpeg_ipc_open
static int delta_mjpeg_ipc_open(struct delta_ctx *pctx)
{
struct delta_dev *delta = pctx->dev;
struct delta_mjpeg_ctx *ctx = to_ctx(pctx);
int ret = 0;
struct jpeg_video_decode_init_params_t params_struct;
struct jpeg_video_decode_init_params_t *params = ¶ms_struct;
struct delta_buf *ipc_buf;
u32 ipc_buf_size;
struct delta_ipc_param ipc_param;
void *hdl;
memset(params, 0, sizeof(*params));
params->circular_buffer_begin_addr_p = 0x00000000;
params->circular_buffer_end_addr_p = 0xffffffff;
dev_vdbg(delta->dev,
"%s %s\n", pctx->name,
ipc_open_param_str(params, ctx->str, sizeof(ctx->str)));
ipc_param.size = sizeof(*params);
ipc_param.data = params;
ipc_buf_size = sizeof(struct jpeg_decode_params_t) +
sizeof(struct jpeg_decode_return_params_t);
ret = delta_ipc_open(pctx, "JPEG_DECODER_HW0", &ipc_param,
ipc_buf_size, &ipc_buf, &hdl);
if (ret) {
dev_err(delta->dev,
"%s dumping command %s\n", pctx->name,
ipc_open_param_str(params, ctx->str, sizeof(ctx->str)));
return ret;
}
ctx->ipc_buf = ipc_buf;
ctx->ipc_hdl = hdl;
return 0;
}
开发者ID:SantoshShilimkar,项目名称:linux,代码行数:38,代码来源:delta-mjpeg-dec.c
示例17: exynos_drd_switch_handle_id
/**
* exynos_drd_switch_handle_id - handle ID pin state.
*
* @drd_switch: Pointer to the DRD switch structure.
* @id_state: ID pin state.
*/
static void exynos_drd_switch_handle_id(struct exynos_drd_switch *drd_switch,
enum id_pin_state id_state)
{
struct device *dev = drd_switch->otg.phy->dev;
unsigned long flags;
int res;
spin_lock_irqsave(&drd_switch->lock, flags);
if (id_state != drd_switch->id_state) {
drd_switch->id_state = id_state;
/*
* Debouncing: timer will not expire untill
* ID state is stable.
*/
res = mod_timer(&drd_switch->id_db_timer,
jiffies + ID_DEBOUNCE_DELAY);
if (res == 1)
dev_vdbg(dev, "id debouncing ...\n");
}
spin_unlock_irqrestore(&drd_switch->lock, flags);
}
开发者ID:halaszk,项目名称:android_kernel_samsung_lt03,代码行数:29,代码来源:exynos-drd-switch.c
示例18: db8500_regulator_switch_disable
static int db8500_regulator_switch_disable(struct regulator_dev *rdev)
{
struct db8500_regulator_info *info = rdev_get_drvdata(rdev);
int ret;
if (info == NULL)
return -EINVAL;
dev_vdbg(rdev_get_dev(rdev), "regulator-switch-%s-disable\n",
info->desc.name);
ret = disable_epod(info->epod_id, info->is_ramret);
if (ret < 0) {
dev_err(rdev_get_dev(rdev),
"regulator_switch-%s-disable: prcmu call failed\n",
info->desc.name);
goto out;
}
info->is_enabled = 0;
out:
return ret;
}
开发者ID:badwtg1111,项目名称:linux-2.6,代码行数:23,代码来源:db8500-prcmu.c
示例19: show_ir_data
/* Display IR data */
static ssize_t show_ir_data(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct iio_dev *indio_dev = dev_get_drvdata(dev);
struct isl29028_chip *chip = iio_priv(indio_dev);
int als_ir_data;
bool st;
ssize_t buf_count = 0;
dev_vdbg(dev, "%s()\n", __func__);
mutex_lock(&chip->lock);
if (chip->als_ir_mode == MODE_IR) {
st = isl29028_read_als_ir(chip->client, &als_ir_data);
if (st) {
buf_count = sprintf(buf, "%d\n", als_ir_data);
chip->ir_reading = als_ir_data;
}
} else
buf_count = sprintf(buf, "%d\n", chip->ir_reading);
mutex_unlock(&chip->lock);
return buf_count;
}
开发者ID:Mrchenkeyu,项目名称:android_kernel_zte_pluto,代码行数:24,代码来源:isl29028.c
示例20: cyttsp4_setup_input_device
static int cyttsp4_setup_input_device(struct device *dev)
{
struct cyttsp4_core_data *cd = dev_get_drvdata(dev);
struct cyttsp4_btn_data *bd = &cd->bd;
int i;
int rc;
dev_vdbg(dev, "%s: Initialize event signals\n", __func__);
__set_bit(EV_KEY, bd->input->evbit);
__set_bit(EV_LED, bd->input->evbit);
__set_bit(LED_MISC, bd->input->ledbit);
for (i = 0; i < bd->si->si_ofs.num_btns; i++)
__set_bit(bd->si->btn[i].key_code, bd->input->keybit);
rc = input_register_device(bd->input);
if (rc < 0)
dev_err(dev, "%s: Error, failed register input device r=%d\n",
__func__, rc);
else
bd->input_device_registered = true;
return rc;
}
开发者ID:GalaxyTab4,项目名称:android_kernel_samsung_matissewifi.bak,代码行数:23,代码来源:cyttsp4_btn.c
注:本文中的dev_vdbg函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论