Lines Matching refs:new_proto
562 long st_register(struct st_proto_s *new_proto)
569 pr_info("%s(%d) ", __func__, new_proto->type);
570 if (st_gdata == NULL || new_proto == NULL || new_proto->recv == NULL
571 || new_proto->reg_complete_cb == NULL) {
572 pr_err("gdata/new_proto/recv or reg_complete_cb not ready");
576 if (new_proto->type < ST_BT || new_proto->type >= ST_MAX) {
577 pr_err("protocol %d not supported", new_proto->type);
581 if (st_gdata->list[new_proto->type] != NULL) {
582 pr_err("protocol %d already registered", new_proto->type);
590 pr_info(" ST_REG_IN_PROGRESS:%d ", new_proto->type);
592 st_kim_chip_toggle(new_proto->type, KIM_GPIO_ACTIVE);
594 st_gdata->list[new_proto->type] = new_proto;
596 new_proto->write = st_write;
602 pr_info(" protocol list empty :%d ", new_proto->type);
628 st_kim_chip_toggle(new_proto->type, KIM_GPIO_ACTIVE);
646 if (st_gdata->list[new_proto->type] != NULL) {
648 new_proto->type);
653 st_gdata->list[new_proto->type] = new_proto;
655 new_proto->write = st_write;
661 switch (new_proto->type) {
667 st_kim_chip_toggle(new_proto->type, KIM_GPIO_ACTIVE);
672 new_proto->type);
677 st_gdata->list[new_proto->type] = new_proto;
679 new_proto->write = st_write;
685 pr_debug("done %s(%d) ", __func__, new_proto->type);