From patchwork Thu Aug 30 12:13:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Vaittinen, Matti" X-Patchwork-Id: 10581621 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E4C7D13AC for ; Thu, 30 Aug 2018 12:14:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D121E2BABD for ; Thu, 30 Aug 2018 12:14:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CED9E2BCA9; Thu, 30 Aug 2018 12:14:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 77FFD2BABD for ; Thu, 30 Aug 2018 12:14:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From :Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ZobXbqBKQxHzYXI1CwmpXpUJrURhx2tbQVIXpcd/DEI=; b=R9irj2IdYXaV0F FQfmqB7TqCX5Bkl+qnNPPr4JnD1uihBod6pp7FKkoUqrpi8sSPtLM4Hr9UhfGflPDTlF3yDrlvSnj eTvj8ayzr2M7G4BR0PhsuBQxAbxkff61h9eIWZuiB3RTSg7HyQkKiXuZGI0V5HD8CtnZiNz3xTZj3 pLtoB7cP0gviPMaNt0AtL4AnZAtkaSSGaQWbP+ip0zVkp1ZGmbNsUhJTHQoVYswKZIsPS8dMwvDb3 4BMPE2mH1ivEJw6Bz5j0K5pilShUE1kBBUCNelGp4vnLf1TaTHm867spNoexl7/iyEClbYi/unQ9E wO1I/f7Ixq5RZ9TfCPkw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvLqF-0006OC-2i; Thu, 30 Aug 2018 12:14:27 +0000 Received: from mail-lf1-f68.google.com ([209.85.167.68]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvLqB-0006N8-Sf for linux-arm-kernel@lists.infradead.org; Thu, 30 Aug 2018 12:14:25 +0000 Received: by mail-lf1-f68.google.com with SMTP id q13-v6so7013097lfc.2 for ; Thu, 30 Aug 2018 05:14:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=J0L5E5OYhi8ZdpG6+EZRwPDvaxC3WCb+Xvu7A7vbDXU=; b=JcYemPo1HKb9+bBZyJfAEroQqYn5LDaG2hWIfV+Hgg1J11R4/LcqiXsFZ/++5JUVND PXz42RwlE5gZvsUTNymKUdH0vy43fqrMOc2RznM5+kGnrvlk95NzTG+Ef38lQFYUCZ0h WJHJe8yHqw7QflTCishgM5l4R8kJRxXFI000Suu7eTuxhXVTDpH4TD2vD8QjfX//kR+e VaLK7eBnPWOmckUgQIB+biXyWa85xkrUKprm8o1sbsCGQ4c9UgpXchZbH7SLuN50qITG BpY57tedpUDLXOHta5Ofzynl30DRzduK7wLt/qliSmdy+P80c50reVoXgC22vX/tgtOQ 8YXQ== X-Gm-Message-State: APzg51B7PUXrNXLA5+FyVlUrEdqqpm2kRh3SQoEDn0ecNyMK0ocMLO/1 WnWCnFj4LdXndrsov7XtERE= X-Google-Smtp-Source: ANB0VdbO5yJovZcYFa2fc0ptSegyfnuteKffptcPj0YucQQnftCU7S4ltEJOapVKwgB7PvYUb+T3tA== X-Received: by 2002:a19:11d1:: with SMTP id 78-v6mr7079336lfr.25.1535631251581; Thu, 30 Aug 2018 05:14:11 -0700 (PDT) Received: from localhost.localdomain ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id t15-v6sm1211253ljh.21.2018.08.30.05.14.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 Aug 2018 05:14:11 -0700 (PDT) Date: Thu, 30 Aug 2018 15:13:57 +0300 From: Matti Vaittinen To: corbet@lwn.net, mturquette@baylibre.com, sboyd@kernel.org, linux@armlinux.org.uk, andrew.smirnov@gmail.com, robh@kernel.org, sre@kernel.org, linux@roeck-us.net, sjhuang@iluvatar.ai, matti.vaittinen@fi.rohmeurope.com, mazziesaccount@gmail.com Subject: [PATCH 0/2] clk: Support ROHM BD71837 (BD71847) Message-ID: MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.2 (2017-12-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180830_051423_927907_5A8CC1C0 X-CRM114-Status: GOOD ( 15.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: heikki.haikola@fi.rohmeurope.com, linux-doc@vger.kernel.org, mikko.mutanen@fi.rohmeurope.com, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch series adds support for clk gate included in ROHM BD71837 (and BD71847) Power Management ICs. Additionally patch series adds support for new managed interfaces for clkdev lookup and parent_of_provider registrations. Please note that the patch has not been tested on BD71847 - I will verify the BD71847 part and do appropriate documentation/naming changes after verification. Hence only BD71837 support is announced here even though the BD71847 should be identical what comes to clk registers. BD71837 driver in the patch series depends on defines submitted as part of this patch set: https://lore.kernel.org/lkml/cover.1535545377.git.matti.vaittinen@fi.rohmeurope.com/ The managed interfaces are continuation of discussion started here: https://lore.kernel.org/lkml/20180730125550.GD8862@localhost.localdomain/ Difference to previous patch: - dropped devm_clk_register_clkdev - added new interfaces to Documentation/driver-model/devres.txt - did not rename __clk_register_clkdev - simplified IS_ERR - checks/code dublication by dropping checks from devm_clk_hw_register_clkdev. As negative point is this causes devres_alloc to be done before checking for IS_ERR(hw) inside do_clk_register_clkdev. and BD71837 driver is continuation for patch discussion started here: https://lore.kernel.org/lkml/d99c8762b0fbbcb18ec4f4d104191364c0ea798c.1528117485.git.matti.vaittinen@fi.rohmeurope.com/ Difference to previous patch: - Simply fail out if no parent clock is found from DT. This simplifies driver a lot and encourages proper clk tree modelling in DT. patch series is based on linux-next tag next-20180823 Patch 1: Add new managed interfaces Patch 2: Support BD71837 Matti Vaittinen (2): clk: clkdev/of_clk - add managed lookup and provider registrations clk: bd718x7: Initial support for ROHM bd71837/bd71847 PMIC clock Documentation/driver-model/devres.txt | 3 + drivers/clk/Kconfig | 6 ++ drivers/clk/Makefile | 1 + drivers/clk/clk-bd718x7.c | 131 ++++++++++++++++++++++++++++++++++ drivers/clk/clk.c | 28 ++++++-- drivers/clk/clkdev.c | 122 ++++++++++++++++++++++++------- include/linux/clk-provider.h | 4 ++ include/linux/clkdev.h | 4 ++ 8 files changed, 267 insertions(+), 32 deletions(-) create mode 100644 drivers/clk/clk-bd718x7.c