Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752881AbdF2Mkx (ORCPT ); Thu, 29 Jun 2017 08:40:53 -0400 Received: from zimbra.gr13.net ([46.4.151.110]:28293 "EHLO zimbra.gr13.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752675AbdF2Mkq (ORCPT ); Thu, 29 Jun 2017 08:40:46 -0400 Subject: Re: [RFC 0/5] drivers: Add boot constraints core To: Viresh Kumar , Greg Kroah-Hartman References: Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rafael Wysocki , Vincent Guittot , Stephen Boyd , Mark Brown , Shiraz Hashim , Rob Herring , rnayak@codeaurora.org From: "Enrico Weigelt, metux IT consult" Message-ID: Date: Thu, 29 Jun 2017 12:40:40 +0000 User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1168 Lines: 30 On 28.06.2017 10:26, Viresh Kumar wrote: Hi, > Some devices are powered ON by the bootloaders before the bootloader > handovers control to Linux. It maybe important for those devices to keep > working until the time a Linux device driver probes the device and > reconfigure its resources. Just curious: aren't the devices (at least w/ DT) only initialized after dependencies (eg. regulators) are already up ? Let's imagine a LCD panel driven by a regulator behind SPI. The panel driver would ask the regulator framework to switch on, which would call the regulator driver. This one now would talk to SPI framework, which finally calls the SPI driver. If SPI isn't up yet, it would all be deferred, leaving the panel driver uninitialized (tried again later). Am I wrong here ? If the bootloader already switched on the panel (therefore already enabled SPI), why does it matter that the panel driver isn't up yet ? Is there anything that accidentially switches it off again (eg. by resetting the regulator) ? If so, shouldn't the corresponding drivers make sure that all depencies are met before doing anyhing w/ the device, not even attempting a reset ? --mtx