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]
Date:   Tue, 10 Apr 2018 08:57:49 -0500
From:   Rob Herring <robh@...nel.org>
To:     "H. Nikolaus Schaller" <hns@...delico.com>
Cc:     galak@...eaurora.org, andy.shevchenko@...il.com,
        Pawel Moll <pawel.moll@....com>,
        Mark Rutland <mark.rutland@....com>,
        Ian Campbell <ijc+devicetree@...lion.org.uk>,
        Linus Walleij <linus.walleij@...aro.org>,
        Alexandre Courbot <gnurou@...il.com>,
        devicetree@...r.kernel.org, linux-gpio@...r.kernel.org,
        linux-kernel@...r.kernel.org, letux-kernel@...nphoenux.org,
        kernel@...a-handheld.com
Subject: Re: [PATCH v2 5/5] DTS: Bindings: pca953x: add example how to use
 interrupt-controller and gpio-controller

On Wed, Apr 04, 2018 at 09:00:24PM +0200, H. Nikolaus Schaller wrote:
> It is not completely obvious that these are required as
> some .dts files don't specify them.
> 
> Signed-off-by: H. Nikolaus Schaller <hns@...delico.com>
> ---
>  .../devicetree/bindings/gpio/gpio-pca953x.txt      | 33 ++++++++++++++++++++++
>  1 file changed, 33 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt b/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt
> index 6a7cddb187c1..7f3b50a6d681 100644
> --- a/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt
> +++ b/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt
> @@ -36,6 +36,10 @@ Optional properties:
>   - reset-gpios: GPIO specification for the RESET input. This is an
>  		active low signal to the PCA953x.
>   - vcc-supply:	power supply regulator.
> + - gpio-controller: if used as gpio expander.
> + - #gpio-cells: if used as gpio expander.
> + - interrupt-controller: if to be used as interrupt expander.
> + - #interrupt-cells: if to be used as interrupt expander.

These should be required. It's a mistake if dts files don't have them.

>  
>  Example:
>  
> @@ -48,3 +52,32 @@ Example:
>  		interrupt-parent = <&gpio3>;
>  		interrupts = <23 IRQ_TYPE_LEVEL_LOW>;
>  	};
> +
> +
> +Example with Interrupts:
> +
> +
> +	gpio99: tca6424@22 {

gpio@22

> +		compatible = "nxp,pcal6524";
> +		reg = <0x22>;
> +		interrupt-parent = <&gpio6>;
> +		interrupts = <1 IRQ_TYPE_EDGE_FALLING>;	/* gpio6_161 */
> +		interrupt-controller;
> +		#interrupt-cells = <2>;
> +		vcc-supply = <&vdds_1v8_main>;
> +		gpio-controller;
> +		#gpio-cells = <2>;
> +		gpio-line-names =
> +			"hdmi-ct-hpd", "hdmi.ls-oe", "p02", "p03", "vibra", "fault2", "p06", "p07",
> +			"en-usb", "en-host1", "en-host2", "chg-int", "p14", "p15", "mic-int", "en-modem",
> +			"shdn-hs-amp", "chg-status+red", "green", "blue", "en-esata", "fault1", "p26", "p27";
> +	};
> +
> +	ts3a227@3b {
> +		compatible = "ti,ts3a227e";
> +		reg = <0x3b>;
> +		interrupt-parent = <&gpio99>;
> +		interrupts = <14 IRQ_TYPE_EDGE_RISING>;
> +		ti,micbias = <0>;	/* 2.1V */
> +	};
> +
> -- 
> 2.12.2
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ