From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932209AbbJPLBL (ORCPT ); Fri, 16 Oct 2015 07:01:11 -0400 Received: from down.free-electrons.com ([37.187.137.238]:59603 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753887AbbJPLBJ (ORCPT ); Fri, 16 Oct 2015 07:01:09 -0400 Date: Fri, 16 Oct 2015 13:00:51 +0200 From: Alexandre Belloni To: Heiko Schocher Cc: linux-kernel@vger.kernel.org, Georg.Soffel@bosch-si.com, rtc-linux@googlegroups.com, Alessandro Zummo , devicetree@vger.kernel.org Subject: Re: [PATCH v2] rtc: pcf8563: add CLKOUT to common clock framework Message-ID: <20151016110051.GM3421@piout.net> References: <1444982369-26046-1-git-send-email-hs@denx.de> <20151016105446.GK3421@piout.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151016105446.GK3421@piout.net> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/10/2015 at 12:54:46 +0200, Alexandre Belloni wrote : > > +static struct clk *pcf8563_clkout_register_clk(struct pcf8563 *pcf8563) > > +{ > > + struct i2c_client *client = pcf8563->client; > > + struct device_node *node = client->dev.of_node; > > + struct clk *clk; > > + struct clk_init_data init; > > + int ret; > > + unsigned char buf; > > + > > + /* disable the clkout output */ > > + buf = 0; > > + ret = pcf8563_write_block_data(client, PCF8563_REG_CLKO, 1, &buf); > > + if (ret < 0) > > + return ERR_PTR(ret); > > + > > Isn't that done automatically for an unused clock? However, I would do > that in the probe as you will have to sprinkle some #ifdef > CONFIG_COMMON_CLK after seeing the kbuild report. I'm rethinking about your comment about breaking existing boards. I'd say that probably nobody is using the output from the rtc but maybe (highly unlikely) some are configuring it from the bootloader and in that case it is not nice to undo that configuration. Let's keep that block here as long as it works fine for you. -- Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com