Lines Matching full:desc

148 			  const struct device **tdev, struct i3c_device_desc **desc)  in i3c_parse_args()  argument
160 *desc = get_i3c_attached_desc_from_dev_name(*dev, (*tdev)->name); in i3c_parse_args()
161 if (!*desc) { in i3c_parse_args()
174 struct i3c_device_desc *desc; in cmd_i3c_info() local
193 I3C_BUS_FOR_EACH_I3CDEV(dev, desc) { in cmd_i3c_info()
195 if (strcmp(desc->dev->name, tdev->name) == 0) { in cmd_i3c_info()
213 desc->dev->name, (uint64_t)desc->pid, in cmd_i3c_info()
214 desc->static_addr, desc->dynamic_addr, in cmd_i3c_info()
216 desc->group_addr, in cmd_i3c_info()
218 desc->bcr, desc->dcr, desc->data_speed.maxrd, in cmd_i3c_info()
219 desc->data_speed.maxwr, in cmd_i3c_info()
220 desc->data_speed.max_read_turnaround, in cmd_i3c_info()
221 desc->data_length.mrl, desc->data_length.mwl, in cmd_i3c_info()
222 desc->data_length.max_ibi, in cmd_i3c_info()
223 desc->getcaps.getcap1, desc->getcaps.getcap2, in cmd_i3c_info()
224 desc->getcaps.getcap3, desc->getcaps.getcap4); in cmd_i3c_info()
241 I3C_BUS_FOR_EACH_I3CDEV(dev, desc) { in cmd_i3c_info()
259 desc->dev->name, (uint64_t)desc->pid, desc->static_addr, in cmd_i3c_info()
260 desc->dynamic_addr, in cmd_i3c_info()
262 desc->group_addr, in cmd_i3c_info()
264 desc->bcr, desc->dcr, desc->data_speed.maxrd, in cmd_i3c_info()
265 desc->data_speed.maxwr, in cmd_i3c_info()
266 desc->data_speed.max_read_turnaround, in cmd_i3c_info()
267 desc->data_length.mrl, desc->data_length.mwl, in cmd_i3c_info()
268 desc->data_length.max_ibi, desc->getcaps.getcap1, in cmd_i3c_info()
269 desc->getcaps.getcap2, desc->getcaps.getcap3, in cmd_i3c_info()
270 desc->getcaps.getcap4); in cmd_i3c_info()
356 struct i3c_device_desc *desc; in i3c_write_from_buffer() local
372 desc = get_i3c_attached_desc_from_dev_name(dev, tdev->name); in i3c_write_from_buffer()
373 if (!desc) { in i3c_write_from_buffer()
393 ret = i3c_write(desc, buf + MAX_BYTES_FOR_REGISTER_INDEX - reg_addr_bytes, in i3c_write_from_buffer()
421 struct i3c_device_desc *desc; in i3c_read_to_buffer() local
437 desc = get_i3c_attached_desc_from_dev_name(dev, tdev->name); in i3c_read_to_buffer()
438 if (!desc) { in i3c_read_to_buffer()
448 ret = i3c_write_read(desc, reg_addr_buf + MAX_BYTES_FOR_REGISTER_INDEX - reg_addr_bytes, in i3c_read_to_buffer()
501 struct i3c_device_desc *desc; in cmd_i3c_hdr_ddr_write() local
508 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_hdr_ddr_write()
524 ret = i3c_hdr_ddr_write(desc, cmd, buf, data_length); in cmd_i3c_hdr_ddr_write()
537 struct i3c_device_desc *desc; in cmd_i3c_hdr_ddr_read() local
543 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_hdr_ddr_read()
559 ret = i3c_hdr_ddr_read(desc, cmd, buf, num_bytes); in cmd_i3c_hdr_ddr_read()
574 struct i3c_device_desc *desc; in cmd_i3c_ccc_rstdaa() local
590 I3C_BUS_FOR_EACH_I3CDEV(dev, desc) { in cmd_i3c_ccc_rstdaa()
591 desc->dynamic_addr = 0; in cmd_i3c_ccc_rstdaa()
592 shell_print(sh, "Reset dynamic address for device %s", desc->dev->name); in cmd_i3c_ccc_rstdaa()
616 struct i3c_device_desc *desc; in cmd_i3c_ccc_setaasa() local
632 I3C_BUS_FOR_EACH_I3CDEV(dev, desc) { in cmd_i3c_ccc_setaasa()
633 if ((desc->supports_setaasa) && (desc->dynamic_addr == 0) && in cmd_i3c_ccc_setaasa()
634 (desc->static_addr != 0)) { in cmd_i3c_ccc_setaasa()
635 desc->dynamic_addr = desc->static_addr; in cmd_i3c_ccc_setaasa()
646 struct i3c_device_desc *desc; in cmd_i3c_ccc_setdasa() local
652 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_ccc_setdasa()
665 ret = i3c_ccc_do_setdasa(desc, da); in cmd_i3c_ccc_setdasa()
672 desc->dynamic_addr = dynamic_addr; in cmd_i3c_ccc_setdasa()
673 if (desc->dynamic_addr != desc->static_addr) { in cmd_i3c_ccc_setdasa()
674 ret = i3c_reattach_i3c_device(desc, desc->static_addr); in cmd_i3c_ccc_setdasa()
688 struct i3c_device_desc *desc; in cmd_i3c_ccc_setnewda() local
695 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_ccc_setnewda()
709 ret = i3c_ccc_do_setnewda(desc, new_da); in cmd_i3c_ccc_setnewda()
716 old_da = desc->dynamic_addr; in cmd_i3c_ccc_setnewda()
717 desc->dynamic_addr = dynamic_addr; in cmd_i3c_ccc_setnewda()
718 ret = i3c_reattach_i3c_device(desc, old_da); in cmd_i3c_ccc_setnewda()
731 struct i3c_device_desc *desc; in cmd_i3c_ccc_getbcr() local
735 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_ccc_getbcr()
740 ret = i3c_ccc_do_getbcr(desc, &bcr); in cmd_i3c_ccc_getbcr()
747 desc->bcr = bcr.bcr; in cmd_i3c_ccc_getbcr()
756 struct i3c_device_desc *desc; in cmd_i3c_ccc_getdcr() local
760 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_ccc_getdcr()
765 ret = i3c_ccc_do_getdcr(desc, &dcr); in cmd_i3c_ccc_getdcr()
772 desc->dcr = dcr.dcr; in cmd_i3c_ccc_getdcr()
781 struct i3c_device_desc *desc; in cmd_i3c_ccc_getpid() local
785 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_ccc_getpid()
790 ret = i3c_ccc_do_getpid(desc, &pid); in cmd_i3c_ccc_getpid()
805 struct i3c_device_desc *desc; in cmd_i3c_ccc_getmrl() local
809 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_ccc_getmrl()
814 ret = i3c_ccc_do_getmrl(desc, &mrl); in cmd_i3c_ccc_getmrl()
820 desc->data_length.mrl = mrl.len; in cmd_i3c_ccc_getmrl()
821 if (desc->bcr & I3C_BCR_IBI_PAYLOAD_HAS_DATA_BYTE) { in cmd_i3c_ccc_getmrl()
823 desc->data_length.max_ibi = mrl.ibi_len; in cmd_i3c_ccc_getmrl()
826 desc->data_length.max_ibi = 0; in cmd_i3c_ccc_getmrl()
836 struct i3c_device_desc *desc; in cmd_i3c_ccc_getmwl() local
840 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_ccc_getmwl()
845 ret = i3c_ccc_do_getmwl(desc, &mwl); in cmd_i3c_ccc_getmwl()
852 desc->data_length.mwl = mwl.len; in cmd_i3c_ccc_getmwl()
861 struct i3c_device_desc *desc; in cmd_i3c_ccc_setmrl() local
865 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_ccc_setmrl()
871 if ((desc->bcr & I3C_BCR_IBI_PAYLOAD_HAS_DATA_BYTE) && (argc < 5)) { in cmd_i3c_ccc_setmrl()
881 ret = i3c_ccc_do_setmrl(desc, &mrl); in cmd_i3c_ccc_setmrl()
887 desc->data_length.mrl = mrl.len; in cmd_i3c_ccc_setmrl()
889 desc->data_length.max_ibi = mrl.ibi_len; in cmd_i3c_ccc_setmrl()
899 struct i3c_device_desc *desc; in cmd_i3c_ccc_setmwl() local
903 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_ccc_setmwl()
910 ret = i3c_ccc_do_setmwl(desc, &mwl); in cmd_i3c_ccc_setmwl()
916 desc->data_length.mwl = mwl.len; in cmd_i3c_ccc_setmwl()
925 struct i3c_device_desc *desc; in cmd_i3c_ccc_setmrl_bc() local
946 I3C_BUS_FOR_EACH_I3CDEV(dev, desc) { in cmd_i3c_ccc_setmrl_bc()
947 desc->data_length.mrl = mrl.len; in cmd_i3c_ccc_setmrl_bc()
948 if ((argc > 3) && (desc->bcr & I3C_BCR_IBI_PAYLOAD_HAS_DATA_BYTE)) { in cmd_i3c_ccc_setmrl_bc()
949 desc->data_length.max_ibi = mrl.ibi_len; in cmd_i3c_ccc_setmrl_bc()
960 struct i3c_device_desc *desc; in cmd_i3c_ccc_setmwl_bc() local
978 I3C_BUS_FOR_EACH_I3CDEV(dev, desc) { in cmd_i3c_ccc_setmwl_bc()
979 desc->data_length.mwl = mwl.len; in cmd_i3c_ccc_setmwl_bc()
1063 struct i3c_device_desc *desc; in cmd_i3c_ccc_rstact() local
1068 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_ccc_rstact()
1076 ret = i3c_ccc_do_rstact_fmt3(desc, action, &data); in cmd_i3c_ccc_rstact()
1078 ret = i3c_ccc_do_rstact_fmt2(desc, action); in cmd_i3c_ccc_rstact()
1149 struct i3c_device_desc *desc; in cmd_i3c_ccc_enec() local
1153 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_ccc_enec()
1160 ret = i3c_ccc_do_events_set(desc, true, &events); in cmd_i3c_ccc_enec()
1173 struct i3c_device_desc *desc; in cmd_i3c_ccc_disec() local
1177 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_ccc_disec()
1184 ret = i3c_ccc_do_events_set(desc, false, &events); in cmd_i3c_ccc_disec()
1289 struct i3c_device_desc *desc; in cmd_i3c_ccc_entas0() local
1292 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_ccc_entas0()
1297 ret = i3c_ccc_do_entas0(desc); in cmd_i3c_ccc_entas0()
1310 struct i3c_device_desc *desc; in cmd_i3c_ccc_entas1() local
1313 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_ccc_entas1()
1318 ret = i3c_ccc_do_entas1(desc); in cmd_i3c_ccc_entas1()
1331 struct i3c_device_desc *desc; in cmd_i3c_ccc_entas2() local
1334 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_ccc_entas2()
1339 ret = i3c_ccc_do_entas2(desc); in cmd_i3c_ccc_entas2()
1352 struct i3c_device_desc *desc; in cmd_i3c_ccc_entas3() local
1355 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_ccc_entas3()
1360 ret = i3c_ccc_do_entas3(desc); in cmd_i3c_ccc_entas3()
1373 struct i3c_device_desc *desc; in cmd_i3c_ccc_getstatus() local
1379 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_ccc_getstatus()
1396 ret = i3c_ccc_do_getstatus(desc, &status, fmt, defbyte); in cmd_i3c_ccc_getstatus()
1419 struct i3c_device_desc *desc; in cmd_i3c_ccc_getcaps() local
1425 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_ccc_getcaps()
1444 ret = i3c_ccc_do_getcaps(desc, &caps, fmt, defbyte); in cmd_i3c_ccc_getcaps()
1467 memcpy(&desc->getcaps, &caps, sizeof(desc->getcaps)); in cmd_i3c_ccc_getcaps()
1477 struct i3c_device_desc *desc; in cmd_i3c_ccc_getvendor() local
1496 desc = get_i3c_attached_desc_from_dev_name(dev, tdev->name); in cmd_i3c_ccc_getvendor()
1497 if (!desc) { in cmd_i3c_ccc_getvendor()
1510 ret = i3c_ccc_do_getvendor_defbyte(desc, id, defbyte, buf, MAX_I3C_BYTES, in cmd_i3c_ccc_getvendor()
1513 ret = i3c_ccc_do_getvendor(desc, id, buf, MAX_I3C_BYTES, &num_xfer); in cmd_i3c_ccc_getvendor()
1530 struct i3c_device_desc *desc; in cmd_i3c_ccc_setvendor() local
1550 desc = get_i3c_attached_desc_from_dev_name(dev, tdev->name); in cmd_i3c_ccc_setvendor()
1551 if (!desc) { in cmd_i3c_ccc_setvendor()
1568 ret = i3c_ccc_do_setvendor(desc, id, buf, data_length); in cmd_i3c_ccc_setvendor()
1647 struct i3c_device_desc *desc; in cmd_i3c_ccc_getmxds() local
1653 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_ccc_getmxds()
1658 if (!(desc->bcr & I3C_BCR_MAX_DATA_SPEED_LIMIT)) { in cmd_i3c_ccc_getmxds()
1660 desc->dev->name); in cmd_i3c_ccc_getmxds()
1676 ret = i3c_ccc_do_getmxds(desc, &mxds, fmt, defbyte); in cmd_i3c_ccc_getmxds()
1688 desc->data_speed.maxwr = mxds.fmt3.wrrdturn[0]; in cmd_i3c_ccc_getmxds()
1689 desc->data_speed.maxrd = mxds.fmt3.wrrdturn[1]; in cmd_i3c_ccc_getmxds()
1690 desc->data_speed.max_read_turnaround = sys_get_le24(&mxds.fmt3.wrrdturn[2]); in cmd_i3c_ccc_getmxds()
1698 desc->data_speed.maxwr = mxds.fmt2.maxwr; in cmd_i3c_ccc_getmxds()
1699 desc->data_speed.maxrd = mxds.fmt2.maxrd; in cmd_i3c_ccc_getmxds()
1700 desc->data_speed.max_read_turnaround = sys_get_le24(mxds.fmt2.maxrdturn); in cmd_i3c_ccc_getmxds()
1709 struct i3c_device_desc *desc; in cmd_i3c_attach() local
1722 desc = get_i3c_list_desc_from_dev_name(dev, tdev->name); in cmd_i3c_attach()
1723 if (!desc) { in cmd_i3c_attach()
1728 ret = i3c_attach_i3c_device(desc); in cmd_i3c_attach()
1739 struct i3c_device_desc *desc; in cmd_i3c_reattach() local
1743 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_reattach()
1752 ret = i3c_reattach_i3c_device(desc, old_dyn_addr); in cmd_i3c_reattach()
1763 struct i3c_device_desc *desc; in cmd_i3c_detach() local
1766 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_detach()
1771 ret = i3c_detach_i3c_device(desc); in cmd_i3c_detach()
1782 struct i3c_i2c_device_desc *desc; in cmd_i3c_i2c_attach() local
1792 desc = i3c_dev_list_i2c_addr_find(dev, addr); in cmd_i3c_i2c_attach()
1793 if (!desc) { in cmd_i3c_i2c_attach()
1798 ret = i3c_attach_i2c_device(desc); in cmd_i3c_i2c_attach()
1809 struct i3c_i2c_device_desc *desc; in cmd_i3c_i2c_detach() local
1819 desc = i3c_dev_list_i2c_addr_find(dev, addr); in cmd_i3c_i2c_detach()
1820 if (!desc) { in cmd_i3c_i2c_detach()
1825 ret = i3c_detach_i2c_device(desc); in cmd_i3c_i2c_detach()
1885 struct i3c_i2c_device_desc desc = { in cmd_i3c_i2c_scan() local
1891 ret = i3c_attach_i2c_device(&desc); in cmd_i3c_i2c_scan()
1894 desc.addr); in cmd_i3c_i2c_scan()
1908 ret = i3c_detach_i2c_device(&desc); in cmd_i3c_i2c_scan()
1911 desc.addr); in cmd_i3c_i2c_scan()
2022 struct i3c_device_desc *desc; in cmd_i3c_ibi_enable() local
2025 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_ibi_enable()
2030 ret = i3c_ibi_enable(desc); in cmd_i3c_ibi_enable()
2045 struct i3c_device_desc *desc; in cmd_i3c_ibi_disable() local
2048 ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc); in cmd_i3c_ibi_disable()
2053 ret = i3c_ibi_disable(desc); in cmd_i3c_ibi_disable()