From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753947AbcG0Ig7 (ORCPT ); Wed, 27 Jul 2016 04:36:59 -0400 Received: from smtp5-g21.free.fr ([212.27.42.5]:58898 "EHLO smtp5-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751627AbcG0Igx convert rfc822-to-8bit (ORCPT ); Wed, 27 Jul 2016 04:36:53 -0400 Date: Wed, 27 Jul 2016 10:36:49 +0200 From: Jean-Francois Moine To: Maxime Ripard Cc: Chen-Yu Tsai , Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland , devicetree@vger.kernel.org, dev@linux-sunxi.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 4/9] clk: sunxi-ng: mux: Add support for mux tables Message-Id: <20160727103649.9e6ef332847b5a5c8fac66af@free.fr> In-Reply-To: <20160727074020.GH6560@lukather> References: <1469516671-19377-1-git-send-email-wens@csie.org> <1469516671-19377-5-git-send-email-wens@csie.org> <20160726194306.9b6aadd3d1669bd6f5a54d99@free.fr> <20160727065934.GD6560@lukather> <20160727091827.e26f72701ce5758fa29aff7a@free.fr> <20160727074020.GH6560@lukather> X-Mailer: Sylpheed 3.5.0 (GTK+ 2.24.30; armv7l-unknown-linux-gnueabihf) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 27 Jul 2016 09:40:20 +0200 Maxime Ripard wrote: > > > Parenting functions would also not work as expected, > > > clk_hw_get_parent_by_index being the obvious example, in that case > > > returning the empty string for an invalid parent, while it should > > > really return NULL. > > > > I don't see why the clock should be orphan. > > Then, when a parent is "", clk_hw_get_parent_by_index() returns NULL. > > Why? It should return NULL when there's no parent, while you > explicitly registered a parent. "" is not an existing parent. It could be "none" / "dum" / "toto" / ... with the same result: 'this index cannot be used in mux'. -- Ken ar c'hentań | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/