Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7752341imu; Fri, 28 Dec 2018 04:21:33 -0800 (PST) X-Google-Smtp-Source: ALg8bN7+vwi/FkZUDjpWFGKq+aWoDrQeDgjd7gsYhVTl3QW+2Hne2mSwjKItlZ1zaqCTXNZctEkV X-Received: by 2002:a17:902:930b:: with SMTP id bc11mr27966960plb.17.1545999693641; Fri, 28 Dec 2018 04:21:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545999693; cv=none; d=google.com; s=arc-20160816; b=N7eQlP65YFmXNDSzGwN0Z8CRHo1j9VA2QOSYjVr4JK0RUVMkxmF2Y6cz0LSujx2cIB QmXjqs+qXBQq9z9MSvFdht1sVmeBzHFTG17IELmsp297v8lxcPDpFYFEizoKdBXYoHb+ o+To4qaUYmAFkj5pbir30iBXx3O5tnM3EA/IN+2q6GHiBLSg9ID8lTQV4VavMUZVxZWM rmwIQBpEW1Y4CNbYz0Moes53LYpKvRbbNKqkU8La2fpOK3L/dq5scuuzw/SAv04ckBTG y4xxWApRMbY3bLBy+ZtR436x/VLSwVCtaG3OkdURbOeOGVpgo9CtKASUNBMOB32g5ZwD x97w== 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; bh=D5O8WyLW0yBjChgVK8ksMfltAEXTQADewQGPQAHEJeA=; b=vG0Obvet4MLRvdeq1Mn48SwAlBpCnHwev6sMcemNz+zAyU9t+Ul4IRc4DD9yUrBkZu HMmUVfhk8UA1nfZhrf1NGbslgLSM5xx9/52azQxl7VgbM6Xq9uI7zspV0h/kdfhFA8UF iIT/RURt0rgcMosl0AMETIbkEzKkz8ZmHLGNp7LanejDhYe0DEJemltCBY4V+vCVpa1B JpjSv1GgkeQGPRr/Uek0UOE7y600lu3fgDUtbzVpFNbCUWVuHq8wAaocH1MzmuwMdqBh yscfL1Aqsrwm1RoOms+aJYG9qPrfBAByPnX5AD3puoKhkRzFqBca2cnBCrLP3BWHDphn mg0A== ARC-Authentication-Results: i=1; mx.google.com; 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 d7si37547358pfo.108.2018.12.28.04.21.18; Fri, 28 Dec 2018 04:21:33 -0800 (PST) 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; 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 S1731626AbeL1GjE (ORCPT + 99 others); Fri, 28 Dec 2018 01:39:04 -0500 Received: from mx.socionext.com ([202.248.49.38]:9170 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729363AbeL1GjD (ORCPT ); Fri, 28 Dec 2018 01:39:03 -0500 Received: from unknown (HELO kinkan-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 28 Dec 2018 15:38:59 +0900 Received: from mail.mfilter.local (m-filter-2 [10.213.24.62]) by kinkan-ex.css.socionext.com (Postfix) with ESMTP id 0D8C21800F6; Fri, 28 Dec 2018 15:39:00 +0900 (JST) Received: from 172.31.9.53 (172.31.9.53) by m-FILTER with ESMTP; Fri, 28 Dec 2018 15:38:59 +0900 Received: from yuzu.css.socionext.com (yuzu [172.31.8.45]) by iyokan.css.socionext.com (Postfix) with ESMTP id B1C6C40221; Fri, 28 Dec 2018 15:38:59 +0900 (JST) Received: from [127.0.0.1] (unknown [10.213.119.83]) by yuzu.css.socionext.com (Postfix) with ESMTP id 95260121BF2; Fri, 28 Dec 2018 15:38:59 +0900 (JST) Subject: Re: [PATCH 07/14] clock: milbeaut: Add Milbeaut M10V clock control To: Stephen Boyd , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Michael Turquette , Rob Herring , Mark Rutland , Greg Kroah-Hartman , Daniel Lezcano , Thomas Gleixner , Russell King , Jiri Slaby , Masami Hiramatsu , Jassi Brar References: <1542589274-13878-1-git-send-email-sugaya.taichi@socionext.com> <1542589274-13878-8-git-send-email-sugaya.taichi@socionext.com> <154356669840.88331.4455990896653868594@swboyd.mtv.corp.google.com> <9fba4689-b20f-c18a-ea11-d961de497ea3@socionext.com> <154595756614.179992.794211301759568891@swboyd.mtv.corp.google.com> From: "Sugaya, Taichi" Message-ID: <0c8db56a-6738-e003-5088-0c13588f695a@socionext.com> Date: Fri, 28 Dec 2018 15:38:58 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: <154595756614.179992.794211301759568891@swboyd.mtv.corp.google.com> 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 Hi On 2018/12/28 9:39, Stephen Boyd wrote: > Quoting Sugaya, Taichi (2018-12-25 17:35:27) >> Hi >> >> On 2018/11/30 17:31, Stephen Boyd wrote: >>>> + init.num_parents = parents; >>>> + init.parent_names = parent_names; >>>> + >>>> + mcm->cname = clk_name; >>>> + mcm->parent = 0; >>>> + mcm->hw.init = &init; >>>> + >>>> + clk = clk_register(NULL, &mcm->hw); >>>> + if (IS_ERR(clk)) >>>> + goto err_clk; >>>> + >>>> + of_clk_add_provider(node, of_clk_src_simple_get, clk); >>>> + return; >>>> + >>>> +err_clk: >>>> + kfree(mcm); >>>> +err_mcm: >>>> + kfree(parent_names); >>>> +} >>>> +CLK_OF_DECLARE(m10v_clk_mux, "socionext,milbeaut-m10v-clk-mux", >>>> + m10v_clk_mux_setup); >>> >>> Any chance you can use a platform driver? >>> >> >> Excuse me to re-ask you. >> Why do you recommend to use a platform driver? Is that current fad? > > Not exactly a fad. We've been doing it for some time now. From an older > email on the list: > > Reasons (in no particular order): > > 1. We get a dev pointer to use with clk_hw_register() > > 2. We can handle probe defer if some resource is not available > > 3. Using device model gets us a hook into power management frameworks > like runtime PM and system PM for things like suspend and hibernate > > 4. It encourages a single DT node clk controller style binding > instead of a single node per clk style binding > > 5. We can use non-DT specific functions like devm_ioremap_resource() to map > registers and acquire other resources, leading to more portable and > generic code > > 6. We may be able to make the device driver a module, which will > make distros happy if we don't have to compile in all > these clk drivers to the resulting vmlinux > Great thanks for answering. I strongly understand. #It takes a bit of time to send v2. Best Regards, Sugaya Taichi