Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1628506ybv; Fri, 21 Feb 2020 00:35:03 -0800 (PST) X-Google-Smtp-Source: APXvYqzwfv3mLWSmoEavrD2a6r9gtocWpELco8aCSrnhLP8+KgVirNslqWb0wbWwDSOhCkRFMY/i X-Received: by 2002:a54:4010:: with SMTP id x16mr1091301oie.174.1582274103592; Fri, 21 Feb 2020 00:35:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582274103; cv=none; d=google.com; s=arc-20160816; b=fkg5X/uAXEpEuaElRVJUggoTjmbqgcgxC3vsAMb3YzTti91d9YR+Qa5zy48CWno8tJ 9wfGo83ARWIlU54cCi/LgTWD7YL+5tKEa8ACIVqYdWvyRek14w+cVjjUxo1iylo+sE65 zMQQ1hjMgDdHsHumqGpjhXZaLnEn1xs54JGRaaw+6OJqVTdOFjMfgP6AEm0rFEmLdRyA oON+oh0YpNWvc5cBfBQipz7Z/i/8Z1lJ5Nh9GqDwYbLcl0CFi7IrsvJbbshqZMmHc1WM vMhHySoytYxcSEMq6/UPZ+fMeIMaUZIBlWIaUgTSegoZC36thwZ7jyp6Gj0c3zSClV5+ 8Qww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject; bh=Mgci0/UDNDJz/SQ/TpAqwGXLYG/Svzp+0rFFKXthY6Q=; b=MORMZajpPsJNzQjL+aLkrQNt+SBnWQWrO2tfHULv+fcWH9q++lLjgOrryiDOkALNJW iVj1V/Ys6oVGfB9cjE3zCDTIsb2dxV6k9jHPVOAX/X72GW3EYIhZKzqYNRUTbxnyoOJy vM0fRJVWfLWJJ6yz7TuJ0GmxBpK7cj0eIQ0UWqr8YF37QCsZ1Y/4MXEVBuXOfUPWXKX9 dxf+MBI9XDTLNL8nvBLxrJrhNGvm+2ZQu4MPu7/d22QOqnBftzGXxTR+hNwSn7nyi7/D VNQ9TAALnJK6WZXoYCgLkXcKFDjCpjzxbYrncbgmqaNGcBOZyNHvL5mykAMycuZfEyTS w88w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n11si1136681otq.112.2020.02.21.00.34.51; Fri, 21 Feb 2020 00:35:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732848AbgBUIeP (ORCPT + 99 others); Fri, 21 Feb 2020 03:34:15 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:56017 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732179AbgBUIJo (ORCPT ); Fri, 21 Feb 2020 03:09:44 -0500 Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=bjornoya.blackshift.org) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j53NH-0003OX-CY; Fri, 21 Feb 2020 09:09:27 +0100 Received: from [IPv6:2a03:f580:87bc:d400:6ccf:3365:1a9c:55ad] (unknown [IPv6:2a03:f580:87bc:d400:6ccf:3365:1a9c:55ad]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mkl@blackshift.org", Issuer "StartCom Class 1 Client CA" (not verified)) (Authenticated sender: mkl@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id C89614BCCA9; Fri, 21 Feb 2020 08:09:24 +0000 (UTC) Subject: Re: [PATCH v2 2/3] can: m_can: m_can_platform: Add support for enabling transceiver To: Faiz Abbas , Dan Murphy , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-can@vger.kernel.org Cc: broonie@kernel.org, lgirdwood@gmail.com, catalin.marinas@arm.com, mark.rutland@arm.com, robh+dt@kernel.org, wg@grandegger.com, sriram.dash@samsung.com References: <20200217142836.23702-1-faiz_abbas@ti.com> <20200217142836.23702-3-faiz_abbas@ti.com> <250f905a-33c3-dd17-15c9-e282299dd742@ti.com> <8885c00b-7b73-0448-7e9d-ecb19fe84adf@ti.com> From: Marc Kleine-Budde Openpgp: preference=signencrypt Autocrypt: addr=mkl@pengutronix.de; prefer-encrypt=mutual; keydata= mQINBFFVq30BEACtnSvtXHoeHJxG6nRULcvlkW6RuNwHKmrqoksispp43X8+nwqIFYgb8UaX zu8T6kZP2wEIpM9RjEL3jdBjZNCsjSS6x1qzpc2+2ivjdiJsqeaagIgvy2JWy7vUa4/PyGfx QyUeXOxdj59DvLwAx8I6hOgeHx2X/ntKAMUxwawYfPZpP3gwTNKc27dJWSomOLgp+gbmOmgc 6U5KwhAxPTEb3CsT5RicsC+uQQFumdl5I6XS+pbeXZndXwnj5t84M+HEj7RN6bUfV2WZO/AB Xt5+qFkC/AVUcj/dcHvZwQJlGeZxoi4veCoOT2MYqfR0ax1MmN+LVRvKm29oSyD4Ts/97cbs XsZDRxnEG3z/7Winiv0ZanclA7v7CQwrzsbpCv+oj+zokGuKasofzKdpywkjAfSE1zTyF+8K nxBAmzwEqeQ3iKqBc3AcCseqSPX53mPqmwvNVS2GqBpnOfY7Mxr1AEmxdEcRYb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sXz Message-ID: <8a001afe-dc97-fa1e-4e80-20da89eb2105@pengutronix.de> Date: Fri, 21 Feb 2020 09:09:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <8885c00b-7b73-0448-7e9d-ecb19fe84adf@ti.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/21/20 8:54 AM, Faiz Abbas wrote: > Hi Dan, > > On 17/02/20 8:40 pm, Dan Murphy wrote: >> Faiz >> >> On 2/17/20 8:28 AM, Faiz Abbas wrote: >>> CAN transceivers on some boards have a standby line which can be >>> toggled to enable/disable the transceiver. Model this as an optional >>> fixed xceiver regulator. >>> >>> Signed-off-by: Faiz Abbas >>> Acked-by: Sriram Dash >>> --- >>>   drivers/net/can/m_can/m_can_platform.c | 6 ++++++ >>>   1 file changed, 6 insertions(+) >>> >>> diff --git a/drivers/net/can/m_can/m_can_platform.c >>> b/drivers/net/can/m_can/m_can_platform.c >>> index 38ea5e600fb8..719468fab507 100644 >>> --- a/drivers/net/can/m_can/m_can_platform.c >>> +++ b/drivers/net/can/m_can/m_can_platform.c >>> @@ -6,6 +6,7 @@ >>>   // Copyright (C) 2018-19 Texas Instruments Incorporated - >>> http://www.ti.com/ >>>     #include >>> +#include >>>     #include "m_can.h" >>>   @@ -57,6 +58,7 @@ static int m_can_plat_probe(struct platform_device >>> *pdev) >>>   { >>>       struct m_can_classdev *mcan_class; >>>       struct m_can_plat_priv *priv; >>> +    struct regulator *reg_xceiver; >>>       struct resource *res; >>>       void __iomem *addr; >>>       void __iomem *mram_addr; >>> @@ -111,6 +113,10 @@ static int m_can_plat_probe(struct >>> platform_device *pdev) >>>         m_can_init_ram(mcan_class); >>>   +    reg_xceiver = devm_regulator_get_optional(&pdev->dev, "xceiver"); >>> +    if (PTR_ERR(reg_xceiver) == -EPROBE_DEFER) >>> +        return -EPROBE_DEFER; >>> + >> >> Where is this regulator enabled? > > I have set regulator-boot-on flag in the dt so this didn't require an > enable. Please don't do this, please handle it properly. >> Shouldn't the regulator be managed by runtime PM as well? If so, then make the runtime pm kconfig option mandatory. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |