Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2415758yba; Mon, 15 Apr 2019 11:07:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqzzVFQ+iY7vRO6K02mZ8Olc2utlysgjtGL0kLCD6zcSxASMRvrONegiqvbIJvx1ItijalqR X-Received: by 2002:a65:4481:: with SMTP id l1mr57969757pgq.66.1555351656661; Mon, 15 Apr 2019 11:07:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555351656; cv=none; d=google.com; s=arc-20160816; b=LdnI22/0fEprRCfGDmbUC11sV1yO0C4ExW6J9FHDr8QZFI3Ex2Z+itSVIsUslCD79L SX+IhKlhF5+JzRmjCjEneTULsERQ1KJkh5F22PYQKL02D8eH0x46heHp1AR0MHFiJXdB uIt8iRm98GWpl67PuxsomLoGgc/cBXysrI4eRCfVPQuNl0QdkJqIycCGPpoTOwYPQeqX WBnifBSo3piD8vtCxP4CyAByPnv0ugFTfBNpdV4PIJ3GdS5iPWlbowzQJUp1vctjh5Hm gejlfbldp+7bv3MmbBherOCnTVECmZfXUBh8dWanIpQP51p5acj67yqeJH2tw0lKj4l2 zdyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature; bh=vBiOb9aYyFmXHO/rGm+mCQsv9zXsqmJCM8HoM1Yj9QA=; b=Fk0QovH6i6s+Rv0Lqbxp71IKK48K5eGpu3hfSfPyeiX3tNykWGr3a3EXs1HpREWS4O 55hhiZ+d/e50l6YgqlQXV6b4pH0m4iJe/9HvyysEO71uA37VW0zAoalu5oUQBXUaKUiA 8CrxQZxe6pe1Ak7MjEboTk1XqH7kUkDRcT4+HwAELyhw7e8Zat2aRp2+XuvQ0lw0jdrP qCB0QKtvYrbyj+akx4d/kilcH6bLk6rZn5Nhn8C1WviSK4SPG9kPw7n1miltFoYKIozX 41pP/BbhCP2r4MzhhITcBUWuj0sTFF6wYDp7sZjF7rfJLc9dacmHiyyUQoyX+S/e7dpo ZEBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=cK2xQfhl; dkim=pass header.i=@codeaurora.org header.s=default header.b=iKiOAPmB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k12si43882521pgo.429.2019.04.15.11.07.20; Mon, 15 Apr 2019 11:07:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=cK2xQfhl; dkim=pass header.i=@codeaurora.org header.s=default header.b=iKiOAPmB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727962AbfDOSGE (ORCPT + 99 others); Mon, 15 Apr 2019 14:06:04 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:52450 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726182AbfDOSGD (ORCPT ); Mon, 15 Apr 2019 14:06:03 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 34B11619C7; Mon, 15 Apr 2019 18:06:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1555351562; bh=RbEGLvx6PixpimFTy6lztMRh+o94+kQDSZx1j7kCmj8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=cK2xQfhlifExa5Y6jsyudVVJXKC1GZDx+EYKzBvuLjmPJ65wNxOMWWFif/W5FRKVQ EH4BZ2hV6wNOA3v/L40nmma0brj2XOjcpWsLvGLq7mbPq8jhZH1XhicPYrd0sJ4kKM e/vtqu7QboA9GMPrmZcm9Olq7LPksmw+BEEaVFko= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from [10.226.58.28] (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jhugo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id A438860FEB; Mon, 15 Apr 2019 18:05:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1555351559; bh=RbEGLvx6PixpimFTy6lztMRh+o94+kQDSZx1j7kCmj8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=iKiOAPmB0Ce9doZkFM4fxycgOZ9tI+4wX58uzA1WEWDaNt1yYNYLekqYpJfxJnKYY cZeDhMoW4UTmxV+BAlLIbWzwthoWLM+jpMfhro/j6fwY5ua6c6epmpFZIXA79kEhEz IALuQcO9cP6pB/MORlMvSf6wALJlsWeJfKJxMc1g= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org A438860FEB Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=jhugo@codeaurora.org Subject: Re: [PATCH v4 0/9] Rewrite clk parent handling To: Stephen Boyd , Michael Turquette Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Chen-Yu Tsai , Greg Kroah-Hartman , Jerome Brunet , Matti Vaittinen , Miquel Raynal , Rob Herring , Russell King References: <20190412183150.102131-1-sboyd@kernel.org> From: Jeffrey Hugo Message-ID: Date: Mon, 15 Apr 2019 12:05:56 -0600 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.0 MIME-Version: 1.0 In-Reply-To: <20190412183150.102131-1-sboyd@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/12/2019 12:31 PM, Stephen Boyd wrote: > There are a couple warts with clk parent handling in the common clk > framework. This patch series addresses one of those warts, parent-child > linkages. We use strings for all parent-child linkages, and this leads > to poorly written code that extracts clk names from struct clk pointers > and makes clk provider drivers use clk consumer APIs. I've converted the > fixed factor clk and I'm looking at converting users of other "basic" > clk types in follow-up patches so we can start moving drivers away from > string matching in the clk namespace. > > Changes from v3: > * Split clkdev patch into two > * New patch to let dev_of_node() accept NULL > * Use dev_of_node() in of_clk_hw_register() to avoid NULL deref > > Changes from v2: > * Dropped patches that got merged into v5.1-rc1 > * Introduced a new function of_clk_hw_register() > * Introduced 'index' into clk_parent_data structure > * Converted fixed-factor basic type to new design > * Fixed some bugs in a recent patch to clkdev, leading to > an essential API for clkdev based lookups working > > Changes from v1: > * Dropped new get_parent_hw, we'll pick it up in a later series > * Rebased to v5.0-rc6 to avoid conflicts with clk-fixes > * Renamed 'fallback' to 'name' and 'name' to 'fw_name' in parent map > * Made sure that clk_hw_get_parent_by_index() never sees an error pointer > so that we don't mistakenly try to defer an error pointer > * Fixed index passing mistake on of_clk_get_hw_from_clkspec() > * Copy over all the data from parent maps and free it correctly too > > Cc: Chen-Yu Tsai > Cc: Greg Kroah-Hartman > Cc: Jeffrey Hugo > Cc: Jerome Brunet > Cc: Matti Vaittinen > Cc: Michael Turquette > Cc: Miquel Raynal > Cc: Rob Herring > Cc: Russell King > > Stephen Boyd (9): > clkdev: Hold clocks_mutex while iterating clocks list > clkdev: Move clk creation outside of 'clocks_mutex' > clk: Prepare for clk registration API that uses DT nodes > driver core: Let dev_of_node() accept a NULL dev > clk: Add of_clk_hw_register() API for early clk drivers > clk: Allow parents to be specified without string names > clk: Look for parents with clkdev based clk_lookups > clk: Allow parents to be specified via clkspec index > clk: fixed-factor: Let clk framework find parent > > drivers/clk/clk-fixed-factor.c | 53 ++++-- > drivers/clk/clk.c | 326 +++++++++++++++++++++++++-------- > drivers/clk/clk.h | 2 + > drivers/clk/clkdev.c | 30 +-- > include/linux/clk-provider.h | 22 +++ > include/linux/device.h | 2 +- > 6 files changed, 327 insertions(+), 108 deletions(-) > > > base-commit: 9e98c678c2d6ae3a17cb2de55d17f69dddaa231b > Tested-by: Jeffrey Hugo -- Jeffrey Hugo Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.