From: Michael Turquette <mturquette@linaro.org>
To: Matthias Brugger <matthias.bgg@gmail.com>,
sboyd@codeaurora.org, matthias.bgg@gmail.com
Cc: s.hauer@pengutronix.de, jamesjj.liao@mediatek.com,
henryc.chen@mediatek.com, linux-kernel@vger.kernel.org,
linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, manabian@gmail.com,
p.zabel@pengutronix.com
Subject: Re: [PATCH v4 RESEND 1/3] clk: Add regmap support
Date: Mon, 17 Aug 2015 16:22:35 -0700 [thread overview]
Message-ID: <20150817232235.31346.30218@quantum> (raw)
In-Reply-To: <1438355659-21558-2-git-send-email-matthias.bgg@gmail.com>
Quoting Matthias Brugger (2015-07-31 08:14:17)
> diff --git a/drivers/clk/clk-io.c b/drivers/clk/clk-io.c
> new file mode 100644
> index 0000000..9630ef5
> --- /dev/null
> +++ b/drivers/clk/clk-io.c
> @@ -0,0 +1,48 @@
> +/*
> + * Copyright (C) 2015 Matthias Brugger <matthias.bgg@gmail.com>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + *
> + */
> +
> +#include <linux/clk-provider.h>
> +
> +void clk_io_writel(struct clk_hw *hw, void __iomem *reg, struct regmap *regmap,
> + u32 offset, u32 val)
> +{
> + if (__clk_get_flags(hw->clk) & CLK_USE_REGMAP)
> + regmap_write(regmap, offset, val);
> + else
> + clk_writel(val, reg);
> +}
So we have clk_writel, which already wraps direct io accesses depending
on arch/platform, and then this patch adds regmap support, and both of
those are wrapped in clk_io_writel? :-/
I agree that we should merge some unified regmap support into the clock
framework for the basic clocks, but I do not think that this is the
right way to do it. This patch simply adds more code to already crowded
basic clock types.
Replacing the basic clock types by separating policy and machine-driver
code into separate, modular pieces is a high priority on my todo list.
I'd like to do that first and then revisit regmap clocks instead of
merging this series as-is.
Regards,
Mike
next prev parent reply other threads:[~2015-08-17 23:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-31 15:14 [PATCH v4 RESEND 0/3] clk: Add regmap support for basic clocks Matthias Brugger
2015-07-31 15:14 ` [PATCH v4 RESEND 1/3] clk: Add regmap support Matthias Brugger
2015-08-17 23:22 ` Michael Turquette [this message]
2015-07-31 15:14 ` [PATCH v4 RESEND 2/3] clk: mediatek: Add support for clk-mux using regmap Matthias Brugger
2015-07-31 15:14 ` [PATCH v4 RESEND 3/3] clk: mediatek: Use regmap clk-mux for mt8135 Matthias Brugger
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=20150817232235.31346.30218@quantum \
--to=mturquette@linaro.org \
--cc=henryc.chen@mediatek.com \
--cc=jamesjj.liao@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=manabian@gmail.com \
--cc=matthias.bgg@gmail.com \
--cc=p.zabel@pengutronix.com \
--cc=s.hauer@pengutronix.de \
--cc=sboyd@codeaurora.org \
/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).