From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934960AbdEVOnI (ORCPT ); Mon, 22 May 2017 10:43:08 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:39453 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934046AbdEVOnG (ORCPT ); Mon, 22 May 2017 10:43:06 -0400 Date: Mon, 22 May 2017 16:43:01 +0200 From: Andrew Lunn To: Quentin Schulz Cc: fugang.duan@nxp.com, robh+dt@kernel.org, mark.rutland@arm.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@free-electrons.com Subject: Re: [PATCH] net: fec: add post PHY reset delay DT property Message-ID: <20170522144301.GE29447@lunn.ch> References: <20170522091517.6857-1-quentin.schulz@free-electrons.com> <20170522135705.GB29447@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 22, 2017 at 04:00:47PM +0200, Quentin Schulz wrote: > Hi Andrew > > On 22/05/2017 15:57, Andrew Lunn wrote: > > On Mon, May 22, 2017 at 11:15:17AM +0200, Quentin Schulz wrote: > >> Some PHY require to wait for a bit after the reset GPIO has been > >> toggled. This adds support for the DT property `phy-reset-post-delay` > >> which gives the delay in milliseconds to wait after reset. > >> > >> If the DT property is not given, no delay is observed. Post reset delay > >> greater than 1000ms are invalid and are default to 1ms. > > > > Hi Quentin > > > > If it is invalid, please return -EINVAL. > > > > Just copying the wording and behavior of phy-reset-duration. Should we > then change the behavior of phy-reset-duration as well to return -EINVAL > in that case or I just leave both as is? No, you cannot change phy-reset-duration. There could be device tree blobs out in the wild with invalid phy-reset-duration which silently get converted to 1000ms by the code. You cannot break them. However, you can prevent new additions which add invalid phy-reset-post-delay. Andrew