Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933256AbcLAB4g (ORCPT ); Wed, 30 Nov 2016 20:56:36 -0500 Received: from relmlor2.renesas.com ([210.160.252.172]:19568 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932412AbcLAB4c (ORCPT ); Wed, 30 Nov 2016 20:56:32 -0500 X-IronPort-AV: E=Sophos;i="5.31,723,1473087600"; d="scan'";a="226746629" Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; Message-ID: <87mvgg76rq.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Stephen Boyd CC: Russell King - ARM Linux , Rob Herring , Linux-ALSA , Linux-DT , Michael Turquette , Linux-Kernel , Mark Brown , , Linux-ARM Subject: Re: [PATCH v4] clkdev: add devm_of_clk_get() In-Reply-To: <20161129212600.GH6095@codeaurora.org> References: <87zikjw08i.wl%kuninori.morimoto.gx@renesas.com> <20161129212600.GH6095@codeaurora.org> 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:56:22 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TYXPR01CA0009.jpnprd01.prod.outlook.com (10.168.40.19) To KL1PR0601MB1445.apcprd06.prod.outlook.com (10.169.69.23) X-MS-Office365-Filtering-Correlation-Id: b95bfd04-0ce8-4153-b476-08d4198d4124 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:KL1PR0601MB1445; X-Microsoft-Exchange-Diagnostics: 1;KL1PR0601MB1445;3:pkNttuB1+1cp6RrcytOTSwpNhVN/nW6Py5xTms6TrS2UnDiE10I5LRY6+s2LJbquEg881O2JmN+GZ4J7JO38+xGNtM/yvZ1vBZchAbfZLajHUDkEyo9IwnLlT962H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FnPGbelGfKCRiRnCjU1kBdrfhojBrJnQNABrBCTOveaqH2MTpOUKQkao+WKloL4UxjqWdf9oNBmTlvEKuys7zlGfS1d7rGLM53DFpFaao36eCXM29Gyeip+Zf0WySKnZkTJ6DBaVR7vz5VVB8UEfC4O9vzlZEPk4Ki/ZGMeLJVZBQgvdWy9YmWCC8wmJK+8TMllq+LG2Z9H2ExX6WPAnf2dMlqc23JZh2ZOAalOO9hgO2yyUjXQLkd3iBJbQxyE81jwYXgYvkenIgFiRDQvkDyaOgXv9WUqcsdQ6nn7MllrN5a/vGCFTVQd9PaQl8DubQ0VsCZGvo9bkSPGqBbMRDLyynTgLLTgXTFo6lEc+8fPHzUjtGfdCVGMYb1TfEc59XTMrul2WXe9mfTaa31uSbKwcpu X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(788757137089); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6041248)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(6072148);SRVR:KL1PR0601MB1445;BCL:0;PCL:0;RULEID:;SRVR:KL1PR0601MB1445; X-Microsoft-Exchange-Diagnostics: 1;KL1PR0601MB1445;4:aewiLNfHIuI/kxGh/dp17ps5Atten2TUTgiYUevTsTst0TVc9bg0zX1V8kA+T2fwSvQSboY/SJXpcH5G2nZsLby9/8ViKtA/MxVxDIUqTjReH0EiXcyXckf96dLW/+1FViWAHLTsQwY5HPt8+Mcs8KicVW4Cbxew9HiYCohi5frKsJuX2Fh7gTIyKrRpQuBnKwBUBFyzh4wMUGUnQhYDB6zHLQaEKshitO0GkVtdzp0Vgqr3Qbc6PNQJIHMMEfEYMiowu202GCk55yfSOAs08oqeC3g9w1HEqoZMBn1bslzAntBwJ1iCGouTSillUKRThbz3uf83goQiMCv0yceyozPR1rbQcDOyQZzx7/QWyAcuYKsKXfQ8vEyC40gQgLmPApJbz/jW+tnshGNmOAt0BheR7z7aTf3/PX4pEig4GT7gn38+l2S5Kaa0HqwtWkkmeDM5frmvs5Lg4YguecKTpsYWnj9fUo4xD6rma6BbWzD0E5A2l2b7pTypfZhmAHKnwoRQYuGyP309eGhprdFGJkTsmlaxozAY07AYuDwd/3E1kqQJCX9qDRCvKarul3YBl2eXmMG5A5DGRdv6EXn0JmZznAeZ72jWb2aLqkCHHvIMiEhYS7iN5GDqKZ6f0Zt7 X-Forefront-PRVS: 014304E855 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(7916002)(189002)(199003)(229853002)(36756003)(69596002)(66066001)(33646002)(97736004)(4326007)(733004)(54356999)(81156014)(81166006)(8676002)(3846002)(4001350100001)(92566002)(23726003)(189998001)(6116002)(50466002)(47776003)(106356001)(86362001)(42186005)(7736002)(305945005)(2906002)(105586002)(5660300001)(2950100002)(7846002)(53416004)(7416002)(110136003)(50986999)(83506001)(68736007)(101416001)(46406003)(76176999)(38730400001)(6486002)(39450400002)(39410400001)(6916009)(16060500001);DIR:OUT;SFP:1102;SCL:1;SRVR:KL1PR0601MB1445;H:morimoto-PC.renesas.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;KL1PR0601MB1445;23:G0sWv8XPPK9xwdfVBrPD7ZCLCbUIwn0nZJ/7gQR?= =?us-ascii?Q?gFz0NUkRD1zUKxFEGab9sZHBuWREFAHAMf9/r4PTpUgr8uRxg2iV38lyKAMx?= =?us-ascii?Q?H2iQlrDHBDYQ7IbWGGiS8jwiOCUhdhXalOmBQ3gwSB0Pc5u+mv9VJjJyCwrV?= =?us-ascii?Q?8ycwfrw/wFLCNGKSK+KZqYM8absibFzJnKJ9oGOdwuYHqxWOqmnR8vKTMtpz?= =?us-ascii?Q?VRy6HRENSmfPgPudSKHZRJrJpfJWKIrWP626JblHgfZRwuRE/i1WxzGZLath?= =?us-ascii?Q?CVjNHZNHCooagbOShvU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us-ascii?Q?bClkToNoH84cI14S3p1+gqQsCLzGjfj/nszXs?= X-Microsoft-Exchange-Diagnostics: 1;KL1PR0601MB1445;6:rtQk5LELY/QYuO1nYgfH24hMZPr2V8GXsQRHWenk+7XkhVtfEsdwP2LMkV3WsIhmSKF7zzbujD6JZNddZjilFWaYmRvpfNaXbpScI8Qjg4GEp/e7c952EYZV8OGJNVxC8S+rL1XCb8t1jVu+iOLR2YFfAXGS4luWSfbE9dfpZUGJYRKVte7KI+ItU6Oki9kQoBZR6DJGKbwp2B4gd1KEZUQzZlB1LqSVpmI0JLN0sgm+dbQtXpw+FPjb4XENM9IV1bzRTL6Ybar3ELzHGQFtiQfwlozoSwt6JszaS+79NUlPfmcLUK7R/2eR9Gf2vljRBOSat0PCequOLkdqjL4rcF+g5gsFxsill3zmi9/nlx63NnApjyh5Vq6HMoMdyvGe9DkzV4WOAvEeae/ywbFHP39snzq1kXlxnR88zutpiouPxkG2ZQk2LkWOkylW5ABJFKaY0GEORSEmDa3R3bLyl20ho5jrr9hSCet3VMdRWWdU5eRx1ixaCrhjCSSzfoJv;5:HzGXsxiGabjgzQqsR3tmhB/V+ZwRpk8xtrvM7Vya6xaE0CkJfSHmfbxMUG182ZYG0oJ4btUzXtt1dVtjZgm1lN8Fg2/2pF0ilIDJt/Doz8pQsiauuqRYgJzNY/Xu5hDxpweYOwQV2Bn69YvHt35CLGOUfqyAeBLl8Zj43Bdzkno=;24:AxJkUfoSy4teaMb5dRQWBkc8ETO3a/JEEneObkb+vEIjqceELGbMJveVT7D+t6fwQBlV54bL5iDnwNdSelAZ/PjtNF4yJqQyj1Y30ZIVUx8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;KL1PR0601MB1445;7:xQylsPaqoI5Y6sDDNhxiiVk8soCWyAtMgmETFPcQQg0k0cE0iwdt4HtIYf+hDNOKzXNZ5ddx6crDkBbl1ON2gZOKi3pDOVOCUVScRRAeZQFgYLmdzjxu/ATqK+5fHPPlZ8+PCp/fP8623d4ggwupbLe0ojUjQ1i/8NxWaWiXCeU1iRHB/PXZ7TdASna8eqqdt4nvjBWJy+VH9drn6ztzRFcxzHdrPMrdWYc37rogpcQt5y/PyGzCOYMP4jVXZn9RJlYbERFWwmU7BOnyhSlJK/jz0oiuB+AdUcAB1n5gXsaxmp1RKsGaM8RVGNyonUbyRvr20peZ5lhIZubTtNqcWvXDsXpSqMT5lOrADaUKN1y2EgVbaUuhlmVNpmnbUTKTYYVXwyxy09hLInBR5vrO5eW3E++pW5gUByHdouA6GXvyJ3SRXn+IZOElQSlfjn9j/XcAqDDE1gPrsr7TlUNOXg==;20:NC3jLm+6DZobYUJZBMoAvmFD9YkxXd6esNNymdTjsq9FeJtYHWganc2zZExEO+NCgqYVsMpr8psc2xUr8X91LS+kfYnu2ctid7/ElfKLjLbmSl1S8KmYHc2T8xAzyfiI3nd2VnG9SBy9gIjZF4i/7K5la+MPuJhbvN01U8H4Ags= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2016 01:56:22.9700 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB1445 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 883 Lines: 29 Hi Stephen > > Current Linux has of_clk_get(), but doesn't have devm_of_clk_get(). > > This patch adds it. It is implemeted in clk-devres.c to share > > devm_clk_release(). > > Please add an explanation of why we want this sort of API. The > example you gave for audio sound card is useful. We're not going > to remember 5 months from now why we did something, so we should > put that here instead of digging through mailing list archives. OK, will do > > +struct clk *devm_of_clk_get(struct device *dev, > > + struct device_node *np, int index) > > Please call this devm_get_clk_from_child() instead. Also, replace > the index argument with a string called con_id. Then call > of_clk_get_by_name() instead of of_clk_get(). I guess we want to have _of_ on function name ? devm_get_clk_from_child() ? devm_of_get_clk_from_child ? Best regards --- Kuninori Morimoto