All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: David Julian Veenstra <davidjulianveenstra@gmail.com>
Cc: <linux-iio@vger.kernel.org>
Subject: Re: Moving ad2s1200 out of staging
Date: Mon, 12 Mar 2018 17:05:07 +0000	[thread overview]
Message-ID: <20180312180507.0000581f@huawei.com> (raw)
In-Reply-To: <64cf50ba-b741-7799-b944-7950ec80e35b@gmail.com>

On Mon, 12 Mar 2018 16:36:50 +0100
David Julian Veenstra <davidjulianveenstra@gmail.com> wrote:

> Dear IIO Community,
> 
> I have looked at the ad2s1200 driver. To clean up the code, I propose
> the following:
> 
> 1. Replace Licence with SPDX identifier
This ha proved controversial and certainly isn't necessary to move
a driver out of staging.

> 2. Reorder variable declarations to prefer reverse
>     Christmas tree ordering.
> 3. Add newlines (e.g. before return statement)
> 4. Add documentation to the device specific struct
> 5. Sort headers alphabetically
> 6. Remove indexed property for channels as only a single channel is needed
>     per type
> 
> If I understand the manual correctly, the unit of the angular velocity is
> rps (not entirely sure). So to conform the IIO ABI, a scaling factor
> needs to
> be added (IIO_CHAN_INFO_SCALE). In addition it also misses either a
> MOD_X, MOD_Y, or MOD_Z.
Nature of resolvers is they don't have any concept of an axis like that
so I wouldn't expect a modifier.

> 
> The documentation in Documentation/ABI/testing/sysfs-bus-iio does not
> define what the unit should be for an angle. If the velocity is defined
> as radians
> per second, it would make sense for the angle to be defined in radians.
> Is there
> any agreement of what the unit should be for angles?
There are other angle measurements already in place be it not simple axial
rotation ones so we need to match them.
See in_incli_x_raw for example.

> 
> Besides missing features, I did not find anything else wrong with the
> driver.
Cool - run through the changes you suggest and then propose a move.
At that point you'll get a thorough review to see if there is anything
much else that needs doing.

I can see some more issues so I'll give a few hints:
1) How much is platform data used these days?
2) Does the platform data there conform to how we do things these days?

> 
> Best regards,
> David Veenstra
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  reply	other threads:[~2018-03-12 17:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-12 15:36 Moving ad2s1200 out of staging David Julian Veenstra
2018-03-12 17:05 ` Jonathan Cameron [this message]
2018-03-13 22:11   ` David Julian Veenstra

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=20180312180507.0000581f@huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=davidjulianveenstra@gmail.com \
    --cc=linux-iio@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 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.