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 X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB97BC47E49 for ; Thu, 24 Oct 2019 11:26:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9B21C20856 for ; Thu, 24 Oct 2019 11:26:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438966AbfJXL0o (ORCPT ); Thu, 24 Oct 2019 07:26:44 -0400 Received: from mail-oi1-f193.google.com ([209.85.167.193]:45134 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436501AbfJXL0n (ORCPT ); Thu, 24 Oct 2019 07:26:43 -0400 Received: by mail-oi1-f193.google.com with SMTP id o205so20253897oib.12; Thu, 24 Oct 2019 04:26:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wEN6e0/MxNO16kycUtNHeQbv7shcXHxQxFuBG9rhr9I=; b=D44xrebdsKSOaGG3wAh8d9j65t84NbRp+9hVGFTTm+f1EvvDCV9CpUE7EpIn1l9pXO Td+XCbNxI7HrzJ4u+SsXS5STcJq6f/vhEpfSpeJf70dP2N0vp/LtQeN+JegYhSgYqzSt XKybo45hPYqYNrjVC+ZhxAXgSSmx1b4vVojHi+8FWVTDt2V/4zOR/DcPpIhGT27uxPBd 06oUBuQQehyqldr8AIuakPDaYLbadDpY/Ii5z1r+9SVElu3enqAC7embQWRx0RHbl8Zw W5cRzihpz+6jcybPaEXkJY3qmK7XvCIE9N3W7h3eqXTyGHkFSo2kxjPi3mjHJSU09IkL Xd6w== X-Gm-Message-State: APjAAAVlJVBUnvIDPWdOYAH4dYSuMLHS9yHyw0QRcwcXCtsADKjsUr5o DbTJfXV/10ZdnlFHH/4t38XlcyNMNcVWYQYDZoM= X-Google-Smtp-Source: APXvYqxLkFl0zXQzYvWYVhDFhuiPRuCrmThkK6TFDPojZvXWJSIWgVDfdBktFcE6vX8rQiOogr/MfJ38897B4Epe/zY= X-Received: by 2002:a54:4e89:: with SMTP id c9mr3975149oiy.148.1571916400959; Thu, 24 Oct 2019 04:26:40 -0700 (PDT) MIME-Version: 1.0 References: <1571915821-1620-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> <1571915821-1620-4-git-send-email-yoshihiro.shimoda.uh@renesas.com> In-Reply-To: <1571915821-1620-4-git-send-email-yoshihiro.shimoda.uh@renesas.com> From: Geert Uytterhoeven Date: Thu, 24 Oct 2019 13:26:29 +0200 Message-ID: Subject: Re: [PATCH 3/3] clk: renesas: rcar-usb2-clock-sel: Add reset_control To: Yoshihiro Shimoda Cc: Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland , Geert Uytterhoeven , linux-clk , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux-Renesas Content-Type: text/plain; charset="UTF-8" Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Shimoda-san, Thanks for your patch! On Thu, Oct 24, 2019 at 1:17 PM Yoshihiro Shimoda wrote: > This hardware needs to deassert resets of both host and peripheral. > So, this patch adds reset control. If the hardware needs it, probably you want to make CLK_RCAR_USB2_CLOCK_SEL select RESET_CONTROLLER? > Signed-off-by: Yoshihiro Shimoda > --- a/drivers/clk/renesas/rcar-usb2-clock-sel.c > +++ b/drivers/clk/renesas/rcar-usb2-clock-sel.c > @@ -164,6 +172,10 @@ static int rcar_usb2_clock_sel_probe(struct platform_device *pdev) > if (IS_ERR(priv->clks[CLK_INDEX_HS_USB])) > return PTR_ERR(priv->clks[CLK_INDEX_HS_USB]); > > + priv->rsts = devm_reset_control_array_get_optional_shared(&pdev->dev); If the reset is really needed, you should not use the optional API. > + if (IS_ERR(priv->rsts)) > + return PTR_ERR(priv->rsts); > + > clk = devm_clk_get(dev, "usb_extal"); > if (!IS_ERR(clk) && !clk_prepare_enable(clk)) { > priv->extal = !!clk_get_rate(clk); Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds