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: <87ppajxbt3.fsf@free.fr>
Date:	Tue, 13 Jan 2015 10:35:52 +0100
From:	Robert Jarzmik <robert.jarzmik@...e.fr>
To:	Paul Zimmerman <Paul.Zimmerman@...opsys.com>,
	Felipe Balbi <balbi@...com>
Cc:	Yunzhi Li <lyz@...k-chips.com>,
	"Dinh Nguyen \(dinguyen\@opensource.altera.com\)" 
	<dinguyen@...nsource.altera.com>,
	"gregkh\@linuxfoundation.org" <gregkh@...uxfoundation.org>,
	"linux-usb\@vger.kernel.org" <linux-usb@...r.kernel.org>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
	"heiko\@sntech.de" <heiko@...ech.de>,
	"jwerner\@chromium.org" <jwerner@...omium.org>,
	"dianders\@chromium.org" <dianders@...omium.org>,
	"olof\@lixom.net" <olof@...om.net>,
	"huangtao\@rock-chips.com" <huangtao@...k-chips.com>,
	"zyw\@rock-chips.com" <zyw@...k-chips.com>,
	"cf\@rock-chips.com" <cf@...k-chips.com>,
	"linux-rockchip\@lists.infradead.org" 
	<linux-rockchip@...ts.infradead.org>,
	"linus.walleij\@linaro.org" <linus.walleij@...aro.org>
Subject: Re: [PATCH v7 3/5] usb: dwc2: add generic PHY framework support for dwc2 usb controler platform driver.

Paul Zimmerman <Paul.Zimmerman@...opsys.com> writes:
> The patch below fixes it. And it seems like the right thing to me,
> since GPIOs should be optional for a generic phy, I would think. But
> my device tree foo is very weak, so I'm not sure.
>
> CCing Robert, who touched the generic phy code last. Robert, what do
> you think?
I think your patch in [1] is correct, because
"Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt" states that
reset-gpios is optional, and because Felipe told me gpios for phy_generic are
optional.

Now the original code was written by Felipe, so better ask him first. The
original code was :
af9f51c55 phy-generic.c nop->gpio_reset = of_get_named_gpio_flags(node, "reset-gpios",
af9f51c55 phy-generic.c                                                 0, &flags);
af9f51c55 phy-generic.c if (nop->gpio_reset == -EPROBE_DEFER)
af9f51c55 phy-generic.c         return -EPROBE_DEFER;

Cheers.

--
Robert

[1]
> diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
> index dd05254..9a826ff 100644
> --- a/drivers/usb/phy/phy-generic.c
> +++ b/drivers/usb/phy/phy-generic.c
> @@ -218,10 +218,10 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop,
>  			clk_rate = 0;
>  
>  		needs_vcc = of_property_read_bool(node, "vcc-supply");
> -		nop->gpiod_reset = devm_gpiod_get(dev, "reset-gpios");
> +		nop->gpiod_reset = devm_gpiod_get_optional(dev, "reset-gpios");
>  		err = PTR_ERR(nop->gpiod_reset);
>  		if (!err) {
> -			nop->gpiod_vbus = devm_gpiod_get(dev,
> +			nop->gpiod_vbus = devm_gpiod_get_optional(dev,
>  							 "vbus-detect-gpio");
>  			err = PTR_ERR(nop->gpiod_vbus);
>  		}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ