mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v3 3/3] sandbox: add i2c and spi libftdi1 bit-bang example
Date: Fri, 26 Jan 2018 11:37:46 +0300	[thread overview]
Message-ID: <20180126113746.1e553bd2ecf343bb0676988e@gmail.com> (raw)
In-Reply-To: <20180125071236.q7ce2jwqnhrngmm6@pengutronix.de>

On Thu, 25 Jan 2018 08:12:36 +0100
Sascha Hauer <s.hauer@pengutronix.de> wrote:

> On Mon, Jan 22, 2018 at 12:59:18PM +0300, Antony Pavlov wrote:
> > Make necessary changes in sandbox_defconfig:
> > enable gpio, spi, i2c and led stuff.
> > 
> > Usage:
> > 
> >   barebox$ make sandbox_defconfig
> >   barebox$ sed -i "s/# CONFIG_GPIO_LIBFTDI1.*$/CONFIG_GPIO_LIBFTDI1=y/" .config
> > 
> >   # edit arch/sandbox/dts/sandbox-libftdi-example.dtsi
> > 
> >   barebox$ echo '#include "sandbox-libftdi-example.dtsi"' >> arch/sandbox/dts/sandbox.dts
> >   barebox$ make
> >   barebox$ sudo ./barebox -d arch/sandbox/dts/sandbox.dtb
> > 
> > Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> > ---
> >  arch/sandbox/configs/sandbox_defconfig        | 21 ++++++-
> >  arch/sandbox/dts/sandbox-libftdi-example.dtsi | 80 +++++++++++++++++++++++++++
> >  2 files changed, 100 insertions(+), 1 deletion(-)
> > 
> > +++ b/arch/sandbox/dts/sandbox-libftdi-example.dtsi
> > @@ -0,0 +1,80 @@
> > +#include <dt-bindings/gpio/gpio.h>
> > +
> > +/ {
> > +	gpio0: gpio@0 {
> > +		compatible = "barebox,libftdi1-gpio";
> > +		usb,id_vendor = <0x0403>;
> > +		usb,id_product = <0x6010>;
> > +
> > +		/*
> > +		 * The serial number can be used to select
> > +		 * a specific device in case more than
> > +		 * one is connected to the host.
> > +		 */
> > +		/* usb,i_serial_number = "20180120"; */
> > +
> > +		/* use ACBUS[7:0] */
> > +		gpio-controller;
> > +		#gpio-cells = <2>;
> > +
> > +		status = "okay";
> > +	};
> > +
> > +	spi0: spi0 {
> > +		compatible = "spi-gpio";
> > +		#address-cells = <1>;
> > +		#size-cells = <0>;
> > +
> > +		gpio-sck  = <&gpio0 0 GPIO_ACTIVE_HIGH>;
> > +		gpio-mosi = <&gpio0 1 GPIO_ACTIVE_HIGH>;
> > +		gpio-miso = <&gpio0 2 GPIO_ACTIVE_HIGH>;
> > +		cs-gpios  = <&gpio0 3 GPIO_ACTIVE_HIGH>;
> > +
> > +		num-chipselects = <1>;
> > +
> > +		status = "disabled";
> 
> Given that this is an example which is not used unless you include it
> manually I think you can remove the status properties.
> 
> Otherwise this series looks fine to me. I can remove the properties
> while applying if you like.

Without status properties this file will be more fail-safe.
Please remove the properties and apply the patches.

Please note that this patcheseries does not use parseopt_*() functions
so nobody uses the commit 'parseopt: introduce parseopt_u16() and parseopt_str()'.

-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2018-01-26  8:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-22  9:59 [PATCH v3 0/3] sandbox: add gpio support with libftdi1 Antony Pavlov
2018-01-22  9:59 ` [PATCH v3 1/3] sandbox: avoid symbol conflict for {open, read, close}dir Antony Pavlov
2018-01-22  9:59 ` [PATCH v3 2/3] sandbox: add gpio support with libftdi1 Antony Pavlov
2018-01-22  9:59 ` [PATCH v3 3/3] sandbox: add i2c and spi libftdi1 bit-bang example Antony Pavlov
2018-01-25  7:12   ` Sascha Hauer
2018-01-26  8:37     ` Antony Pavlov [this message]
2018-01-29  7:28       ` Sascha Hauer
2018-01-24  9:10 ` [PATCH v3 0/3] sandbox: add gpio support with libftdi1 Antony Pavlov

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=20180126113746.1e553bd2ecf343bb0676988e@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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