From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753131AbdJMSax (ORCPT ); Fri, 13 Oct 2017 14:30:53 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:50235 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752903AbdJMSav (ORCPT ); Fri, 13 Oct 2017 14:30:51 -0400 X-Google-Smtp-Source: AOwi7QAGrgeaYaOlkXbpz/oiMvKN60MAqAnsU47+IA1b6KjtyZjvk6EO8xAlBXrtUeru36jug1D6/A== Date: Fri, 13 Oct 2017 11:30:48 -0700 From: Dmitry Torokhov To: jeffy Cc: Mark Brown , Brian Norris , Doug Anderson , "linux-kernel@vger.kernel.org" , Heiko Stuebner , linux-spi , "open list:ARM/Rockchip SoC..." , "linux-arm-kernel@lists.infradead.org" Subject: Re: [RESEND PATCH 1/2] spi: rockchip: Convert to late and early system PM callbacks Message-ID: <20171013183048.dg6wsabnz7qiviwy@dtor-ws> References: <20171013104138.3216-1-jeffy.chen@rock-chips.com> <20171013104138.3216-2-jeffy.chen@rock-chips.com> <20171013155120.GA137489@google.com> <20171013164235.thgqha7sl5tdptwv@sirena.co.uk> <59E103B0.8060705@rock-chips.com> <59E1052C.3000503@rock-chips.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <59E1052C.3000503@rock-chips.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 14, 2017 at 02:25:48AM +0800, jeffy wrote: > On 10/14/2017 02:19 AM, jeffy wrote: > > > > > > it looks like the suspend sequence depends on the dt node sequence, and > > we are putting display-subsystem dt node above spi dt node, so it would > > be earlier in the device list, then got suspended later than spi device. > > > > the pwm backlight and cros_ec_spi pwm are very interesting, not only > > about suspend dependency... if we unbind cros_ec_spi pwm, the pwm > > backlight would still hold a reference to it, and crash the kernel later. > > or maybe we should move device_pm_add() from device_add() to driver_bound()? You do not necessarily need to have a driver to power the dveice on and off. -- Dmitry