From mboxrd@z Thu Jan 1 00:00:00 1970 From: Francesco VIRLINZI Date: Mon, 16 Mar 2009 12:39:16 +0000 Subject: Re: [PATCH] sh: clkfwk: Changed the init function Message-Id: <49BE4874.5080206@st.com> List-Id: References: <49BA1505.7000500@st.com> In-Reply-To: <49BA1505.7000500@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-sh@vger.kernel.org Hi Paul Paul Mundt ha scritto: > On Fri, Mar 13, 2009 at 09:10:45AM +0100, Francesco VIRLINZI wrote: > >> This patch changes the init field in the clk_ops structure. >> Moreover it changes how the init function is used. >> Now it's called during registration and if something was wrong the clock >> isn't registered. >> >> > Ok, I'll bite. Why? > Than: I think the clk_ops.init function has (mandatory) to return a value to notify to the clk framework if the clock initialization was ok or not. Moreover in my point of view if a clock has an clk_ops.init function than the function has to be called during the clk_register because we must know as soon as possible if a clock is working or not... It isn't really nice discover a not-working clock after a call to clk_enable().... while the clk is perfectly registered... i.e.: I'm thinking for example on a clock on i2c bus... ( I assume a clkfwk should be able to manage any kind of clock). During the clk_register (with the clk_ops.init) I can check if the clock can be really used or not instead of discover (for example) with the clk_enable() that the i2c-bus sees no device... Let me know if I clarified my view. Regards Francesco > -- > To unsubscribe from this list: send the line "unsubscribe linux-sh" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > >