From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [PATCH v2] Add suspend/resume for HPET Date: Sat, 31 Mar 2007 10:09:15 -0700 (PDT) Message-ID: References: <200703291546.48996.maximlevitsky@gmail.com> <1175356272.28263.27.camel@localhost.localdomain> <200703311956.35922.maximlevitsky@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <200703311956.35922.maximlevitsky@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: Maxim Levitsky Cc: Andrew Morton , Jeff Chua , linux-ide@vger.kernel.org, Sergei Shtylyov , gregkh@suse.de, linux-pm@lists.osdl.org, Linux Kernel Mailing List , Adrian Bunk , linux-acpi@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz, "Eric W. Biederman" , Jens Axboe , "Michael S. Tsirkin" , tglx@linutronix.de, jgarzik@pobox.com, Ingo Molnar List-Id: linux-ide@vger.kernel.org On Sat, 31 Mar 2007, Maxim Levitsky wrote: > = > So maybe I was right afrer all, > Maybe it is better to add a suspend/resume hook to each clock source and = call = > it from timekeeping_resume() ? Umm.. WHy not make the device tree look like this: -- "clocksource" -- +-- HPET | +-- TSC | +-- i8259 | +-- lapic timer | .. whatever else and use the "struct device" that we *have* for this? The whole "struct = device" is literally designed to do this, and to be embedded into whatever = bigger structures you have that describes higher-level behaviour. Ie you'd = put a "struct device" inside the "struct clocksource". That thingalready *has* the suspend/resume hooks, and it will mean that = people will see the clocks in the device tree rather than have a new = notion. Linus