Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753955Ab1BOBlS (ORCPT ); Mon, 14 Feb 2011 20:41:18 -0500 Received: from adelie.canonical.com ([91.189.90.139]:38211 "EHLO adelie.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752557Ab1BOBlR (ORCPT ); Mon, 14 Feb 2011 20:41:17 -0500 From: Jeremy Kerr To: linux-arm-kernel@lists.infradead.org Subject: Re: [RFC,PATCH 2/3] clk: Generic support for fixed-rate clocks Date: Tue, 15 Feb 2011 09:41:00 +0800 User-Agent: KMail/1.13.5 (Linux/2.6.35-25-generic; KDE/4.5.1; x86_64; ; ) Cc: Ryan Mallon , Nicolas Pitre , Dima Zavin , Lorenzo Pieralisi , Vincent Guittot , linux-sh@vger.kernel.org, Ben Herrenschmidt , Sascha Hauer , linux-kernel@vger.kernel.org, Paul Mundt , Saravana Kannan , Ben Dooks , "Uwe =?iso-8859-1?q?Kleine-K=F6nig?=" , Russell King References: <1297233693.242725.820672531799.2.gpush@pororo> <4D54738C.80900@bluewatersys.com> In-Reply-To: <4D54738C.80900@bluewatersys.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201102150941.00668.jeremy.kerr@canonical.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 787 Lines: 28 Hi Ryan, > A fixed clock may still have other operations such as enable/disable. Then it's not a fixed clock; I'd prefer this to be a separate type, as it's now hardware dependent. > Maybe do something like this instead: > #define INIT_CLK_FIXED(name, ops, r) { \ > .clk = INIT_CLK(name.clk, ops, rate), \ > .clk.ops.get_rate = clk_fixed_get_rate, \ > .rate = (r), \ > } > > That's untested though. I'm not sure if you can reliably assign > something twice in a struct initialiser? also, clk->ops is a const. Cheers, Jeremy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/