devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: Ben Dooks <ben.dooks@codethink.co.uk>,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>
Cc: Doug Anderson <dianders@chromium.org>,
	Chris Zhong <zyw@rock-chips.com>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Lee Jones <lee.jones@linaro.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	"broonie@kernel.org" <broonie@kernel.org>,
	Alessandro Zummo <a.zummo@towertech.it>,
	Mike Turquette <mturquette@linaro.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	rtc-linux@googlegroups.com,
	Grant Likely <grant.likely@linaro.org>,
	Lin Huang <hl@rock-chips.com>,
	Tao Huang <huangtao@rock-chips.com>,
	Eddie Cai <cf@rock-chips.com>,
	zhangqing <zhangqing@rock-chips.com>, xxx <xxx@rock-chips.com>,
	Olof Johansson <olof@lixom.net>,
	Sonny Rao <sonnyrao@chromium.org>,
	Dmitry Torokhov <dtor@chromium.org>,
	Javier Martinez Canillas <javier.martinez@collabora.co.uk>,
	Kever Yang <kever.yang@rock-chips.com>
Subject: Re: [PATCH v6 4/5] clk: RK808: Add clkout driver for RK808
Date: Wed, 27 Aug 2014 20:32:53 +0200	[thread overview]
Message-ID: <5320662.uDieR7oLoG@diego> (raw)
In-Reply-To: <53FDBF59.1050001@codethink.co.uk>

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@rock-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.

      reply	other threads:[~2014-08-27 18:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-26 14:16 [PATCH v6 4/5] clk: RK808: Add clkout driver for RK808 Chris Zhong
2014-08-26 18:02 ` Doug Anderson
     [not found]   ` <CAD=FV=WS=FaJdDVomCo2FxnsoRxDAHNNK-VX75JLzBYHHGS8AA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-27 11:22     ` Ben Dooks
2014-08-27 18:32       ` Heiko Stübner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5320662.uDieR7oLoG@diego \
    --to=heiko@sntech.de \
    --cc=a.zummo@towertech.it \
    --cc=ben.dooks@codethink.co.uk \
    --cc=broonie@kernel.org \
    --cc=cf@rock-chips.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=dtor@chromium.org \
    --cc=galak@codeaurora.org \
    --cc=grant.likely@linaro.org \
    --cc=hl@rock-chips.com \
    --cc=huangtao@rock-chips.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=javier.martinez@collabora.co.uk \
    --cc=kever.yang@rock-chips.com \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mturquette@linaro.org \
    --cc=olof@lixom.net \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=rtc-linux@googlegroups.com \
    --cc=sameo@linux.intel.com \
    --cc=sonnyrao@chromium.org \
    --cc=xxx@rock-chips.com \
    --cc=zhangqing@rock-chips.com \
    --cc=zyw@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).