Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932775AbbENOiK (ORCPT ); Thu, 14 May 2015 10:38:10 -0400 Received: from mail-bn1bn0102.outbound.protection.outlook.com ([157.56.110.102]:50483 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750916AbbENOiB (ORCPT ); Thu, 14 May 2015 10:38:01 -0400 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; From: Dong Aisheng To: CC: , , , , , , , , , Subject: [PATCH v2 0/5] clk: support clocks which requires parent clock on during operation Date: Thu, 14 May 2015 21:28:58 +0800 Message-ID: <1431610143-21853-1-git-send-email-aisheng.dong@freescale.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD010;1:Tx2nzb/3A+fzndpWh7W6wxO6G+UsURTZhw2NikSmkkPpmy+5V6l3cVhZaHw/ciseKVVjS0+C6g5nDvGQiqpwsSv4y0kFw3G1QWrIcXCvGyWOOHlswgWFkXr1E/nYR/CRXS51CzsG5DuPwbmd1zzJCs3QnRcT8kQF6ZNv3AhuBNZ025lui8nNjsH9RQi0cYKtKyCQMHEsQRZh2FFCKpOsPqJuC/zolTlg4df20mbWQkWNDclFhHcpMR8v8PFUBhwqsxAeog7DB2YVtba5+CL8Mu/n+JxLkigpyWVssSt4Wdq0kEGlpxZQ1Jgn2uv1Wl9WAs/JJinUtT3YJ6GTDyXG3w== X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(339900001)(199003)(189002)(54534003)(189998001)(104016003)(107886002)(110136002)(19580395003)(5001960100002)(48376002)(50466002)(33646002)(77096005)(105606002)(50226001)(6806004)(87936001)(106466001)(36756003)(85426001)(46102003)(50986999)(92566002)(62966003)(77156002)(86362001)(47776003)(229853001)(2351001)(4001430100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR03MB1354;H:az84smr01.freescale.net;FPR:;SPF:Fail;MLV:sfv;A:1;MX:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;BY1PR03MB1354;2:SYH23vAaNIEv6o7JcJ4DWsmpAkj+162iVPAafikNGH6ZuC9rjm3pK5mkNFhuugtM;2:XYMyFuWrGZGMXMTyFBWM5qwytLRCE/60WUy+xqD69HAXppvMNgYsza1wBPZyMf1BdJ2gQ4dSe1ut2G0i2Cjz/Keq3Lmxg/e+nsnDIJoM8lr9Lamid2MgFkKG7gKEsT/RLBCz+a5xLbzFw9ezvsk+kONy5uFjjLiUJVBtQ21k0AqkH+LscEzdd2HCaeZFOp6sRh28Hwg3SQOc7f/k7jKrKgxG1WzmxKbnP2LdmiNVyzs=;6:v5CE4C56j0q3YntK/Cj3/rJcxCYhpIsI54OAMC2Gz2xlUYkRw22OM15dlanCPusQsowFzRh52HQespVQ3RwA+CFcDQC3NOJzPx13ndsF05JrQfxnnuXbZNx7QFOW3Tuy8xB8BKo0/+dOrF2iy/hPjG5CJLdm1E5p5rSqHg0RwTtCMwQYDa5Yl+f6mHY1ERPa4K/8w+mkicXdsN30sorT63mmL9RgAk73lkwtcFaLTcbgO1Dbv9IoiGXSQniBGzSpYE02Es/KLi88L5JbIgHuVJDupWbPdtDCQ29hOufueK7zI2hv1zRx2QBHjlu7R90QmAbh6k2EYcoi0fDYTYcXrg==;3:Wz341J4cyRkQHn0lm+VcxB/7+w7G0Gy3vp/2f2wCFQzZ6ONObI6mKIt+xxyYv7jzFQnaiXoVemPB8fL3DJFUsNoBeKhJz7mlmDDsmhdgqWdQObckE99jVDCHiWw+6z+YIWCAB/kmrUyzKw2bJr8P9m1TZ65pdcNW+5tc6C23dz5h8xwT8buQfEChpW9HTLZ9xLQKW8FJep/jiQ+qjnsZ/TdcoH1v7hreFbsXN4YT3qJBwNcz5/gJr3JFsAyrBOg9nykW3GApKB6L8UgTAS62fMqyLjoiRLI9aZXtNVEWP/o= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1354; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BY1PR03MB1354;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1354; X-Forefront-PRVS: 0576145E86 X-Microsoft-Exchange-Diagnostics: 1;BY1PR03MB1354;9:hpS9ZxkKUglfOOIRSgj3K8IpSLGwdZLr71tOn3/F5JYv51tmkhnrgQu9zWvgIk/meqPe2Rv2FNaJWQgf5sx7vU+G6ddCL2tL97oWFykwrRyJ7bZLNEaoPS8KL2dJEbBibNttzMm8nGRX9EYONzd+TsKK6y7FLkxtj03PJCg4qmhJgp3EuP+V7QhvlkFDacUgvXRia26+2/So7FxoRgBVekhDWVJ4akqy0Bg69a2xOlq6wThrWZHTaEtQf0rJ3MlFOMa/tnnA0g7CmAqhmELedm1vuBAr3mthilrcgVHXe0hmekMpXsy6MI5TIvWIPxazmcAbI4Ywtig2yoORpZVvAsB05ip8wkHjMp1gzgOQPl9dckVyPxJYqNWXslh63Gs8/MLkTnRbKJ/u2FOC/MPnvtLlTSyF/OIKCyf0JlN2HP/J4e+U2+TdOpLj0ZDFvO34NfcE+5297ZOd7DhGZvSB9UKYpP7n6NlnVFe4XWvMZfSP8UxrGwkyg0HcoOCUGnJ3stmQ7+eA6tJlhBkQAXVQOh3w8qLB+0utUkQpaQeE9AhLlUfVd0MLGxdeCZPage8wp3CwUHxDkqo4D9D/knnep6U8nT4pHlm4f+/m4JT4k+CUfMZVwu5gnHB7dN2XO98wQ3lgkkA7yRUw4gQ6sFv6EqNYT5Usuo4LvIKSRoRT8fd0uF9bYrvsNeENEKgOKV807gZPDazEhb9n9H8cDysetypU+XKNbembUQOTaA0ojy5A0DWUln51xQlc94JgH2XUbBS+46F1g9K1YNgxvav5a/+5olOvqQ4IY6DnXZaJk4iE8eOagg0GbYr2s1Ed18LAPUZo8UrucvCGdAU5Gub77cFLftiw1MDXTdP4QU+KoZU= X-Microsoft-Exchange-Diagnostics: 1;BY1PR03MB1354;3:La1gonO3zhedAc/m0QjStcByuxJ97gmFOmNx+YH1F9ee5lz9VLO6M8vVE//qPKYtxFNHSfNBy4IMKze+hEcZKCM/66/MbXBOQOvsA/9fQmJyeJZFnb/s86wnpEceaJ20tUKbsx/hgdvWYOhjKYTu7g==;10:kxT9EdY1BrP+lt4mx4BAEcjv2lKf/knZrEKQHbVpj4cz/IkUJsIsFxu6w9BwEumSLIH3uW06t5WXgXMJqgWFSvXSEw47532FNKYLLSbyrqw=;6:iLStQG16CK8p2T986iMA36U4LSZOomotWa3ZLrHJXCovtiLica+MMlGAVDAEKAuw X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 May 2015 14:37:55.7392 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.158.2];Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR03MB1354 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1968 Lines: 48 This patch series adds support in clock framework for clocks which operations requires its parent clock is on. Such clock type is initially met on Freescale i.MX7D platform that all clocks operations, including enable/disable, rate change and re-parent, requires its parent clock on. No sure if any other SoC has the similar clock type. Current clock core can not support such type of clock well. This patch introduce a new flag CLK_SET_PARENT_ON to handle this special case in clock core that enable its parent clock firstly for each operation and disable it later after operation complete. The most special case is for set_parent() operation which requires both parent, old one and new one, to be enabled at the same time during the operation. The patch series is based on for-next branch of Michael's git: git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git Change Log v1->v2: Mainly addressed Stephen Boyd's comments * remove dupliciated code with __clk_set_parent_after * introduce more clk_core_x APIs for core easily use * move clk_disable_unused code position * use clk_core_x API to make code more clean and easily read Dong Aisheng (5): clk: remove duplicated code with __clk_set_parent_after clk: introduce clk_core_enable_lock and clk_core_disable_lock functions clk: move clk_disable_unused after clk_core_disable_unprepare function clk: core: add CLK_OPS_PARENT_ON flags to support clocks require parent on clk: core: add CLK_OPS_PARENT_ON flags to support clocks require parent on drivers/clk/clk.c | 338 +++++++++++++++++++++++++------------------ include/linux/clk-provider.h | 5 + 2 files changed, 200 insertions(+), 143 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/