From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko =?ISO-8859-1?Q?St=FCbner?= Subject: Re: [PATCH v6 4/5] clk: RK808: Add clkout driver for RK808 Date: Wed, 27 Aug 2014 20:32:53 +0200 Message-ID: <5320662.uDieR7oLoG@diego> References: <1409062589-12157-1-git-send-email-zyw@rock-chips.com> <53FDBF59.1050001@codethink.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: In-Reply-To: <53FDBF59.1050001@codethink.co.uk> Sender: linux-kernel-owner@vger.kernel.org To: Ben Dooks , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala Cc: Doug Anderson , Chris Zhong , Samuel Ortiz , Lee Jones , Liam Girdwood , "broonie@kernel.org" , Alessandro Zummo , Mike Turquette , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , rtc-linux@googlegroups.com, Grant Likely , Lin Huang , Tao Huang , Eddie Cai , zhangqing , xxx , Olof Johansson , Sonny Rao , Dmitry Torokhov , Javier Martinez Canillas , Kever Yang List-Id: devicetree@vger.kernel.org Am Mittwoch, 27. August 2014, 12:22:01 schrieb Ben Dooks: > >> diff --git a/drivers/clk/clk-rk808.c b/drivers/clk/clk-rk808.c > >> new file mode 100644 > >> index 0000000..21f8b54 > >> --- /dev/null > >> +++ b/drivers/clk/clk-rk808.c > >> @@ -0,0 +1,163 @@ > >> +/* > >> + * Clkout driver for Rockchip RK808 > >> + * > >> + * Copyright (c) 2014, Fuzhou Rockchip Electronics Co., Ltd > >> + * > >> + * Author: Chris Zhong > > > > I probably would have removed "Author" here (like in other patches) > > since it's below in MODULE_AUTHOR. ...but I'm not a huge stickler for > > it. > > > >> + * > >> + * This program is free software; you can redistribute it and/or modify > >> it > >> + * under the terms and conditions of the GNU General Public License, > >> + * version 2, as published by the Free Software Foundation. > >> + * > >> + * This program is distributed in the hope it will be useful, but > >> WITHOUT > >> + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > >> + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > >> for + * more details. > >> + */ > >> + > >> +#include > >> +#include > >> +#include > >> +#include > >> +#include > >> +#include > >> +#include > >> + > >> +struct rk808_clkout { > >> + struct rk808 *rk808; > >> + struct clk_onecell_data clk_data; > >> + struct clk_hw clkout1_hw; > >> + struct clk_hw clkout2_hw; > >> +}; > >> + > >> +static unsigned long rk808_clkout_recalc_rate(struct clk_hw *hw, > >> + unsigned long parent_rate) > >> +{ > >> + return 32768; > >> +} > >> + > > Given one of these is a fixed, ungatable clock then surely it would > be easier to use a separate fixed clock node for that and then just > have a none for the gated clock? Hmm, with the devicetree being supposed to describe the hardware, I guess this is debatable. As both clocks are provided by the rk808 chip, I guess the clock references for both also should point there and not some arbitary fixed clock somewhere else in the dt? But this view could also be to pendantic :-) . Maybe the dt maintainers can shed some light on this.