linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rask Ingemann Lambertsen <ccc94453@vip.cybercity.dk>
To: james@innovum.com.au
Cc: maxime.ripard@freeelectrons.com, robh+dt@kernel.com,
	mark.rutland@arm.com, linux@armlinux.org.uk, wens@csie.org,
	devicetree@vger.kernel.org, linux-sunxi@googlegroups.com,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/1] ARM: dts: sun8i: Add dts file for the NanoPi NEO SBC
Date: Sun, 4 Sep 2016 22:13:22 +0200	[thread overview]
Message-ID: <20160904201322.ec4rovp24fxp2dn5@x1-6-00-0f-9f-c6-3e-90.cpe.webspeed.dk> (raw)
In-Reply-To: <1472701734-1837-1-git-send-email-james@innovum.com.au>

On Thu, Sep 01, 2016 at 01:48:54PM +1000, james@innovum.com.au wrote:

> +#include <dt-bindings/input/input.h>

You don't seem to use anything from that header file.

> +#include <dt-bindings/pinctrl/sun4i-a10.h>
> +
> +/ {
> +	model = "FriendlyARM NanoPi NEO";
> +	compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3";

It is good practice to add new vendor prefixes to the list in
Documentation/devicetree/bindings/vendor-prefixes.txt (sorted alphabetially
by vendor prefix).

> +	leds {
> +		compatible = "gpio-leds";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&leds_opc>, <&leds_r_opc>;
> +
> +		pwr_led {
> +			label = "nanopi:green:pwr";
> +			gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
> +			default-state = "on";
> +		};
> +
> +		status_led {
> +			label = "nanopi:blue:status";
> +			gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>;
> +		};
> +	};

Node names should not have underscores in them. [1][2]
IMHO the _led suffix is unnecessary inside leds { }.
I think you should add a comment with the name of the GPIO pin like you
did with &mmc0/cd-gpios.

> +&pio {
> +	leds_opc: led_pins@0 {
> +		allwinner,pins = "PA10";
> +		allwinner,function = "gpio_out";
> +		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +	};
> +};

Use hyphens instead of underscores in node names. Also, unit addresses and
reg properties go together. Either you have both or you have neither. So
drop the @0 part of the node name. You'll get warnings about this sort of
mismatch when your device tree is compiled as part of Das U-Boot.

> +&r_pio {
> +	leds_r_opc: led_pins@0 {

Likewise.

[1] https://www.mail-archive.com/linux-kernel%40vger.kernel.org/msg1122967.html
[2] https://www.mail-archive.com/linux-kernel%40vger.kernel.org/msg1145633.html

-- 
Rask Ingemann Lambertsen

  reply	other threads:[~2016-09-04 20:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-01  3:48 [PATCH 1/1] ARM: dts: sun8i: Add dts file for the NanoPi NEO SBC james
2016-09-04 20:13 ` Rask Ingemann Lambertsen [this message]
2016-09-05  0:42 ` [PATCH v2] " James Pettigrew
2016-09-05  2:35   ` kbuild test robot
2016-09-05  4:31 ` [PATCH v3] " James Pettigrew
2016-09-05 12:06   ` Maxime Ripard
2016-09-05 18:31   ` Rask Ingemann Lambertsen
2016-09-05 22:15 ` [PATCH v4 0/2] ARM: sunxi: Add support for FriendlyARM " James Pettigrew
2016-09-05 22:15   ` [PATCH v4 1/2] ARM: dts: sun8i: Add dts file for the " James Pettigrew
2016-09-05 22:15   ` [PATCH v4 2/2] devicetree: Add vendor prefix for FriendlyARM James Pettigrew
2016-09-06  2:41     ` [linux-sunxi] " Chen-Yu Tsai
2016-09-06  6:41   ` [PATCH v4 0/2] ARM: sunxi: Add support for FriendlyARM NanoPi NEO SBC Maxime Ripard

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=20160904201322.ec4rovp24fxp2dn5@x1-6-00-0f-9f-c6-3e-90.cpe.webspeed.dk \
    --to=ccc94453@vip.cybercity.dk \
    --cc=devicetree@vger.kernel.org \
    --cc=james@innovum.com.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=maxime.ripard@freeelectrons.com \
    --cc=robh+dt@kernel.com \
    --cc=wens@csie.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).