From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757297AbcEEUK0 (ORCPT ); Thu, 5 May 2016 16:10:26 -0400 Received: from lists.s-osg.org ([54.187.51.154]:52425 "EHLO lists.s-osg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755262AbcEEUKW (ORCPT ); Thu, 5 May 2016 16:10:22 -0400 Subject: Re: [RFC v2 11/13] usb: port: Parse pwrseq phandle from Device Tree To: Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-mmc@vger.kernel.org, linux-pm@vger.kernel.org, linux-usb@vger.kernel.org, Ulf Hansson , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , Greg Kroah-Hartman , Mark Brown References: <1462451666-17945-1-git-send-email-k.kozlowski@samsung.com> <1462451666-17945-12-git-send-email-k.kozlowski@samsung.com> From: Javier Martinez Canillas Cc: tjakobi@math.uni-bielefeld.de, m.szyprowski@samsung.com, hverkuil@xs4all.nl, Bartlomiej Zolnierkiewicz Message-ID: Date: Thu, 5 May 2016 16:10:04 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <1462451666-17945-12-git-send-email-k.kozlowski@samsung.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Krzysztof, On 05/05/2016 08:34 AM, Krzysztof Kozlowski wrote: > Parse usb-pwrseq property from Device Tree to get the phandle to pwrseq > device. The pwrseq device will be used by USB hub to cycle the power > before activating ports. > > Signed-off-by: Krzysztof Kozlowski > --- [snip] > > @@ -532,6 +534,14 @@ int usb_hub_create_port_device(struct usb_hub *hub, int port1) > return retval; > } > > + port_dev->dev.of_node = usb_of_get_child_node(hub->hdev->dev.of_node, port1); > + port_dev->pwrseq = pwrseq_alloc(&port_dev->dev); > + if (IS_ERR(port_dev->pwrseq)) { > + device_unregister(&port_dev->dev); > + /* TODO: what about EPROBE_DEFER? */ I think it's OK since the call chain is: hub_probe() hub_configure() usb_hub_create_port_device() so the hub_probe() will be deferred if the usb-pwrseq was not registered yet. Unless I misunderstood your question :) Anyway, patch looks good to me: Reviewed-by: Javier Martinez Canillas Best regards, -- Javier Martinez Canillas Open Source Group Samsung Research America