linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Hennerich <michael.hennerich@analog.com>
To: Stefan Schmidt <stefan@osg.samsung.com>, <alex.aring@gmail.com>,
	<stefan@datenfreihafen.org>, <marcel@holtmann.org>
Cc: <linux-wpan@vger.kernel.org>, <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH v2] drivers/net/ieee802154/adf7242: Driver for ADF7242 MAC IEEE802154
Date: Tue, 8 Dec 2015 15:41:53 +0100	[thread overview]
Message-ID: <5666EC31.1000608@analog.com> (raw)
In-Reply-To: <5666DD06.1080005@osg.samsung.com>

On 12/08/2015 02:37 PM, Stefan Schmidt wrote:
> Hello.
>
> On 08/12/15 12:52, michael.hennerich@analog.com wrote:
>> From: Michael Hennerich <michael.hennerich@analog.com>
>>


>> +    ret = devm_request_threaded_irq(&spi->dev, spi->irq, NULL,
>> adf7242_isr,
>> +                    irq_type | IRQF_ONESHOT,
>> +                    dev_name(&spi->dev), lp);
>> +    if (ret)
>> +        goto err_hw_init;
>> +
>> +    disable_irq(spi->irq);
>> +
>> +    ret = ieee802154_register_hw(lp->hw);
>> +    if (ret)
>> +        goto err_hw_init;
>> +
>> +    dev_set_drvdata(&spi->dev, lp);
>> +
>> +    adf7242_debugfs_init(lp);
>
> Hmm, you want to have DEBUG_FS support always enabled? I was expecting
> to have it enabled behind a driver debug option as it should not be
> needed during normal usage. I also expected the firmware_verify function
> to be triggered from there but I don't have a string opinion on that one.
>
> The Kconfig setup misses a "depends on DEBUG_FS".


Well - most debugfs function have empty return -ENODEV function stubs in 
case CONFIG_DEBUG_FS is not set.
It was done to avoid the ifdef and depends mess.
So this can stay the way it is.


>
>
>
>> +
>> +    dev_info(&spi->dev, "mac802154 IRQ-%d registered\n", spi->irq);
>> +
>> +    return ret;
>> +
>> +    ieee802154_unregister_hw(lp->hw);
>> +err_hw_init:
>> +    mutex_destroy(&lp->bmux);
>> +    ieee802154_free_hw(lp->hw);
>> +
>> +    return ret;
>> +}
>> +
>> +static int adf7242_remove(struct spi_device *spi)
>> +{
>> +    struct adf7242_local *lp = spi_get_drvdata(spi);
>> +
>> +    if (!IS_ERR_OR_NULL(lp->debugfs_root))
>> +        debugfs_remove_recursive(lp->debugfs_root);
>> +
>> +    ieee802154_unregister_hw(lp->hw);
>> +    mutex_destroy(&lp->bmux);
>> +    ieee802154_free_hw(lp->hw);
>> +
>> +    return 0;
>> +}
>> +
>> +static const struct of_device_id adf7242_of_match[] = {
>> +    { .compatible = "adi,adf7242", },
>> +    { },
>> +};
>> +MODULE_DEVICE_TABLE(of, adf7242_of_match);
>> +
>> +static const struct spi_device_id adf7242_device_id[] = {
>> +    { .name = "adf7242", },
>> +    { },
>> +};
>> +MODULE_DEVICE_TABLE(spi, adf7242_device_id);
>> +
>> +static struct spi_driver adf7242_driver = {
>> +    .id_table = adf7242_device_id,
>> +    .driver = {
>> +           .of_match_table = of_match_ptr(adf7242_of_match),
>> +           .name = "adf7242",
>> +           .owner = THIS_MODULE,
>> +           },
>> +    .probe = adf7242_probe,
>> +    .remove = adf7242_remove,
>> +};
>> +
>> +module_spi_driver(adf7242_driver);
>> +
>> +MODULE_AUTHOR("Michael Hennerich <michael.hennerich@analog.com>");
>> +MODULE_DESCRIPTION("ADF7242 IEEE802.15.4 Transceiver Driver");
>> +MODULE_LICENSE("GPL");
>>
>
> Besides the question about having DEBUG_FS enabled by default I think
> this one is fine now to go in.
>
> Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
>
> I will do some testing on the hardware later today and scream if
> something strange shows up.
>
> regards
> Stefan Schmidt
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


-- 
Greetings,
Michael

--
Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin,
Margaret Seif

  parent reply	other threads:[~2015-12-08 14:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-08 11:52 [PATCH v2] drivers/net/ieee802154/adf7242: Driver for ADF7242 MAC IEEE802154 michael.hennerich
2015-12-08 13:37 ` Stefan Schmidt
2015-12-08 14:05   ` Stefan Schmidt
2015-12-08 14:44     ` Michael Hennerich
2015-12-08 14:56     ` Michael Hennerich
2015-12-08 15:13       ` Stefan Schmidt
2015-12-08 14:41   ` Michael Hennerich [this message]
2015-12-08 14:30 ` Stefan Schmidt
2015-12-08 14:45   ` Michael Hennerich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5666EC31.1000608@analog.com \
    --to=michael.hennerich@analog.com \
    --cc=alex.aring@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=stefan@datenfreihafen.org \
    --cc=stefan@osg.samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).