enum error_type ext_watch_set_cfg(struct spi_device *spi,struct ext_watch_cfg *cfg) { TOUCH_I("%s \n", __func__); cfg->mode.watch_ctrl.alpha = 1; // bypass foreground DO_IF(ext_watch_set_mode(spi, cfg) != 0, error); DO_IF(ext_watch_set_position(spi, cfg) != 0, error); return NO_ERROR; error: TOUCH_I("%s Fail \n", __func__); return ERROR; }
static int ext_watch_set_cfg(struct device *dev) { struct lg4945_data *d = to_lg4945_data(dev); int ret = 0; TOUCH_TRACE(); d->watch.ext_wdata.mode.watch_ctrl.alpha = 1; /* bypass foreground */ ret = ext_watch_set_mode(dev); if (ret) goto error; ret = ext_watch_set_position(dev); if (ret) goto error; return ret; error: TOUCH_E("Fail %d\n", ret); return -ECANCELED; }