lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170612163814.rgbvb54hgxsdj6tf@sirena.org.uk>
Date:   Mon, 12 Jun 2017 17:38:14 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:     Shawn Lin <shawn.lin@...k-chips.com>,
        Jeffy Chen <jeffy.chen@...k-chips.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Mark Rutland <mark.rutland@....com>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        Brian Norris <briannorris@...omium.org>,
        Heiko Stuebner <heiko@...ech.de>,
        Doug Anderson <dianders@...omium.org>,
        linux-spi <linux-spi@...r.kernel.org>,
        "open list:ARM/Rockchip SoC..." <linux-rockchip@...ts.infradead.org>,
        Rob Herring <robh+dt@...nel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 1/2] spi: rockchip: add support for "cs-gpios" dts
 property

On Mon, Jun 12, 2017 at 10:18:06AM +0200, Geert Uytterhoeven wrote:
> On Mon, Jun 12, 2017 at 9:15 AM, Shawn Lin <shawn.lin@...k-chips.com> wrote:
> > On 2017/6/12 14:14, Jeffy Chen wrote:

> >>   +static int rockchip_spi_setup(struct spi_device *spi)
> >> +{
> >> +       int ret = 0;
> >> +       unsigned long flags = (spi->mode & SPI_CS_HIGH) ?
> >> +                             GPIOF_OUT_INIT_LOW : GPIOF_OUT_INIT_HIGH;
> >> +       struct rockchip_spi_data *data = spi_get_ctldata(spi);
> >> +
> >> +       if (!gpio_is_valid(spi->cs_gpio))
> >> +               return 0;

> > return -EINVAL?

> Isn't this check meant to fall back to hardware CS if no cs-gpios property
> is present?

I'd expect it to, otherwise the cs-gpios property is actualy mandatory.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ