Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753183AbbBMMGT (ORCPT ); Fri, 13 Feb 2015 07:06:19 -0500 Received: from metis.ext.pengutronix.de ([92.198.50.35]:45476 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752494AbbBMMGS (ORCPT ); Fri, 13 Feb 2015 07:06:18 -0500 Date: Fri, 13 Feb 2015 13:06:13 +0100 From: Sascha Hauer To: Tomasz Figa Cc: Matthias Brugger , James Liao , Mike Turquette , YH Chen =?utf-8?B?KOmZs+aYseixqik=?= , "linux-kernel@vger.kernel.org" , Henry Chen , Rob Herring , kernel@pengutronix.de, Yingjoe Chen =?utf-8?B?KOmZs+iLsea0sik=?= , Eddie Huang , Lee Jones , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH 02/13] clk: mediatek: Add initial common clock support for Mediatek SoCs. Message-ID: <20150213120613.GZ12209@pengutronix.de> References: <1423478845-2835-1-git-send-email-s.hauer@pengutronix.de> <1423478845-2835-3-git-send-email-s.hauer@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 12:44:08 up 120 days, 22:57, 64 users, load average: 0.00, 0.05, 0.11 User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2035 Lines: 61 Hi Tomasz, > > +static void mtk_cg_disable(struct clk_hw *hw) > > +{ > > + mtk_cg_set_bit(hw); > > +} > > + > > +static int mtk_cg_enable_inv(struct clk_hw *hw) > > +{ > > + mtk_cg_set_bit(hw); > > + > > + return 0; > > +} > > + > > +static void mtk_cg_disable_inv(struct clk_hw *hw) > > +{ > > + mtk_cg_clr_bit(hw); > > +} > > Instead of duplicating the ops, couldn't you add a flag or something > to mtk_clk_gate struct and then act appropriately in the ops? Also, > see below. I prefer duplicating the ops. It makes the functions simpler without ifs. > > diff --git a/drivers/clk/mediatek/clk-gate.h b/drivers/clk/mediatek/clk-gate.h > > new file mode 100644 > > index 0000000..a44dcbf > > --- /dev/null > > +++ b/drivers/clk/mediatek/clk-gate.h > > @@ -0,0 +1,49 @@ > > +/* > > + * Copyright (c) 2014 MediaTek Inc. > > + * Author: James Liao > > Might not be necessary, but maybe the other people (all or some of > them) from signed-off-by should be added to this and other copyright > statements? I rather do not want to update these copyrights frequently. Otherwise we would see a lot of patches with an extra hunk changing the copyrights. I'm glad we left that behind and look at the git history instead. The above is the original author. I don't want to remove him, but I also do not want to add every other person who touched that file. The other stuff will be fixed in the next round. Thanks for reviewing. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- 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/