Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965200AbcDLW1j (ORCPT ); Tue, 12 Apr 2016 18:27:39 -0400 Received: from muru.com ([72.249.23.125]:50690 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965004AbcDLW1h (ORCPT ); Tue, 12 Apr 2016 18:27:37 -0400 Date: Tue, 12 Apr 2016 15:27:32 -0700 From: Tony Lindgren To: Rob Herring Cc: Frank Rowand , Grant Likely , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , linux-omap , Nishanth Menon , Tero Kristo , Tom Rini Subject: Re: [PATCH] of: Add generic handling for hardware incomplete fail state Message-ID: <20160412222732.GL5995@atomide.com> References: <1460486275-12256-1-git-send-email-tony@atomide.com> <570D56FE.2070408@gmail.com> <20160412203431.GU5995@atomide.com> <570D6B7A.3050203@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1617 Lines: 40 * Rob Herring [160412 15:22]: > On Tue, Apr 12, 2016 at 4:41 PM, Frank Rowand wrote: > >>> Status of "fail-sss" is meant to indicate an error was detected in > >>> the device, and that the error might (or might not) be repairable. > >>> > >>> So the difference I see is state vs hardware description. > > The question to ask is are we indicating the "operational status of a > device"? If yes, that is the definition of status and using it would > be appropriate. > > IMO, I think we are. > > >> OK thanks for the clarification. I don't see why "fail-hw-incomplete" > >> could not be set dynamically during the probe in some cases based > >> on the SoC revision detection for example. So from that point of > >> view using status with the "fail-sss" logic would make more sense. > > > > If the probe detects that the device should only be power managed > > based on the SoC revision, then it would simply be one more > > test added at the top of probe. The patch would change from: > > > > if (of_device_is_incomplete(pdev->dev.of_node)) { > > > > to: > > > > if (of_device_is_incomplete(pdev->dev.of_node) || socrev == XXX) { > > I think Tony meant the bootloader or platform code would do this and > tweak the DT. We don't have much of a standard API for revision > checking, so drivers don't check SoC revisions generally. Yes bootloader may need to set these based on the SoC revision. There are already many boards with multiple SoC variants available. Would like to hear Tom's comments on this one as well from the u-boot point of view. Regards, Tony