Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751797AbbHQXWz (ORCPT ); Mon, 17 Aug 2015 19:22:55 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:36710 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750883AbbHQXWx convert rfc822-to-8bit (ORCPT ); Mon, 17 Aug 2015 19:22:53 -0400 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT To: Matthias Brugger , sboyd@codeaurora.org, matthias.bgg@gmail.com From: Michael Turquette In-Reply-To: <1438355659-21558-2-git-send-email-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 References: <1438355659-21558-1-git-send-email-matthias.bgg@gmail.com> <1438355659-21558-2-git-send-email-matthias.bgg@gmail.com> Message-ID: <20150817232235.31346.30218@quantum> User-Agent: alot/0.3.5 Subject: Re: [PATCH v4 RESEND 1/3] clk: Add regmap support Date: Mon, 17 Aug 2015 16:22:35 -0700 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1769 Lines: 48 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 > + * > + * 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 > + > +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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/