From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guenter Roeck Subject: Re: [RESEND,PATCHv6 1/1] Add support for GMT G762/G763 PWM fan controllers Date: Sat, 15 Jun 2013 18:59:39 -0700 Message-ID: <20130616015939.GA5535@roeck-us.net> References: <87sj0jhuhn.fsf@natisbad.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <87sj0jhuhn.fsf-LkuqDEemtHBg9hUCZPvPmw@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: Arnaud Ebalard Cc: Andrew Lunn , Russell King - ARM Linux , Jason Cooper , linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Olivier Mouchet , Rob Herring , lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org, Jean Delvare , Linux ARM Kernel Mailing List , Simon Guinot List-Id: devicetree@vger.kernel.org On Sun, Jun 16, 2013 at 12:36:20AM +0200, Arnaud Ebalard wrote: > > GMT G762/763 fan speed PWM controller is connected directly to a fan > and performs closed-loop or open-loop control of the fan speed. Two > modes - PWM or DC - are supported by the chip. Introduced driver > provides various knobs to control the operations of the chip (via > sysfs interface). Specific characteristics of the system can be passed > either using board init code or via DT. Documentation for both the > driver and DT bindings are also provided. > > Signed-off-by: Arnaud Ebalard > --- > Hi Guenter, > > In the end, I think handling the clock properly for DT path > (clk_prepare_enable() and associated clk_disable_unprepare() > for both error and module unloading) adds some code but I > do not see how to spare this. Comments welcome. > > If you have additional comments and a new version is required, > I'll handle those with Simon's tests on its platform. > We might need to be more careful with the clocks. Several drivers save the value retrieved with of_clk_get() and call clk_put() afterwards. But some drivers don't do that, so I don't really know the implications. I'll look into it some more to make sure everything is correct. Guenter