From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6539AC19F2D for ; Tue, 9 Aug 2022 18:06:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343542AbiHISGF (ORCPT ); Tue, 9 Aug 2022 14:06:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344672AbiHISFT (ORCPT ); Tue, 9 Aug 2022 14:05:19 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFF2827CEA; Tue, 9 Aug 2022 11:02:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 649EEB81722; Tue, 9 Aug 2022 18:02:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 22D78C433D7; Tue, 9 Aug 2022 18:02:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660068148; bh=lJgNFnKBAD3W6+nMLS3KtRGHN5jjeaSLik2catrtBLQ=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=EVR37ynfgVxGgjgEcwtYqTtzrPixXH1kEcatTawE2JTaQLXiYyQYFS0BBFgeu+h8v EZPPjLlL/PYOBVCfiH6txoSdeeTnHfasPst7YWKv2JM/YJ4GYmcU3rR37gYXoG6T8G tP3gn/ge/WhxnN44ArX0nXU7HFUhS3tkP4Zx6HylJl5+wXPeC49Wp/ofPrRlTGdNNQ CUQ1VOZ0EcrHZIDDngG6IXDCLZo9KD7Y73NN7nfVNkqbmKCVH7EvYpfFwnsb1DQ10F j2JbGFZ3NV0Bqz36vvyXli++/yhGzj4O+GzL4xloblwzImWisqCTTFFhT3W0ST4dWB IuAaqtX+CtyuQ== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20220711123519.217219-1-tmaimon77@gmail.com> <20220718191454.5B5D3C341C0@smtp.kernel.org> <20220723030226.8E43CC341C6@smtp.kernel.org> <20220729225603.12528C433D6@smtp.kernel.org> <20220804200549.60512C433C1@smtp.kernel.org> Subject: Re: [PATCH v8 04/16] clk: npcm8xx: add clock controller From: Stephen Boyd Cc: Arnd Bergmann , Avi Fishman , Benjamin Fair , Biju Das , Bjorn Andersson , Catalin Marinas , Daniel Lezcano , Geert Uytterhoeven , Greg KH , Jonathan =?utf-8?q?Neusch=C3=A4fer?= , Jiri Slaby , Joel Stanley , Krzysztof Kozlowski , Guenter Roeck , Lubomir Rintel , Marcel Ziswiler , Michael Turquette , Nobuhiro Iwamatsu , Olof Johansson , Philipp Zabel , Robert Hancock , Rob Herring , Shawn Guo , Tali Perry , Thomas G leixner , Patrick Venture , Vinod Koul , Will Deacon , Wim Van Sebroeck , Nancy Yuen , devicetree , Linux Kernel Mailing List , linux-clk , SERIAL DRIVERS , LINUXWATCHDOG , Linux ARM To: Tomer Maimon Date: Tue, 09 Aug 2022 11:02:26 -0700 User-Agent: alot/0.10 Message-Id: <20220809180228.22D78C433D7@smtp.kernel.org> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Quoting Tomer Maimon (2022-08-08 06:08:08) > On Mon, 8 Aug 2022 at 15:37, Tomer Maimon wrote: > > > Using platform APIs means using platform_*() functions, not of_*() > > > functions, which are open-firmware/DT related. Regmap can be used to > > > operate on registers mapped as __iomem, which is different from platf= orm > > > APIs. > > I will use platform_get_resource() and devm_ioremap_resource() > > functions in the next version. > I will use platform_get_resource() and ioremap() function next > veriosn, is it fine? As stated earlier it will work for now but eventually you'll get patches from janitors trying to convert to a devm based API that reserves the register region. Can you ioremap the register once and register an auxiliary device and driver for the reset (or clk) part so that the driver can be moved out to the drivers/reset/ path?