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: <20181207195528.GD1294@lunn.ch>
Date:   Fri, 7 Dec 2018 20:55:28 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Marek Vasut <marex@...x.de>
Cc:     netdev@...r.kernel.org, f.fainelli@...il.com,
        vivien.didelot@...oirfairelinux.com, Woojung.Huh@...rochip.com,
        UNGLinuxDriver@...rochip.com,
        "David S . Miller" <davem@...emloft.net>,
        Tristram Ha <Tristram.Ha@...rochip.com>
Subject: Re: [PATCH] net: dsa: ksz: Add reset GPIO handling

> +	dev->reset_gpio = -1;
> +	reset_gpio = of_get_named_gpio_flags(np, "reset-gpios", 0,
> +					     &reset_gpio_flags);
> +	if (reset_gpio >= 0) {
> +		flags = (reset_gpio_flags == OF_GPIO_ACTIVE_LOW) ?
> +			GPIOF_ACTIVE_LOW : 0;

Can you use devm_gpiod_get_optional()? It makes this a lot simpler.
Take a look at mv88e6xxx/chip.c which also uses a GPIO for reset.

You also need to update the binding documentation for this new
property.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ