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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170522182119.GN29447@lunn.ch>
Date:   Mon, 22 May 2017 20:21:19 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Nikita Yushchenko <nikita.yoush@...entembedded.com>
Cc:     Stefan Agner <stefan@...er.ch>,
        Mark Rutland <mark.rutland@....com>,
        devicetree@...r.kernel.org, Jeff White <Jeff.White@....aero>,
        Russell King <linux@...linux.org.uk>,
        linux-kernel@...r.kernel.org, Rob Herring <robh+dt@...nel.org>,
        Jonathan Cameron <jic23@...nel.org>,
        Sascha Hauer <kernel@...gutronix.de>,
        Vladimir Barinov <vladimir.barinov@...entembedded.com>,
        Shawn Guo <shawnguo@...nel.org>,
        linux-arm-kernel@...ts.infradead.org,
        Chris Healy <Chris.Healy@....aero>
Subject: Re: [PATCH] ARM: dts: vf610-zii-dev-rev-b: add hi8435 device

On Mon, May 22, 2017 at 07:29:14PM +0300, Nikita Yushchenko wrote:
> >> +	hi8435@1 {
> >> +		compatible = "holt,hi8435";
> >> +		reg = <1>;
> >> +		spi-max-frequency = <20000000>;
> >> +		gpios = <&gpio5 3 0>;
> > 
> > Nit: GPIO_ACTIVE_HIGH instead of 0?
> 
> Gray area here.
> 
> Chip's reset input is active LOW.

Nikita

There second issue here is that you are going to be getting newbies
looking at .dts files and submitting patches to replace the 0 with
GPIO_ACTIVE_HIGH in all files, just like they submit patches fixing
checkpatch warnings. 

> However, hi8435 driver historically was coded using inverted values
> passed to gpiolib calls.  And there are setups in the wild with device
> trees containing GPIO_ACTIVE_HIGH that I'd prefer not breaking.
> 
> To solve, I submitted a patch on hi8435 driver that changes to _raw()
> gpio calls (thus making it independent of what is written in device
> tree), and want [future] device trees not to contain explicitly written
> gpio polarity.

So maybe add another #define, GPIO_ACTIVE_IGNORED, to make it clear
that it does not matter what value you put there, it is ignored.

     Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ