Lines Matching refs:qcadev
447 struct qca_serdev *qcadev; in qca_open() local
504 qcadev = serdev_device_get_drvdata(hu->serdev); in qca_open()
505 if (qcadev->btsoc_type != QCA_WCN3990) { in qca_open()
506 gpiod_set_value_cansleep(qcadev->bt_en, 1); in qca_open()
508 hu->init_speed = qcadev->init_speed; in qca_open()
509 hu->oper_speed = qcadev->oper_speed; in qca_open()
595 struct qca_serdev *qcadev; in qca_close() local
610 qcadev = serdev_device_get_drvdata(hu->serdev); in qca_close()
611 if (qcadev->btsoc_type == QCA_WCN3990) in qca_close()
614 gpiod_set_value_cansleep(qcadev->bt_en, 0); in qca_close()
950 struct qca_serdev *qcadev; in qca_set_baudrate() local
967 qcadev = serdev_device_get_drvdata(hu->serdev); in qca_set_baudrate()
968 if (qcadev->btsoc_type == QCA_WCN3990) in qca_set_baudrate()
986 if (qcadev->btsoc_type == QCA_WCN3990) in qca_set_baudrate()
1059 struct qca_serdev *qcadev; in qca_check_speeds() local
1061 qcadev = serdev_device_get_drvdata(hu->serdev); in qca_check_speeds()
1062 if (qcadev->btsoc_type == QCA_WCN3990) { in qca_check_speeds()
1142 struct qca_serdev *qcadev; in qca_setup() local
1146 qcadev = serdev_device_get_drvdata(hu->serdev); in qca_setup()
1155 if (qcadev->btsoc_type == QCA_WCN3990) { in qca_setup()
1179 if (qcadev->btsoc_type != QCA_WCN3990) { in qca_setup()
1188 ret = qca_uart_setup(hdev, qca_baudrate, qcadev->btsoc_type, soc_ver); in qca_setup()
1279 struct qca_serdev *qcadev; in qca_power_setup() local
1282 qcadev = serdev_device_get_drvdata(hu->serdev); in qca_power_setup()
1283 if (!qcadev || !qcadev->bt_power || !qcadev->bt_power->vreg_data || in qca_power_setup()
1284 !qcadev->bt_power->vreg_bulk) in qca_power_setup()
1287 vregs = qcadev->bt_power->vreg_data->vregs; in qca_power_setup()
1288 vreg_bulk = qcadev->bt_power->vreg_bulk; in qca_power_setup()
1289 num_vregs = qcadev->bt_power->vreg_data->num_vregs; in qca_power_setup()
1291 if (on && !qcadev->bt_power->vregs_on) { in qca_power_setup()
1306 qcadev->bt_power->vregs_on = true; in qca_power_setup()
1308 } else if (!on && qcadev->bt_power->vregs_on) { in qca_power_setup()
1310 i = qcadev->bt_power->vreg_data->num_vregs - 1; in qca_power_setup()
1314 qcadev->bt_power->vregs_on = false; in qca_power_setup()
1339 struct qca_serdev *qcadev; in qca_serdev_probe() local
1343 qcadev = devm_kzalloc(&serdev->dev, sizeof(*qcadev), GFP_KERNEL); in qca_serdev_probe()
1344 if (!qcadev) in qca_serdev_probe()
1347 qcadev->serdev_hu.serdev = serdev; in qca_serdev_probe()
1349 serdev_device_set_drvdata(serdev, qcadev); in qca_serdev_probe()
1351 qcadev->btsoc_type = QCA_WCN3990; in qca_serdev_probe()
1352 qcadev->bt_power = devm_kzalloc(&serdev->dev, in qca_serdev_probe()
1355 if (!qcadev->bt_power) in qca_serdev_probe()
1358 qcadev->bt_power->dev = &serdev->dev; in qca_serdev_probe()
1359 qcadev->bt_power->vreg_data = data; in qca_serdev_probe()
1360 err = qca_init_regulators(qcadev->bt_power, data->vregs, in qca_serdev_probe()
1367 qcadev->bt_power->vregs_on = false; in qca_serdev_probe()
1370 &qcadev->oper_speed); in qca_serdev_probe()
1371 if (!qcadev->oper_speed) in qca_serdev_probe()
1374 err = hci_uart_register_device(&qcadev->serdev_hu, &qca_proto); in qca_serdev_probe()
1380 qcadev->btsoc_type = QCA_ROME; in qca_serdev_probe()
1381 qcadev->bt_en = devm_gpiod_get(&serdev->dev, "enable", in qca_serdev_probe()
1383 if (IS_ERR(qcadev->bt_en)) { in qca_serdev_probe()
1385 return PTR_ERR(qcadev->bt_en); in qca_serdev_probe()
1388 qcadev->susclk = devm_clk_get(&serdev->dev, NULL); in qca_serdev_probe()
1389 if (IS_ERR(qcadev->susclk)) { in qca_serdev_probe()
1391 return PTR_ERR(qcadev->susclk); in qca_serdev_probe()
1394 err = clk_set_rate(qcadev->susclk, SUSCLK_RATE_32KHZ); in qca_serdev_probe()
1398 err = clk_prepare_enable(qcadev->susclk); in qca_serdev_probe()
1402 err = hci_uart_register_device(&qcadev->serdev_hu, &qca_proto); in qca_serdev_probe()
1404 clk_disable_unprepare(qcadev->susclk); in qca_serdev_probe()
1413 struct qca_serdev *qcadev = serdev_device_get_drvdata(serdev); in qca_serdev_remove() local
1415 if (qcadev->btsoc_type == QCA_WCN3990) in qca_serdev_remove()
1416 qca_power_shutdown(qcadev->serdev_hu.hdev); in qca_serdev_remove()
1418 clk_disable_unprepare(qcadev->susclk); in qca_serdev_remove()
1420 hci_uart_unregister_device(&qcadev->serdev_hu); in qca_serdev_remove()