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 E2224C433EF for ; Wed, 29 Jun 2022 16:26:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229760AbiF2Q0y convert rfc822-to-8bit (ORCPT ); Wed, 29 Jun 2022 12:26:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231512AbiF2Q0y (ORCPT ); Wed, 29 Jun 2022 12:26:54 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EEA93617A for ; Wed, 29 Jun 2022 09:26:53 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o6aWR-0006oI-Ij; Wed, 29 Jun 2022 18:26:35 +0200 Received: from [2a0a:edc0:0:900:1d::4e] (helo=lupine) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1o6aWK-003Qov-VO; Wed, 29 Jun 2022 18:26:32 +0200 Received: from pza by lupine with local (Exim 4.94.2) (envelope-from ) id 1o6aWN-000Dce-Hf; Wed, 29 Jun 2022 18:26:31 +0200 Message-ID: Subject: Re: [PATCH v2 2/2] i2c: Add Renesas RZ/V2M controller From: Philipp Zabel To: Phil Edworthy Cc: Wolfram Sang , Andy Shevchenko , Jarkko Nikula , Krzysztof Kozlowski , Sam Protsenko , Rob Herring , Sven Peter , Jan Dabros , Lukas Bulwahn , Tyrone Ting , Arnd Bergmann , Olof Johansson , Biju Das , Geert Uytterhoeven , linux-i2c@vger.kernel.org, linux-renesas-soc@vger.kernel.org Date: Wed, 29 Jun 2022 18:26:31 +0200 In-Reply-To: <20220628194526.111501-3-phil.edworthy@renesas.com> References: <20220628194526.111501-1-phil.edworthy@renesas.com> <20220628194526.111501-3-phil.edworthy@renesas.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-i2c@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org On Di, 2022-06-28 at 20:45 +0100, Phil Edworthy wrote: > Yet another i2c controller from Renesas that is found on the RZ/V2M > (r9a09g011) SoC. It can support only 100kHz and 400KHz operation. > > Signed-off-by: Phil Edworthy > Reviewed-by: Biju Das > --- > v2: >  - Use the new NOIRQ_SYSTEM_SLEEP_PM_OPS() as suggested by Arnd >  - Lots of small fixes based on Geert's review > --- >  drivers/i2c/busses/Kconfig | 10 + >  drivers/i2c/busses/Makefile | 1 + >  drivers/i2c/busses/i2c-rzv2m.c | 530 +++++++++++++++++++++++++++++++++ >  3 files changed, 541 insertions(+) >  create mode 100644 drivers/i2c/busses/i2c-rzv2m.c > [...] > diff --git a/drivers/i2c/busses/i2c-rzv2m.c b/drivers/i2c/busses/i2c-rzv2m.c > new file mode 100644 > index 000000000000..ab326d557dc5 > --- /dev/null > +++ b/drivers/i2c/busses/i2c-rzv2m.c > @@ -0,0 +1,530 @@ [...] > +static int rzv2m_i2c_probe(struct platform_device *pdev) > +{ > + struct device *dev = &pdev->dev; > + struct rzv2m_i2c_priv *priv; > + struct reset_control *rstc; > + struct i2c_adapter *adap; > + struct resource *res; > + int irq, ret; > + > + priv = devm_kzalloc(dev, sizeof(struct rzv2m_i2c_priv), GFP_KERNEL); > + if (!priv) > + return -ENOMEM; > + > + priv->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); > + if (IS_ERR(priv->base)) > + return PTR_ERR(priv->base); > + > + priv->clk = devm_clk_get(dev, NULL); > + if (IS_ERR(priv->clk)) { > + dev_err_probe(dev, PTR_ERR(priv->clk), "Can't get clock\n"); > + return PTR_ERR(priv->clk); > + } > + > + rstc = devm_reset_control_get(dev, NULL); Please don't use devm_reset_control_get. This should probably be devm_reset_control_get_shared(). regards Philipp