devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Antoniu Miclaus <antoniu.miclaus@analog.com>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	jic23@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v6 1/2] iio: frequency: adrf6780: add support for ADRF6780
Date: Fri, 16 Jul 2021 17:53:22 +0300	[thread overview]
Message-ID: <CAHp75VcNhJrp4YGZQu1ZB2J4ARtuT2T2p-72H1qn4F+KtZDVoQ@mail.gmail.com> (raw)
In-Reply-To: <20210716114210.141560-1-antoniu.miclaus@analog.com>

On Fri, Jul 16, 2021 at 2:43 PM Antoniu Miclaus
<antoniu.miclaus@analog.com> wrote:
>
> The ADRF6780 is a silicon germanium (SiGe) design, wideband,
> microwave upconverter optimized for point to point microwave
> radio designs operating in the 5.9 GHz to 23.6 GHz frequency
> range.

> Datasheet:
> https://www.analog.com/media/en/technical-documentation/data-sheets/ADRF6780.pdf

Is it one line? If not, please put on one line and drop below the
blank line so it will go as a tag.

>
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>

First question is why not to use the regmap API (I have heard it has
gained support of 17 bit)?

...

> +        depends on COMMON_CLK

Is it mandatory for any function inside the device?

...

> +static int adrf6780_spi_read(struct adrf6780_dev *dev, unsigned int reg,
> +                             unsigned int *val)
> +{
> +       int ret;
> +       struct spi_transfer t = {0};

> +       dev->data[0] = 0x80 | (reg << 1);

This 0x80 I guess is pretty much standard and regmap SPI supports it.

> +       dev->data[1] = 0x0;
> +       dev->data[2] = 0x0;
> +
> +       t.rx_buf = &dev->data[0];
> +       t.tx_buf = &dev->data[0];
> +       t.len = 3;
> +
> +       ret = spi_sync_transfer(dev->spi, &t, 1);
> +       if (ret)
> +               return ret;
> +
> +       *val = (get_unaligned_be24(&dev->data[0]) >> 1) & GENMASK(15, 0);
> +
> +       return ret;
> +}

...

> +       usleep_range(200, 250);

Needs a comment.

-- 
With Best Regards,
Andy Shevchenko

  parent reply	other threads:[~2021-07-16 14:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16 11:42 [PATCH v6 1/2] iio: frequency: adrf6780: add support for ADRF6780 Antoniu Miclaus
2021-07-16 11:42 ` [PATCH v6 2/2] dt-bindings: iio: frequency: add adrf6780 doc Antoniu Miclaus
2021-07-17 14:21   ` Jonathan Cameron
2021-07-20 14:05     ` Miclaus, Antoniu
2021-07-16 14:53 ` Andy Shevchenko [this message]
2021-07-20 13:17   ` [PATCH v6 1/2] iio: frequency: adrf6780: add support for ADRF6780 Miclaus, Antoniu
2021-07-20 14:07     ` Andy Shevchenko
2021-07-20 14:33       ` Miclaus, Antoniu
2021-07-20 14:52         ` Andy Shevchenko
2021-07-17 13:26 ` Jonathan Cameron
2021-07-20 13:34   ` Miclaus, Antoniu
2021-07-24 16:26     ` Jonathan Cameron
2021-07-17 13:58 ` Jonathan Cameron
2021-07-19  0:35 ` kernel 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=CAHp75VcNhJrp4YGZQu1ZB2J4ARtuT2T2p-72H1qn4F+KtZDVoQ@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=antoniu.miclaus@analog.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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).