Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756360AbcLABnN (ORCPT ); Wed, 30 Nov 2016 20:43:13 -0500 Received: from relmlor4.renesas.com ([210.160.252.174]:23715 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750831AbcLABnK (ORCPT ); Wed, 30 Nov 2016 20:43:10 -0500 X-IronPort-AV: E=Sophos;i="5.31,723,1473087600"; d="scan'";a="226745427" Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; Message-ID: <87oa0w77dw.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Stephen Boyd CC: Rob Herring , Linux-ALSA , Linux-DT , Michael Turquette , Russell King , Linux-Kernel , Mark Brown , , Linux-ARM Subject: Re: [alsa-devel] [PATCH v2] clkdev: add devm_of_clk_get() In-Reply-To: <874m2pbwsn.wl%kuninori.morimoto.gx@renesas.com> References: <87ziptixv7.wl%kuninori.morimoto.gx@renesas.com> <20160707122636.GP1041@n2100.armlinux.org.uk> <8760shgfzu.wl%kuninori.morimoto.gx@renesas.com> <146794140875.73491.7115209079607438738@resonance> <871t34hlin.wl%kuninori.morimoto.gx@renesas.com> <878twndi54.wl%kuninori.morimoto.gx@renesas.com> <8737isvwc6.wl%kuninori.morimoto.gx@renesas.com> <20161123191037.GE25626@codeaurora.org> <87a8cpejn5.wl%kuninori.morimoto.gx@renesas.com> <87y409cw71.wl%kuninori.morimoto.gx@renesas.com> <20161129210556.GC6095@codeaurora.org> <874m2pbwsn.wl%kuninori.morimoto.gx@renesas.com> User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset="US-ASCII" Date: Thu, 1 Dec 2016 01:43:03 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: KAWPR01CA0076.jpnprd01.prod.outlook.com (10.174.230.12) To SG2PR0601MB1453.apcprd06.prod.outlook.com (10.169.106.19) X-MS-Office365-Filtering-Correlation-Id: e1648048-5617-4537-b99b-08d4198b648c X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:SG2PR0601MB1453; X-Microsoft-Exchange-Diagnostics: 1;SG2PR0601MB1453;3:fhyXYI0Gd1C1yB8Rv+Ew4mGmT23cFO2lkFqV9Lbm8nzOPsfb3Rv7Co7RRtMi9Tjx1qDeABLf7Q0ZjSQx4hsD/qaUD51mkkx5z5XfOCtlJz9glwCVLVon4DnuVL3tYDKydLDPGnP/kjCNF5tDTBFoUiwf9rSISi82aBzkBAfz00w2yswbHRlG0Fb1/xOz8ttNcRV+4Tn0K4xTkq6Qu/W0mNLiTorNKCoq3yMg9Hx4dy1Qzg34+MYgpKrfM2mL9L0PoTH11RDtoRTpUt8qnHb6Vw==;25:L4J7ZsWrYbpaFoeAg4hrB5Rdt4igg4FkcLXBCDcf5XGtHGEKhltRPe8qu/0h+B4+IWxdA6cUNBKgqJX/hwyOrvH6esv8Z0xvuQtg1tWLzewce3CgPRDtbhOqo2cIf631oHBtWQZuKZLtnt5v3h8mV55A91l5Eil/ABMKIRkcZUyTaI+5s+Pd+bGmMevxKnyPXxj2Xs3gXSwKgfJe65LYs71qX4IhZzlUsgfgAx67riLuvfFirf6Xa9KxEuvxdZxq5VPrAGK9c8LLZzZAkqE/C8kxMlZw9tmNhYCqpCOjFJe0C2qpow99imux5wIn9jdrIx+kYcp5EBUr77TWHI/8LF4waFTRS9TY1rIm8MGwfLoqMzIjDAvOGWXKabftLLZOThC7BCVWMvBnRcYOD5xG6YlhhF4Mgr4W9mF5jseddK20MaHFdyXoJvSfKs0nAzECNbk+cytdNN9EoqREuwqjbQ== X-Microsoft-Exchange-Diagnostics: 1;SG2PR0601MB1453;31:e46jZsemKrYVHZ2kKamvb87TUaEp5A2AsZfZKgwsmsY6GqkinSk+7gw7399ya3ehiyJHtK2BQRix9KNnZ2Pfu1OYJJ0xleHcoY4SLCok8Js4nm09dAipxkGH/mUbaClgvEHp0Pqmu33ReQSQmYIuLJ8gOaZpHf0MDFxKxmOkTovYL3ijbLR5ieZ50cCCNyKSf7crfCQ3s/iEyVJjgd6S+RwunhaRSEgwrUK0A1PzeyeuDBkPw5GD/LVEZ4GW1007Ej/TFt/hWUryG8Fa8zU0Jj7RmZuMl1aAeSGpTb88xpE=;20:RM9jgnFgFH89t2BRFB+QkJ0jS6Tz4Pd88LDXIdBUmiZCM8HBGxacGzD6P48z86OKuqzc/K+hkZ1+Oa4g0qN0zLMvy+LNQvuY+y5iu01EULkUBOF7wYIpUr5KU9XVWJcFB9X3Mqfl366KVkNJCkwJJwhvnRIab4eKrjqE7OQepxvfcy1/4P7rsA2LIy3qO69wvZWlfJYHu0Ttf0CEvZ+c9io2tFxWaBpwhfU+F2ZmyLwhDN66qc5kfEWkK8gMTFCaVXeYjBgVBMrXnCPNYlqEBSCU6bsrXslEsEsGSaMhNjLBVWYm6lO+CKI0+o/l/YxdV2nutFPgPVM93RzzGKAB4UpyrmruFbgcxgaxhUGT3ALlgGSbqZg7afFkge8UHRuoK3/ud3NSZ6gDe/AAzb06u0rxkc0ZkFaYCisHmjmH5jd937ebBUuvZFet/kvyiw1lRnGuxRJbMUskCpJlD6FMlG5yd8kt9hHoQBSgi8Noc4pStjkoOiWmzcUYU5e7gunv X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6041248)(20161123564025)(20161123558021)(20161123562025)(20161123555025)(20161123560025)(6072148);SRVR:SG2PR0601MB1453;BCL:0;PCL:0;RULEID:;SRVR:SG2PR0601MB1453; X-Microsoft-Exchange-Diagnostics: 1;SG2PR0601MB1453;4:nNFIGxPLQTDMiqYWB84ZzeWMEOiYUWJDfl+yx3e9W7kk4kaSeU1vK7Z7m2BuEAdeOpQB0LtKGcjgT1HNVpEEgFlMwZLleWOSYASIES6GiZCnKHT/ZMz0HnJqTe5CfTy2k/fswFQodPF93+wJ/FhYzRgLNSZLOs2YJA1RQYrt+koM4UbWjoWbKFLZQXRGu5uMx35xj7KHYd/hm/IBtxhPmBY6xPK9bdVLZAaKvbKftEXUrtOgmCRhi7Mgo9lkWLNwm4r5ALc37wUhSeDROcZfZoSD0ZvURe7QXoQEvnFKbngfKrJnFPGy8Z1ITjW6oqCO4oh7rMmX5PL7Ratx09EmO0pKdi7dzqaoscy46Dx8tAuAyqjNPJnWHoNdz07wLCNhtMyy+Zm68dDj80gQDkCGLF539rQm/5MZVygXIGXc0i3MjhchgfEP9Ub6xaJwnuDuo7QDHuI5MGwZYuJSkQWqfxJT7WLPDhe3Gwu7Ik3Tda9pfGtMoriCKG14H/8936wVCFYn5BjLkHe2ylw0p0NOpEI/bZl7WjEFndOKeTAqqq8UGo85JAhsHn/VIi7iAkxVgz/c35PidQCSOC18lqj+sRsGVfkXjQWUx3svLm1LqBBbBathKJZY3BigoKCYejQ6 X-Forefront-PRVS: 014304E855 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(7916002)(199003)(189002)(6916009)(97736004)(66066001)(4001350100001)(53416004)(23726003)(189998001)(2950100002)(6116002)(42186005)(105586002)(86362001)(3846002)(38730400001)(50466002)(305945005)(36756003)(47776003)(68736007)(7736002)(106356001)(7846002)(4326007)(92566002)(2906002)(7416002)(93886004)(69596002)(110136003)(229853002)(33646002)(81166006)(5660300001)(46406003)(733004)(50986999)(6486002)(83506001)(54356999)(39410400001)(8676002)(76176999)(81156014)(101416001)(39450400002)(21314002)(16060500001);DIR:OUT;SFP:1102;SCL:1;SRVR:SG2PR0601MB1453;H:morimoto-PC.renesas.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;SG2PR0601MB1453;23:9Kdpv7Kj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7vq68FZVJ6jRGdQsifna+DPpd2QFmraNTRzVbkNfhxYuKHCy4wHeXo1biFS0Y/ladELZ7BuLiM6li1rx4BeOcnXGXocutjr72kRKH/lBzMr63YJnHzJ7SPkE8=;24:9629nPqzuuHoGQ7sJ4YLuzoH1voC5Sq44OQnboGKRMJbThllYZO8XFswVDxGm2KcYbzWlVCedjXL7tvznOitV5TPxhEvFZJG2WefSUhzdME= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;SG2PR0601MB1453;7:Ktt269Et+Bh3ihziE/B8oK180f8TjSTVwaj/rvA9IWXb76NLfm4sQLnZTseSmDg59yhvofio4DZ1VFkVlAOiN+DneK1CXkkKSeguCo0aexW97+YlKm/29CobAfcB8+bZICjyHp11DdJChSu87Pi6ynbhYpd2ZOk8IcZC0G+t12stTVbz8VDT1Q+028AL6yK+XbaSDcaRGwY85dk/7FcwnwMe3z9nPiLg4cBsPA6jKcTlVfMMORcifS/yL9xGwG4Ybs7Qg0uZnKNQQ8GJi4e4/paCQJoeJSsnaAM8Z+PMb6rrML+q2zV5QTsDPknNwldVms3yeJlVqQ10BHS8zGo3rmO7NOQrJW1EWhelhn4FDZ+SNC3bSB5k3VN73nVXbqS0Wzzb1N1A22Ya3uSn3jN3szuPDebBPQ9STXRSL+Gv7YvWGlX+MKm30JIyYryJeVDAgPH9+GKpgLN/vt/2hE0Zqg==;20:mwHeUCe5OzQhCNImivMCb+Ct5FE+OzIT/xQTyrVgpe36lgua1BLMryD6bBIQLr/4sWdcwAZQO2lR+dwh7NKqIXPxyueIhlo/li26L0pKNJ9vMntwhbOtIBdfWRGxsUvSzML+hSDoz8DSKsyIQC2l616TxpbOISOjdDveAFJlv9c= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2016 01:43:03.4797 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR0601MB1453 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1123 Lines: 52 Hi Stephen, again Can I confirm ?? Was I misunderstanding ?? > I understand your point, but I think devm_get_clk_from_child() > needs new DT setings, and it can't keep compatibility, or > it makes driver complex. > I think it is nice to have. but, I want to keep current style. > Thus, I will try to use current of_clk_get() as-is, and > call clk_free() somehow in this driver. ------ Pattern1 ----------- sound_soc { clocks = <&xxx>, <&xxx>; clock-names = "cpu", "codec"; ... cpu { /* of_cpu_node */ ... }; codec { /* of_codec_node */ ... }; }; ---------------------------- Do you mean, this case we can use devm_get_clk_from_child(dev, of_cpu_node, "cpu"); devm_get_clk_from_child(dev, of_codec_node, "codec"); ------ Pattern2 ----------- sound_soc { ... cpu { /* of_cpu_node */ clocks = <&xxx>; ... }; codec { /* of_codec_node */ clocks = <&xxx>; ... }; }; ---------------------------- And, this case, we can use devm_get_clk_from_child(dev, of_cpu_node, NULL); devm_get_clk_from_child(dev, of_codec_node, NULL); If so, I can use it without DT change.