[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5320662.uDieR7oLoG@diego>
Date: Wed, 27 Aug 2014 20:32:53 +0200
From: Heiko Stübner <heiko@...ech.de>
To: Ben Dooks <ben.dooks@...ethink.co.uk>,
Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>
Cc: Doug Anderson <dianders@...omium.org>,
Chris Zhong <zyw@...k-chips.com>,
Samuel Ortiz <sameo@...ux.intel.com>,
Lee Jones <lee.jones@...aro.org>,
Liam Girdwood <lgirdwood@...il.com>,
"broonie@...nel.org" <broonie@...nel.org>,
Alessandro Zummo <a.zummo@...ertech.it>,
Mike Turquette <mturquette@...aro.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
rtc-linux@...glegroups.com, Grant Likely <grant.likely@...aro.org>,
Lin Huang <hl@...k-chips.com>,
Tao Huang <huangtao@...k-chips.com>,
Eddie Cai <cf@...k-chips.com>,
zhangqing <zhangqing@...k-chips.com>, xxx <xxx@...k-chips.com>,
Olof Johansson <olof@...om.net>,
Sonny Rao <sonnyrao@...omium.org>,
Dmitry Torokhov <dtor@...omium.org>,
Javier Martinez Canillas <javier.martinez@...labora.co.uk>,
Kever Yang <kever.yang@...k-chips.com>
Subject: Re: [PATCH v6 4/5] clk: RK808: Add clkout driver for RK808
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 <zyw@...k-chips.com>
> >
> > 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 <linux/clk.h>
> >> +#include <linux/clk-provider.h>
> >> +#include <linux/module.h>
> >> +#include <linux/slab.h>
> >> +#include <linux/platform_device.h>
> >> +#include <linux/mfd/rk808.h>
> >> +#include <linux/i2c.h>
> >> +
> >> +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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists