From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750706AbVLOOcH (ORCPT ); Thu, 15 Dec 2005 09:32:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750707AbVLOOcG (ORCPT ); Thu, 15 Dec 2005 09:32:06 -0500 Received: from free.hands.com ([83.142.228.128]:32898 "EHLO free.hands.com") by vger.kernel.org with ESMTP id S1750706AbVLOOcF (ORCPT ); Thu, 15 Dec 2005 09:32:05 -0500 Date: Thu, 15 Dec 2005 14:31:24 +0000 From: Luke Kenneth Casson Leighton To: linux-kernel@vger.kernel.org Subject: ordering of suspend/resume for devices. any clues, anyone? Message-ID: <20051215143124.GD14978@lkcl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.5.1+cvs20040105i X-hands-com-MailScanner: Found to be clean X-MailScanner-From: lkcl@lkcl.net Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org [hi, please kindly cc me direct as i am deliberately subscribed with settings to not receive posts from this list, but if that is inconvenient for you to cc me, don't worry i can always look up the archives to keep track of replies, thank you.] http://handhelds.org/moin/moin.cgi/BlueAngel works. am seeking some advice regarding power management - specifically the ordering of devices "resume" functions being called. we have an LCD, and an ATI chip. switching on the LCD powers up the ATI chip. unfortunately, resume calls the ATI device initialisation _before_ the LCD resume initialisation. the ATI chip's initialisation fails - naturally - because it's not even powered up. of course - this can't be taken care of in userspace as an apm event because the framebuffer device cannot be a module [without terminating all running x-applications]. so. possible solutions, as i see them: 1) have some awfulness in the LCD driver and the ATI driver with some shared resume initialisation callbacks. 2) work out where the initialisation of the LCD driver is called from, and somehow get that inserted into the initialisation order in the reverse way from what it is now, such that the linked list of device drivers is inverted, such that the resume event will end up calling the LCD resume _after_ the ATI resume. 3) some lovely "dependency" work gets done in the linux kernel where you can register priorities on the resume order. this would mirror the way that the old apm "event.d" thing would have worked. 4) other - that i don't know about, but would love to hear from someone if there already exists a solution. any clues, anyone? -- -- http://lkcl.net -- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750899AbVLOSiL (ORCPT ); Thu, 15 Dec 2005 13:38:11 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750901AbVLOSiK (ORCPT ); Thu, 15 Dec 2005 13:38:10 -0500 Received: from mail.kroah.org ([69.55.234.183]:18606 "EHLO perch.kroah.org") by vger.kernel.org with ESMTP id S1750899AbVLOSiJ (ORCPT ); Thu, 15 Dec 2005 13:38:09 -0500 Date: Thu, 15 Dec 2005 10:37:44 -0800 From: Greg KH To: Luke Kenneth Casson Leighton Cc: linux-kernel@vger.kernel.org Subject: Re: ordering of suspend/resume for devices. any clues, anyone? Message-ID: <20051215183744.GB16574@kroah.com> References: <20051215143124.GD14978@lkcl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051215143124.GD14978@lkcl.net> User-Agent: Mutt/1.5.11 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 15, 2005 at 02:31:24PM +0000, Luke Kenneth Casson Leighton wrote: > [hi, please kindly cc me direct as i am deliberately subscribed with > settings to not receive posts from this list, but if that is inconvenient > for you to cc me, don't worry i can always look up the archives > to keep track of replies, thank you.] > > http://handhelds.org/moin/moin.cgi/BlueAngel > > works. > > am seeking some advice regarding power management - specifically > the ordering of devices "resume" functions being called. > > we have an LCD, and an ATI chip. switching on the LCD powers up > the ATI chip. > > unfortunately, resume calls the ATI device initialisation > _before_ the LCD resume initialisation. the ATI chip's > initialisation fails - naturally - because it's not even > powered up. > > of course - this can't be taken care of in userspace as an apm > event because the framebuffer device cannot be a module [without > terminating all running x-applications]. > > so. > > possible solutions, as i see them: Known issue, I'd take this to the linux-pm mailing list instead, as the people there are working on stuff for this. thanks, greg k-h From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750913AbVLOTrZ (ORCPT ); Thu, 15 Dec 2005 14:47:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750961AbVLOTrZ (ORCPT ); Thu, 15 Dec 2005 14:47:25 -0500 Received: from free.hands.com ([83.142.228.128]:41448 "EHLO free.hands.com") by vger.kernel.org with ESMTP id S1750913AbVLOTrY (ORCPT ); Thu, 15 Dec 2005 14:47:24 -0500 Date: Thu, 15 Dec 2005 19:47:01 +0000 From: Luke Kenneth Casson Leighton To: Greg KH Cc: linux-kernel@vger.kernel.org Subject: Re: ordering of suspend/resume for devices. any clues, anyone? Message-ID: <20051215194701.GG14978@lkcl.net> References: <20051215143124.GD14978@lkcl.net> <20051215183744.GB16574@kroah.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051215183744.GB16574@kroah.com> User-Agent: Mutt/1.5.5.1+cvs20040105i X-hands-com-MailScanner: Found to be clean X-MailScanner-From: lkcl@lkcl.net Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 15, 2005 at 10:37:44AM -0800, Greg KH wrote: > > am seeking some advice regarding power management - specifically > > the ordering of devices "resume" functions being called. > > > > possible solutions, as i see them: > > > > Known issue, I'd take this to the linux-pm mailing list instead, as the > people there are working on stuff for this. thanks greg. l. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932348AbVLUKVZ (ORCPT ); Wed, 21 Dec 2005 05:21:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932351AbVLUKVZ (ORCPT ); Wed, 21 Dec 2005 05:21:25 -0500 Received: from gprs189-60.eurotel.cz ([160.218.189.60]:41104 "EHLO amd.ucw.cz") by vger.kernel.org with ESMTP id S932348AbVLUKVZ (ORCPT ); Wed, 21 Dec 2005 05:21:25 -0500 Date: Wed, 21 Dec 2005 11:21:09 +0100 From: Pavel Machek To: Luke Kenneth Casson Leighton Cc: linux-kernel@vger.kernel.org Subject: Re: ordering of suspend/resume for devices. any clues, anyone? Message-ID: <20051221102109.GB1735@elf.ucw.cz> References: <20051215143124.GD14978@lkcl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051215143124.GD14978@lkcl.net> X-Warning: Reading this can be dangerous to your mental health. User-Agent: Mutt/1.5.9i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hi! > [hi, please kindly cc me direct as i am deliberately subscribed with > settings to not receive posts from this list, but if that is inconvenient > for you to cc me, don't worry i can always look up the archives > to keep track of replies, thank you.] > > http://handhelds.org/moin/moin.cgi/BlueAngel > > works. > > am seeking some advice regarding power management - specifically > the ordering of devices "resume" functions being called. > > we have an LCD, and an ATI chip. switching on the LCD powers up > the ATI chip. > > unfortunately, resume calls the ATI device initialisation > _before_ the LCD resume initialisation. the ATI chip's > initialisation fails - naturally - because it's not even > powered up. I'd say "make LCD system/platform device". That will init it first, shut it down last. Pavel -- Thanks, Sharp! From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964908AbVLUWuW (ORCPT ); Wed, 21 Dec 2005 17:50:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964913AbVLUWuV (ORCPT ); Wed, 21 Dec 2005 17:50:21 -0500 Received: from free.hands.com ([83.142.228.128]:54437 "EHLO free.hands.com") by vger.kernel.org with ESMTP id S964908AbVLUWuU (ORCPT ); Wed, 21 Dec 2005 17:50:20 -0500 Date: Wed, 21 Dec 2005 22:49:39 +0000 From: Luke Kenneth Casson Leighton To: Pavel Machek Cc: linux-kernel@vger.kernel.org Subject: Re: ordering of suspend/resume for devices. any clues, anyone? Message-ID: <20051221224939.GI8496@lkcl.net> References: <20051215143124.GD14978@lkcl.net> <20051221102109.GB1735@elf.ucw.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051221102109.GB1735@elf.ucw.cz> User-Agent: Mutt/1.5.5.1+cvs20040105i X-hands-com-MailScanner: Found to be clean X-MailScanner-From: lkcl@lkcl.net Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org heya pavel, thanks for the tip. as it turns out, a function table was hacked-n that back-link from the w100fb framebuffer resume function into the LCD code. in this way, it is possible to call functions in the LCD module doing GPIO to start the power-up sequence required for the LCD and backlight, wait a few ms, initialise the video chip (in the w100fb code), then call _another_ set of functions in the LCD module to finish off the initialisation. not pretty, but there you go. l. On Wed, Dec 21, 2005 at 11:21:09AM +0100, Pavel Machek wrote: > Hi! > > > [hi, please kindly cc me direct as i am deliberately subscribed with > > settings to not receive posts from this list, but if that is inconvenient > > for you to cc me, don't worry i can always look up the archives > > to keep track of replies, thank you.] > > > > http://handhelds.org/moin/moin.cgi/BlueAngel > > > > works. > > > > am seeking some advice regarding power management - specifically > > the ordering of devices "resume" functions being called. > > > > we have an LCD, and an ATI chip. switching on the LCD powers up > > the ATI chip. > > > > unfortunately, resume calls the ATI device initialisation > > _before_ the LCD resume initialisation. the ATI chip's > > initialisation fails - naturally - because it's not even > > powered up. > > I'd say "make LCD system/platform device". That will init it first, > shut it down last. > Pavel > > -- > Thanks, Sharp! -- -- http://lkcl.net --