Lines Matching refs:lp

301 static int adf7242_soft_reset(struct adf7242_local *lp, int line);
303 static int adf7242_status(struct adf7242_local *lp, u8 *stat) in adf7242_status() argument
307 mutex_lock(&lp->bmux); in adf7242_status()
308 status = spi_sync(lp->spi, &lp->stat_msg); in adf7242_status()
309 *stat = lp->buf_stat_rx; in adf7242_status()
310 mutex_unlock(&lp->bmux); in adf7242_status()
315 static int adf7242_wait_status(struct adf7242_local *lp, unsigned int status, in adf7242_wait_status() argument
322 adf7242_status(lp, &stat); in adf7242_wait_status()
330 adf7242_soft_reset(lp, line); in adf7242_wait_status()
331 adf7242_status(lp, &stat); in adf7242_wait_status()
338 dev_warn(&lp->spi->dev, in adf7242_wait_status()
343 dev_vdbg(&lp->spi->dev, "%s : loops=%d line %d\n", __func__, cnt, line); in adf7242_wait_status()
348 static int adf7242_wait_rc_ready(struct adf7242_local *lp, int line) in adf7242_wait_rc_ready() argument
350 return adf7242_wait_status(lp, STAT_RC_READY | STAT_SPI_READY, in adf7242_wait_rc_ready()
354 static int adf7242_wait_spi_ready(struct adf7242_local *lp, int line) in adf7242_wait_spi_ready() argument
356 return adf7242_wait_status(lp, STAT_SPI_READY, in adf7242_wait_spi_ready()
360 static int adf7242_write_fbuf(struct adf7242_local *lp, u8 *data, u8 len) in adf7242_write_fbuf() argument
362 u8 *buf = lp->buf; in adf7242_write_fbuf()
379 adf7242_wait_spi_ready(lp, __LINE__); in adf7242_write_fbuf()
381 mutex_lock(&lp->bmux); in adf7242_write_fbuf()
385 status = spi_sync(lp->spi, &msg); in adf7242_write_fbuf()
386 mutex_unlock(&lp->bmux); in adf7242_write_fbuf()
391 static int adf7242_read_fbuf(struct adf7242_local *lp, in adf7242_read_fbuf() argument
394 u8 *buf = lp->buf; in adf7242_read_fbuf()
411 adf7242_wait_spi_ready(lp, __LINE__); in adf7242_read_fbuf()
413 mutex_lock(&lp->bmux); in adf7242_read_fbuf()
424 status = spi_sync(lp->spi, &msg); in adf7242_read_fbuf()
426 mutex_unlock(&lp->bmux); in adf7242_read_fbuf()
431 static int adf7242_read_reg(struct adf7242_local *lp, u16 addr, u8 *data) in adf7242_read_reg() argument
438 .tx_buf = lp->buf_read_tx, in adf7242_read_reg()
439 .rx_buf = lp->buf_read_rx, in adf7242_read_reg()
442 adf7242_wait_spi_ready(lp, __LINE__); in adf7242_read_reg()
444 mutex_lock(&lp->bmux); in adf7242_read_reg()
445 lp->buf_read_tx[0] = CMD_SPI_MEM_RD(addr); in adf7242_read_reg()
446 lp->buf_read_tx[1] = addr; in adf7242_read_reg()
447 lp->buf_read_tx[2] = CMD_SPI_NOP; in adf7242_read_reg()
448 lp->buf_read_tx[3] = CMD_SPI_NOP; in adf7242_read_reg()
453 status = spi_sync(lp->spi, &msg); in adf7242_read_reg()
458 *data = lp->buf_read_rx[3]; in adf7242_read_reg()
460 mutex_unlock(&lp->bmux); in adf7242_read_reg()
462 dev_vdbg(&lp->spi->dev, "%s : REG 0x%X, VAL 0x%X\n", __func__, in adf7242_read_reg()
468 static int adf7242_write_reg(struct adf7242_local *lp, u16 addr, u8 data) in adf7242_write_reg() argument
472 adf7242_wait_spi_ready(lp, __LINE__); in adf7242_write_reg()
474 mutex_lock(&lp->bmux); in adf7242_write_reg()
475 lp->buf_reg_tx[0] = CMD_SPI_MEM_WR(addr); in adf7242_write_reg()
476 lp->buf_reg_tx[1] = addr; in adf7242_write_reg()
477 lp->buf_reg_tx[2] = data; in adf7242_write_reg()
478 status = spi_write(lp->spi, lp->buf_reg_tx, 3); in adf7242_write_reg()
479 mutex_unlock(&lp->bmux); in adf7242_write_reg()
481 dev_vdbg(&lp->spi->dev, "%s : REG 0x%X, VAL 0x%X\n", in adf7242_write_reg()
487 static int adf7242_cmd(struct adf7242_local *lp, unsigned int cmd) in adf7242_cmd() argument
491 dev_vdbg(&lp->spi->dev, "%s : CMD=0x%X\n", __func__, cmd); in adf7242_cmd()
494 adf7242_wait_rc_ready(lp, __LINE__); in adf7242_cmd()
496 mutex_lock(&lp->bmux); in adf7242_cmd()
497 lp->buf_cmd = cmd; in adf7242_cmd()
498 status = spi_write(lp->spi, &lp->buf_cmd, 1); in adf7242_cmd()
499 mutex_unlock(&lp->bmux); in adf7242_cmd()
504 static int adf7242_upload_firmware(struct adf7242_local *lp, u8 *data, u16 len) in adf7242_upload_firmware() argument
509 u8 *buf = lp->buf; in adf7242_upload_firmware()
524 adf7242_write_reg(lp, REG_PRAMPG, page); in adf7242_upload_firmware()
529 mutex_lock(&lp->bmux); in adf7242_upload_firmware()
530 status = spi_sync(lp->spi, &msg); in adf7242_upload_firmware()
531 mutex_unlock(&lp->bmux); in adf7242_upload_firmware()
538 static int adf7242_verify_firmware(struct adf7242_local *lp, in adf7242_verify_firmware() argument
552 adf7242_write_reg(lp, REG_PRAMPG, page); in adf7242_verify_firmware()
553 adf7242_read_fbuf(lp, buf, nb, false); in adf7242_verify_firmware()
567 static void adf7242_clear_irqstat(struct adf7242_local *lp) in adf7242_clear_irqstat() argument
569 adf7242_write_reg(lp, REG_IRQ1_SRC1, IRQ_CCA_COMPLETE | IRQ_SFD_RX | in adf7242_clear_irqstat()
574 static int adf7242_cmd_rx(struct adf7242_local *lp) in adf7242_cmd_rx() argument
577 adf7242_wait_status(lp, RC_STATUS_PHY_RDY, RC_STATUS_MASK, __LINE__); in adf7242_cmd_rx()
578 adf7242_clear_irqstat(lp); in adf7242_cmd_rx()
579 mod_delayed_work(lp->wqueue, &lp->work, msecs_to_jiffies(400)); in adf7242_cmd_rx()
581 return adf7242_cmd(lp, CMD_RC_RX); in adf7242_cmd_rx()
586 struct adf7242_local *lp = in adf7242_rx_cal_work() local
593 if (!test_bit(FLAG_XMIT, &lp->flags)) { in adf7242_rx_cal_work()
594 adf7242_cmd(lp, CMD_RC_PHY_RDY); in adf7242_rx_cal_work()
595 adf7242_cmd_rx(lp); in adf7242_rx_cal_work()
601 struct adf7242_local *lp = hw->priv; in adf7242_set_txpower() local
605 dev_vdbg(&lp->spi->dev, "%s : Power %d dB\n", __func__, db); in adf7242_set_txpower()
622 adf7242_read_reg(lp, REG_PA_CFG, &tmp); in adf7242_set_txpower()
625 adf7242_write_reg(lp, REG_PA_CFG, tmp); in adf7242_set_txpower()
627 adf7242_read_reg(lp, REG_PA_BIAS, &tmp); in adf7242_set_txpower()
630 adf7242_write_reg(lp, REG_PA_BIAS, tmp); in adf7242_set_txpower()
632 adf7242_read_reg(lp, REG_EXTPA_MSC, &tmp); in adf7242_set_txpower()
636 return adf7242_write_reg(lp, REG_EXTPA_MSC, tmp); in adf7242_set_txpower()
642 struct adf7242_local *lp = hw->priv; in adf7242_set_csma_params() local
645 dev_vdbg(&lp->spi->dev, "%s : min_be=%d max_be=%d retries=%d\n", in adf7242_set_csma_params()
651 ret = adf7242_write_reg(lp, REG_AUTO_TX1, in adf7242_set_csma_params()
652 MAX_FRAME_RETRIES(lp->max_frame_retries) | in adf7242_set_csma_params()
657 lp->max_cca_retries = retries; in adf7242_set_csma_params()
658 lp->max_be = max_be; in adf7242_set_csma_params()
659 lp->min_be = min_be; in adf7242_set_csma_params()
661 return adf7242_write_reg(lp, REG_AUTO_TX2, CSMA_MAX_BE(max_be) | in adf7242_set_csma_params()
667 struct adf7242_local *lp = hw->priv; in adf7242_set_frame_retries() local
670 dev_vdbg(&lp->spi->dev, "%s : Retries = %d\n", __func__, retries); in adf7242_set_frame_retries()
676 ret = adf7242_write_reg(lp, REG_AUTO_TX1, in adf7242_set_frame_retries()
678 MAX_CCA_RETRIES(lp->max_cca_retries)); in adf7242_set_frame_retries()
680 lp->max_frame_retries = retries; in adf7242_set_frame_retries()
687 struct adf7242_local *lp = hw->priv; in adf7242_ed() local
689 *level = lp->rssi; in adf7242_ed()
691 dev_vdbg(&lp->spi->dev, "%s :Exit level=%d\n", in adf7242_ed()
699 struct adf7242_local *lp = hw->priv; in adf7242_start() local
701 adf7242_cmd(lp, CMD_RC_PHY_RDY); in adf7242_start()
702 adf7242_clear_irqstat(lp); in adf7242_start()
703 enable_irq(lp->spi->irq); in adf7242_start()
704 set_bit(FLAG_START, &lp->flags); in adf7242_start()
706 return adf7242_cmd_rx(lp); in adf7242_start()
711 struct adf7242_local *lp = hw->priv; in adf7242_stop() local
713 disable_irq(lp->spi->irq); in adf7242_stop()
714 cancel_delayed_work_sync(&lp->work); in adf7242_stop()
715 adf7242_cmd(lp, CMD_RC_IDLE); in adf7242_stop()
716 clear_bit(FLAG_START, &lp->flags); in adf7242_stop()
717 adf7242_clear_irqstat(lp); in adf7242_stop()
722 struct adf7242_local *lp = hw->priv; in adf7242_channel() local
725 dev_dbg(&lp->spi->dev, "%s :Channel=%d\n", __func__, channel); in adf7242_channel()
734 adf7242_cmd(lp, CMD_RC_PHY_RDY); in adf7242_channel()
736 adf7242_write_reg(lp, REG_CH_FREQ0, freq); in adf7242_channel()
737 adf7242_write_reg(lp, REG_CH_FREQ1, freq >> 8); in adf7242_channel()
738 adf7242_write_reg(lp, REG_CH_FREQ2, freq >> 16); in adf7242_channel()
740 if (test_bit(FLAG_START, &lp->flags)) in adf7242_channel()
741 return adf7242_cmd_rx(lp); in adf7242_channel()
743 return adf7242_cmd(lp, CMD_RC_PHY_RDY); in adf7242_channel()
750 struct adf7242_local *lp = hw->priv; in adf7242_set_hw_addr_filt() local
753 dev_dbg(&lp->spi->dev, "%s :Changed=0x%lX\n", __func__, changed); in adf7242_set_hw_addr_filt()
763 adf7242_write_reg(lp, REG_IEEE_ADDR_0 + i, addr[i]); in adf7242_set_hw_addr_filt()
769 adf7242_write_reg(lp, REG_SHORT_ADDR_0, saddr); in adf7242_set_hw_addr_filt()
770 adf7242_write_reg(lp, REG_SHORT_ADDR_1, saddr >> 8); in adf7242_set_hw_addr_filt()
776 adf7242_write_reg(lp, REG_PAN_ID0, pan_id); in adf7242_set_hw_addr_filt()
777 adf7242_write_reg(lp, REG_PAN_ID1, pan_id >> 8); in adf7242_set_hw_addr_filt()
781 adf7242_read_reg(lp, REG_AUTO_CFG, &reg); in adf7242_set_hw_addr_filt()
786 adf7242_write_reg(lp, REG_AUTO_CFG, reg); in adf7242_set_hw_addr_filt()
794 struct adf7242_local *lp = hw->priv; in adf7242_set_promiscuous_mode() local
796 dev_dbg(&lp->spi->dev, "%s : mode %d\n", __func__, on); in adf7242_set_promiscuous_mode()
798 lp->promiscuous = on; in adf7242_set_promiscuous_mode()
801 adf7242_write_reg(lp, REG_AUTO_CFG, 0); in adf7242_set_promiscuous_mode()
802 return adf7242_write_reg(lp, REG_FFILT_CFG, in adf7242_set_promiscuous_mode()
810 adf7242_write_reg(lp, REG_FFILT_CFG, in adf7242_set_promiscuous_mode()
816 return adf7242_write_reg(lp, REG_AUTO_CFG, RX_AUTO_ACK_EN); in adf7242_set_promiscuous_mode()
822 struct adf7242_local *lp = hw->priv; in adf7242_set_cca_ed_level() local
825 dev_dbg(&lp->spi->dev, "%s : level %d\n", __func__, level); in adf7242_set_cca_ed_level()
827 return adf7242_write_reg(lp, REG_CCA1, level); in adf7242_set_cca_ed_level()
832 struct adf7242_local *lp = hw->priv; in adf7242_xmit() local
836 disable_irq(lp->spi->irq); in adf7242_xmit()
837 set_bit(FLAG_XMIT, &lp->flags); in adf7242_xmit()
838 cancel_delayed_work_sync(&lp->work); in adf7242_xmit()
839 reinit_completion(&lp->tx_complete); in adf7242_xmit()
840 adf7242_cmd(lp, CMD_RC_PHY_RDY); in adf7242_xmit()
841 adf7242_clear_irqstat(lp); in adf7242_xmit()
843 ret = adf7242_write_fbuf(lp, skb->data, skb->len); in adf7242_xmit()
847 ret = adf7242_cmd(lp, CMD_RC_CSMACA); in adf7242_xmit()
850 enable_irq(lp->spi->irq); in adf7242_xmit()
852 ret = wait_for_completion_interruptible_timeout(&lp->tx_complete, in adf7242_xmit()
857 dev_dbg(&lp->spi->dev, "Timeout waiting for TX interrupt\n"); in adf7242_xmit()
862 if (lp->tx_stat != SUCCESS) { in adf7242_xmit()
863 dev_dbg(&lp->spi->dev, in adf7242_xmit()
865 lp->tx_stat); in adf7242_xmit()
872 clear_bit(FLAG_XMIT, &lp->flags); in adf7242_xmit()
873 adf7242_cmd_rx(lp); in adf7242_xmit()
878 static int adf7242_rx(struct adf7242_local *lp) in adf7242_rx() argument
885 ret = adf7242_read_reg(lp, 0, &len_u8); in adf7242_rx()
892 dev_dbg(&lp->spi->dev, in adf7242_rx()
899 adf7242_cmd_rx(lp); in adf7242_rx()
904 ret = adf7242_read_fbuf(lp, data, len, true); in adf7242_rx()
907 adf7242_cmd_rx(lp); in adf7242_rx()
912 lp->rssi = data[len - 1]; in adf7242_rx()
914 ret = adf7242_cmd_rx(lp); in adf7242_rx()
918 ieee802154_rx_irqsafe(lp->hw, skb, lqi); in adf7242_rx()
920 dev_dbg(&lp->spi->dev, "%s: ret=%d len=%d lqi=%d rssi=%d\n", in adf7242_rx()
921 __func__, ret, (int)len, (int)lqi, lp->rssi); in adf7242_rx()
941 static void adf7242_debug(struct adf7242_local *lp, u8 irq1) in adf7242_debug() argument
946 adf7242_status(lp, &stat); in adf7242_debug()
948 dev_dbg(&lp->spi->dev, "%s IRQ1 = %X:\n%s%s%s%s%s%s%s%s\n", in adf7242_debug()
959 dev_dbg(&lp->spi->dev, "%s STATUS = %X:\n%s\n%s\n%s\n%s\n%s%s%s%s%s\n", in adf7242_debug()
975 struct adf7242_local *lp = data; in adf7242_isr() local
979 mod_delayed_work(lp->wqueue, &lp->work, msecs_to_jiffies(400)); in adf7242_isr()
980 adf7242_read_reg(lp, REG_IRQ1_SRC1, &irq1); in adf7242_isr()
983 dev_err(&lp->spi->dev, "%s :ERROR IRQ1 = 0x%X\n", in adf7242_isr()
986 adf7242_debug(lp, irq1); in adf7242_isr()
988 xmit = test_bit(FLAG_XMIT, &lp->flags); in adf7242_isr()
991 adf7242_wait_status(lp, RC_STATUS_PHY_RDY, in adf7242_isr()
997 adf7242_read_reg(lp, REG_AUTO_STATUS, &astat); in adf7242_isr()
1000 dev_dbg(&lp->spi->dev, "AUTO_STATUS = %X:\n%s%s%s%s\n", in adf7242_isr()
1009 lp->tx_stat = astat; in adf7242_isr()
1011 lp->tx_stat = SUCCESS; in adf7242_isr()
1013 complete(&lp->tx_complete); in adf7242_isr()
1014 adf7242_clear_irqstat(lp); in adf7242_isr()
1017 adf7242_rx(lp); in adf7242_isr()
1018 } else if (!xmit && test_bit(FLAG_START, &lp->flags)) { in adf7242_isr()
1020 dev_dbg(&lp->spi->dev, "%s:%d : ERROR IRQ1 = 0x%X\n", in adf7242_isr()
1022 adf7242_cmd(lp, CMD_RC_PHY_RDY); in adf7242_isr()
1023 adf7242_cmd_rx(lp); in adf7242_isr()
1030 dev_dbg(&lp->spi->dev, "%s:%d : ERROR IRQ1 = 0x%X, xmit %d\n", in adf7242_isr()
1032 adf7242_wait_status(lp, RC_STATUS_PHY_RDY, in adf7242_isr()
1034 complete(&lp->tx_complete); in adf7242_isr()
1035 adf7242_clear_irqstat(lp); in adf7242_isr()
1041 static int adf7242_soft_reset(struct adf7242_local *lp, int line) in adf7242_soft_reset() argument
1043 dev_warn(&lp->spi->dev, "%s (line %d)\n", __func__, line); in adf7242_soft_reset()
1045 if (test_bit(FLAG_START, &lp->flags)) in adf7242_soft_reset()
1046 disable_irq_nosync(lp->spi->irq); in adf7242_soft_reset()
1048 adf7242_cmd(lp, CMD_RC_PC_RESET_NO_WAIT); in adf7242_soft_reset()
1050 adf7242_write_reg(lp, REG_PKT_CFG, ADDON_EN | BIT(2)); in adf7242_soft_reset()
1051 adf7242_cmd(lp, CMD_RC_PHY_RDY); in adf7242_soft_reset()
1052 adf7242_set_promiscuous_mode(lp->hw, lp->promiscuous); in adf7242_soft_reset()
1053 adf7242_set_csma_params(lp->hw, lp->min_be, lp->max_be, in adf7242_soft_reset()
1054 lp->max_cca_retries); in adf7242_soft_reset()
1055 adf7242_clear_irqstat(lp); in adf7242_soft_reset()
1057 if (test_bit(FLAG_START, &lp->flags)) { in adf7242_soft_reset()
1058 enable_irq(lp->spi->irq); in adf7242_soft_reset()
1059 return adf7242_cmd(lp, CMD_RC_RX); in adf7242_soft_reset()
1065 static int adf7242_hw_init(struct adf7242_local *lp) in adf7242_hw_init() argument
1070 adf7242_cmd(lp, CMD_RC_RESET); in adf7242_hw_init()
1071 adf7242_cmd(lp, CMD_RC_IDLE); in adf7242_hw_init()
1078 ret = request_firmware(&fw, FIRMWARE, &lp->spi->dev); in adf7242_hw_init()
1080 dev_err(&lp->spi->dev, in adf7242_hw_init()
1085 ret = adf7242_upload_firmware(lp, (u8 *)fw->data, fw->size); in adf7242_hw_init()
1087 dev_err(&lp->spi->dev, in adf7242_hw_init()
1093 ret = adf7242_verify_firmware(lp, (u8 *)fw->data, fw->size); in adf7242_hw_init()
1095 dev_err(&lp->spi->dev, in adf7242_hw_init()
1101 adf7242_cmd(lp, CMD_RC_PC_RESET); in adf7242_hw_init()
1105 adf7242_write_reg(lp, REG_FFILT_CFG, in adf7242_hw_init()
1111 adf7242_write_reg(lp, REG_AUTO_CFG, RX_AUTO_ACK_EN); in adf7242_hw_init()
1113 adf7242_write_reg(lp, REG_PKT_CFG, ADDON_EN | BIT(2)); in adf7242_hw_init()
1115 adf7242_write_reg(lp, REG_EXTPA_MSC, 0xF1); in adf7242_hw_init()
1116 adf7242_write_reg(lp, REG_RXFE_CFG, 0x1D); in adf7242_hw_init()
1118 adf7242_write_reg(lp, REG_IRQ1_EN0, 0); in adf7242_hw_init()
1119 adf7242_write_reg(lp, REG_IRQ1_EN1, IRQ_RX_PKT_RCVD | IRQ_CSMA_CA); in adf7242_hw_init()
1121 adf7242_clear_irqstat(lp); in adf7242_hw_init()
1122 adf7242_write_reg(lp, REG_IRQ1_SRC0, 0xFF); in adf7242_hw_init()
1124 adf7242_cmd(lp, CMD_RC_IDLE); in adf7242_hw_init()
1131 struct adf7242_local *lp = spi_get_drvdata(file->private); in adf7242_stats_show() local
1134 adf7242_status(lp, &stat); in adf7242_stats_show()
1135 adf7242_read_reg(lp, REG_IRQ1_SRC1, &irq1); in adf7242_stats_show()
1158 seq_printf(file, "RSSI = %d\n", lp->rssi); in adf7242_stats_show()
1163 static void adf7242_debugfs_init(struct adf7242_local *lp) in adf7242_debugfs_init() argument
1168 "adf7242-%s", dev_name(&lp->spi->dev)); in adf7242_debugfs_init()
1170 lp->debugfs_root = debugfs_create_dir(debugfs_dir_name, NULL); in adf7242_debugfs_init()
1172 debugfs_create_devm_seqfile(&lp->spi->dev, "status", lp->debugfs_root, in adf7242_debugfs_init()
1194 struct adf7242_local *lp; in adf7242_probe() local
1202 hw = ieee802154_alloc_hw(sizeof(*lp), &adf7242_ops); in adf7242_probe()
1206 lp = hw->priv; in adf7242_probe()
1207 lp->hw = hw; in adf7242_probe()
1208 lp->spi = spi; in adf7242_probe()
1210 hw->priv = lp; in adf7242_probe()
1250 mutex_init(&lp->bmux); in adf7242_probe()
1251 init_completion(&lp->tx_complete); in adf7242_probe()
1254 lp->stat_xfer.len = 1; in adf7242_probe()
1255 lp->stat_xfer.tx_buf = &lp->buf_stat_tx; in adf7242_probe()
1256 lp->stat_xfer.rx_buf = &lp->buf_stat_rx; in adf7242_probe()
1257 lp->buf_stat_tx = CMD_SPI_NOP; in adf7242_probe()
1259 spi_message_init(&lp->stat_msg); in adf7242_probe()
1260 spi_message_add_tail(&lp->stat_xfer, &lp->stat_msg); in adf7242_probe()
1262 spi_set_drvdata(spi, lp); in adf7242_probe()
1263 INIT_DELAYED_WORK(&lp->work, adf7242_rx_cal_work); in adf7242_probe()
1264 lp->wqueue = alloc_ordered_workqueue(dev_name(&spi->dev), in adf7242_probe()
1266 if (unlikely(!lp->wqueue)) { in adf7242_probe()
1271 ret = adf7242_hw_init(lp); in adf7242_probe()
1281 dev_name(&spi->dev), lp); in adf7242_probe()
1287 ret = ieee802154_register_hw(lp->hw); in adf7242_probe()
1291 dev_set_drvdata(&spi->dev, lp); in adf7242_probe()
1293 adf7242_debugfs_init(lp); in adf7242_probe()
1300 destroy_workqueue(lp->wqueue); in adf7242_probe()
1302 mutex_destroy(&lp->bmux); in adf7242_probe()
1303 ieee802154_free_hw(lp->hw); in adf7242_probe()
1310 struct adf7242_local *lp = spi_get_drvdata(spi); in adf7242_remove() local
1312 debugfs_remove_recursive(lp->debugfs_root); in adf7242_remove()
1314 ieee802154_unregister_hw(lp->hw); in adf7242_remove()
1316 cancel_delayed_work_sync(&lp->work); in adf7242_remove()
1317 destroy_workqueue(lp->wqueue); in adf7242_remove()
1319 mutex_destroy(&lp->bmux); in adf7242_remove()
1320 ieee802154_free_hw(lp->hw); in adf7242_remove()