Date:2011-07-06 21:50:36 (9 years 6 days ago)
Author:Werner Almesberger
Commit:7a7da98f755be058951bea165fcf6c83a5b2537e
Message:Revert "ieee802154/at86rf230: Be more verbose and disable irq handling for now"

This reverts commit 88bf9af396b0ad297328394c29d6ab5ea04e5aac.

We now support interrupts. Revert the driver to its formers self.
Files: drivers/ieee802154/at86rf230.c (5 diffs)

Change Details

drivers/ieee802154/at86rf230.c
7474
7575    buf[0] = (addr & CMD_REG_MASK) | CMD_REG | CMD_WRITE;
7676    buf[1] = data;
77    dev_info(&lp->spi->dev, "write buf[0] = %02x\n", buf[0]);
78    dev_info(&lp->spi->dev, "write buf[1] = %02x\n", buf[1]);
77    dev_vdbg(&lp->spi->dev, "buf[0] = %02x\n", buf[0]);
78    dev_vdbg(&lp->spi->dev, "buf[1] = %02x\n", buf[1]);
7979    spi_message_init(&msg);
8080    spi_message_add_tail(&xfer, &msg);
8181
8282    status = spi_sync(lp->spi, &msg);
83    dev_info(&lp->spi->dev, "write status = %d\n", status);
83    dev_vdbg(&lp->spi->dev, "status = %d\n", status);
8484    if (msg.status)
8585        status = msg.status;
86    dev_info(&lp->spi->dev, "write status = %d\n", status);
87    dev_info(&lp->spi->dev, "write buf[0] = %02x\n", buf[0]);
88    dev_info(&lp->spi->dev, "write buf[1] = %02x\n", buf[1]);
86    dev_vdbg(&lp->spi->dev, "status = %d\n", status);
87    dev_vdbg(&lp->spi->dev, "buf[0] = %02x\n", buf[0]);
88    dev_vdbg(&lp->spi->dev, "buf[1] = %02x\n", buf[1]);
8989
9090    return status;
9191}
...... 
105105
106106    buf[0] = (addr & CMD_REG_MASK) | CMD_REG;
107107    buf[1] = 0xff;
108    dev_info(&lp->spi->dev, "buf[0] = 0x%02x\n", buf[0]);
108    dev_vdbg(&lp->spi->dev, "buf[0] = %02x\n", buf[0]);
109109    spi_message_init(&msg);
110110    spi_message_add_tail(&xfer, &msg);
111111
112112    status = spi_sync(lp->spi, &msg);
113    dev_info(&lp->spi->dev, "status = %d\n", status);
113    dev_vdbg(&lp->spi->dev, "status = %d\n", status);
114114    if (msg.status)
115115        status = msg.status;
116    dev_info(&lp->spi->dev, "status = %d\n", status);
117    dev_info(&lp->spi->dev, "buf[0] = 0x%02x\n", buf[0]);
118    dev_info(&lp->spi->dev, "buf[1] = 0x%02x\n", buf[1]);
116    dev_vdbg(&lp->spi->dev, "status = %d\n", status);
117    dev_vdbg(&lp->spi->dev, "buf[0] = %02x\n", buf[0]);
118    dev_vdbg(&lp->spi->dev, "buf[1] = %02x\n", buf[1]);
119119
120120    if (status == 0)
121121        *data = buf[1];
...... 
784784    rc = at86rf230_hw_init(lp);
785785    if (rc)
786786        goto err_gpio_dir;
787#if 0
787
788788    rc = request_irq(spi->irq, at86rf230_isr, IRQF_SHARED,
789789            dev_name(&spi->dev), lp);
790790    if (rc)
791791        goto err_gpio_dir;
792#endif
792
793793    dev_dbg(&spi->dev, "registered at86rf230\n");
794794
795795    rc = ieee802154_register_device(lp->dev);
...... 
799799    return rc;
800800
801801err_irq:
802// disable_irq(spi->irq);
803// flush_work(&lp->irqwork);
804// free_irq(spi->irq, lp);
802    disable_irq(spi->irq);
803    flush_work(&lp->irqwork);
804    free_irq(spi->irq, lp);
805805err_gpio_dir:
806806    if (gpio_is_valid(lp->slp_tr))
807807        gpio_free(lp->slp_tr);
...... 
825825     * disable_irq ? -- wa
826826     */
827827    ieee802154_unregister_device(lp->dev);
828#if 0
828
829829    disable_irq(spi->irq);
830830    flush_work(&lp->irqwork);
831831    free_irq(spi->irq, lp);
832#endif
832
833833    if (gpio_is_valid(lp->slp_tr))
834834        gpio_free(lp->slp_tr);
835835    if (gpio_is_valid(lp->rstn))
836836        gpio_free(lp->rstn);
837837
838    //if (spi)
839838    spi_set_drvdata(spi, NULL);
840839    mutex_destroy(&lp->bmux);
841840    ieee802154_free_device(lp->dev);

Archive Download the corresponding diff file



interactive