All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Schmidt <stefan@osg.samsung.com>
To: michael.hennerich@analog.com, alex.aring@gmail.com, marcel@holtmann.org
Cc: linux-wpan@vger.kernel.org, linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] drivers/net/ieee802154/adf7242: Driver for ADF7242 MAC IEEE802154
Date: Mon, 7 Dec 2015 16:03:41 +0100	[thread overview]
Message-ID: <56659FCD.8040600@osg.samsung.com> (raw)
In-Reply-To: <56657FCA.9000502@analog.com>

Hello.

On 07/12/15 13:47, Michael Hennerich wrote:
> On 12/04/2015 01:07 PM, Stefan Schmidt wrote:

[snip]

>>> +}
>>> +
>>> +static int adf7242_verify_firmware(struct adf7242_local *lp,
>>> +                   const u8 *data, size_t len)
>>
>> Could it really happen that we upload the firmware, getting fine status
>> codes back from spi_sync and this have a broken firmware in ram? To me
>> it looks like a safety measure for something that should never happen.
>> But I don't know the hardware.
>
> It's a safety measure and should never happen.
> I've added it while working with some broken SPI master driver some 
> time ago. I can remove it.
>

Hmm, I would not have it running for every init as almost all device 
should be fine. On the other hand having it for debugging might be handy 
as you already needed it once. I would say its up to you if you want to 
keep it in the driver. If you do please but is also behind the debugfs 
interface you will add for the status. That way you can keep the code 
around but only use it for its intended debugging purpose.
>>> +
>>> +    db = DIV_ROUND_CLOSEST(db + 29, 2);
>>> +
>>> +    if (db > 15) {
>>> +        dbias = 21;
>>> +        bias_ctrl = 63;
>>> +    } else {
>>> +        dbias = 13;
>>> +        bias_ctrl = 55;
>>
>> What the meaning of the values here? 21, 63, 13, 55
>
> Some BIAS values from the datasheet.
> IIRC starting some power level they need to be set differently.
>

Maybe some define's here instead of some magic values?
>>> +
>>> +static struct ieee802154_ops adf7242_ops = {
>>> +    .owner = THIS_MODULE,
>>> +    .xmit_sync = adf7242_xmit,
>>> +    .ed = adf7242_ed,
>>> +    .set_channel = adf7242_channel,
>>> +    .set_hw_addr_filt = adf7242_set_hw_addr_filt,
>>> +    .start = adf7242_start,
>>> +    .stop = adf7242_stop,
>>> +    .set_csma_params = adf7242_set_csma_params,
>>> +    .set_frame_retries = adf7242_set_frame_retries,
>>> +    .set_txpower = adf7242_set_txpower,
>>> +    .set_promiscuous_mode = adf7242_set_promiscuous_mode,
>>> +    .set_cca_ed_level = adf7242_set_cca_ed_level,
>>
>> Nice to see so many callbacks implemented. The only things I see missing
>> is xmit_async, set_lbt and set_cca_mode. I would not make it a
>> requirements to get these hooked up before merging this patch but we
>> should consider it as todo items.
>
> The part only supports CCA mode Energy above threshold.
> Not sure what this LBT mode does on the AT86RFxxx driver.

Sorry, my bad. Alex already pointed it out in the other mail. That is a 
sub-GHz requirement but adf7242 is a 2.4 GHz driver only so no need for lbt.

> The ADF7242 only supports CSMA-CA and not some other listen before 
> talk flavour. The only oher option is to turn CSMA-CA completly off.
> I'm also not sure if we need to supprot the async mode, while the sync 
> mode is working. For me the async mode looks like it tries to 
> workaround some HW access issues.
>

I will comment on these on the other mails Alex already answered.

>
>> Something worth thinking about might also be the usage of regmap.
>
> Given the number of different spi transaction formats I don't think a 
> regmap only approach can work here.
> Mixing things will not improve things either. So I prefer it the way 
> it is right now.

That would be ok with me. We did it for some other drivers and in my 
opinion it helped readability but if you think it would be worse for 
your driver I'm not demanding it.
>
> Thanks for taking the time to review things!
> I'll send V2 later this week.
>

Cool. Looking forward to it.

regards
Stefan Schmidt

  parent reply	other threads:[~2015-12-07 15:03 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-04  9:09 [PATCH] drivers/net/ieee802154/adf7242: Driver for ADF7242 MAC IEEE802154 michael.hennerich
2015-12-04  9:09 ` michael.hennerich
2015-12-04 12:07 ` Stefan Schmidt
2015-12-07 12:02   ` Stefan Schmidt
2015-12-07 12:18     ` Michael Hennerich
2015-12-07 12:18       ` Michael Hennerich
2015-12-07 13:25       ` Alexander Aring
2015-12-07 13:34         ` Michael Hennerich
2015-12-07 13:34           ` Michael Hennerich
2015-12-07 14:12           ` Alexander Aring
2015-12-08  8:07             ` Michael Hennerich
2015-12-08  8:07               ` Michael Hennerich
2015-12-08 15:53               ` Alexander Aring
2015-12-08 16:02                 ` Michael Hennerich
2015-12-08 16:02                   ` Michael Hennerich
2015-12-09 10:31                   ` Alexander Aring
2015-12-10  0:04                     ` Stefan Schmidt
2015-12-07 15:08         ` Stefan Schmidt
2015-12-07 14:54       ` Stefan Schmidt
2015-12-07 12:47   ` Michael Hennerich
2015-12-07 12:47     ` Michael Hennerich
2015-12-07 13:53     ` Alexander Aring
2015-12-08  8:43       ` Michael Hennerich
2015-12-08  8:43         ` Michael Hennerich
2015-12-08 17:11         ` Alexander Aring
2015-12-09  9:53           ` Michael Hennerich
2015-12-09  9:53             ` Michael Hennerich
2015-12-09 14:55             ` Alexander Aring
2015-12-09 16:09               ` Michael Hennerich
2015-12-09 16:09                 ` Michael Hennerich
2015-12-07 15:03     ` Stefan Schmidt [this message]
2015-12-04 12:42 ` Christopher Friedt
2015-12-04 13:34 ` kbuild test robot
2015-12-04 13:34   ` kbuild test robot
2015-12-04 13:41 ` kbuild test robot
2015-12-04 13:41   ` kbuild test robot

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=56659FCD.8040600@osg.samsung.com \
    --to=stefan@osg.samsung.com \
    --cc=alex.aring@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=michael.hennerich@analog.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.