From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753654AbXCaROk (ORCPT ); Sat, 31 Mar 2007 13:14:40 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753662AbXCaROk (ORCPT ); Sat, 31 Mar 2007 13:14:40 -0400 Received: from smtp.osdl.org ([65.172.181.24]:57139 "EHLO smtp.osdl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753557AbXCaROj (ORCPT ); Sat, 31 Mar 2007 13:14:39 -0400 Date: Sat, 31 Mar 2007 10:09:15 -0700 (PDT) From: Linus Torvalds To: Maxim Levitsky cc: tglx@linutronix.de, Sergei Shtylyov , Ingo Molnar , Jeff Chua , Adrian Bunk , Andrew Morton , Linux Kernel Mailing List , "Eric W. Biederman" , "Rafael J. Wysocki" , pavel@suse.cz, linux-pm@lists.osdl.org, gregkh@suse.de, linux-pci@atrey.karlin.mff.cuni.cz, Jens Axboe , Len Brown , linux-acpi@vger.kernel.org, jgarzik@pobox.com, linux-ide@vger.kernel.org, "Michael S. Tsirkin" Subject: Re: [PATCH v2] Add suspend/resume for HPET In-Reply-To: <200703311956.35922.maximlevitsky@gmail.com> 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=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@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