From mboxrd@z Thu Jan 1 00:00:00 1970 From: Davide Rizzo Subject: Re: [PATCH 1/2] User access to internal clocks Date: Mon, 9 Feb 2009 18:44:40 +0100 Message-ID: <8447d6730902090944s9bc96f7r76da82ea09c629f0@mail.gmail.com> References: <8447d6730902090904y138af9c6r3d64278bc7a30811@mail.gmail.com> <20090209171042.GA19453@n2100.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20090209171042.GA19453-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Russell King - ARM Linux Cc: gregkh-l3A5Bk7waGM@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-api@vger.kernel.org >> This driver is for user level programs to interact with system clocks. >> It allows to read and modify rates and parents, using virtual files. >> It requires the implementation of 2 additional functions in the clk interface: >> clk_for_each() and clk_name(). >> Actually I implemented that functions only for Samsung S3C24xx platform. > > NAK. > >> + name = clk_get_name(clk); > > This implies that there is a 1:1 relationship between a 'name' and a > struct clk. No such thing exists (and where it does, it's being > eliminated in ARM because it's just plain and simple WRONG.) > Not exactly, clk_get() could work in both way: a struct clk can be exactly identified by name and device id (like clk_get is acting now) or by full name, in the format clkname.device Why do you say that it's wrong ? This is the same syntax used for devices, why couldn't it be used also for clocks ? This should not break backward compatibility. May be clk_get_name() should be renamed as clk_get_full_name() ? Or it would be better to make a function (or 2 different functions) that returns separated name and device id ? Otherwise, what do you suggest to enumerate and distinguish all system clocks ? -- To unsubscribe from this list: send the line "unsubscribe linux-api" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html