Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1636725ybv; Fri, 21 Feb 2020 00:45:15 -0800 (PST) X-Google-Smtp-Source: APXvYqymMMPdEltTKN5vJ3PDXT2tqLdD0IisN97kkOluWa78XB+RSFgyNP4kI2ybcTlmx0Qk0jF4 X-Received: by 2002:aca:1204:: with SMTP id 4mr1077201ois.143.1582274715285; Fri, 21 Feb 2020 00:45:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582274715; cv=none; d=google.com; s=arc-20160816; b=PjXsO0QPfq3ZA60cE7YCua/8jwjR5bQDti1ywtRjKTX+KG3+ApS9/R6T1WyLu9uLeT 4Wpu+uzwtMI9qC/Ng6QuMOAyy8H9zkVriLfhFnRWLD809kaF+Y+WJ0HCF5E7B4agrG8F YRf+fRG6fkc1UMWaPhiScDX2uXBohAbDw/Ry3Dc7HpT7L7MepM9mOhYP2xccFDhQxA+w qox8vdt3CzTJBvcAXyQw2mPjUScj1wHuuiGar+YtIYEMfUbMF6Auzc6JIcrTA/RDkDHq ciwMoh+4GPoi+ftzX4k1xHkIjIiHnnH2Wb+xKmvqFba73lJ5BLKw/T9ePQXKM9kFPC7h 95Kg== 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:from:references:cc:to:subject:dkim-signature; bh=4oe8zWumyH1U/XLfwq2hHrnruwHoFbfKJKSxe0/eD4A=; b=bW+gLyH/ghClskqfdkSmWuZtxadCxlG1HL2d/d7SXIyeMfh42PQsf2rHBvuSGXQrDh 4nIjrHaN4ExUOcY7J4PvbMfIZqyUWdodEwUXARSqRUMxT4FCEEY9pp/rw1WwBQV4qmwb loTm5DmgRnxkGp3khXoM7hwznVCfti66IrT21Bx+5TzDLzsFEKN+gUyapvC3F21c/VNH t1U1xYCTCnXt0C5Pcx9v+Yv4E1xQ9mxPnt6KVmOmT3sNNDSOod7sPVZj6c03XaSuauqc dNKqm8j0KzhrHkwPh2qPzAA46gEpmpUbsdCGtivVn7oOAFI9wQ4/UO2uNwXj8wZXqLBh fyCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=m5iOI48L; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a4si1027411otq.98.2020.02.21.00.45.03; Fri, 21 Feb 2020 00:45:15 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=m5iOI48L; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730479AbgBUInY (ORCPT + 99 others); Fri, 21 Feb 2020 03:43:24 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:45942 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730127AbgBUHxi (ORCPT ); Fri, 21 Feb 2020 02:53:38 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 01L7rABf123736; Fri, 21 Feb 2020 01:53:10 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1582271590; bh=4oe8zWumyH1U/XLfwq2hHrnruwHoFbfKJKSxe0/eD4A=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=m5iOI48LxCt9hBXs9jVzOFlNoQDGfM09SOucuNdRdLcsBPGKDvT8cTIa/2A1Mn3os bqsUUuzUX9mRu4cqGRLtOGsCSGHzvqYLKqk4kqDZ4eeI40lK6MgJqvswYpcFoDT0Yq bUft9eWP9YpyyHFYDM49x2uuO8EZZX7KIr4Ct3fQ= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 01L7rA9Q023230 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 21 Feb 2020 01:53:10 -0600 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Fri, 21 Feb 2020 01:53:09 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Fri, 21 Feb 2020 01:53:09 -0600 Received: from [172.24.190.4] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 01L7r5hr091996; Fri, 21 Feb 2020 01:53:05 -0600 Subject: Re: [PATCH v2 2/3] can: m_can: m_can_platform: Add support for enabling transceiver To: Dan Murphy , , , , , CC: , , , , , , , References: <20200217142836.23702-1-faiz_abbas@ti.com> <20200217142836.23702-3-faiz_abbas@ti.com> <250f905a-33c3-dd17-15c9-e282299dd742@ti.com> From: Faiz Abbas Message-ID: <8885c00b-7b73-0448-7e9d-ecb19fe84adf@ti.com> Date: Fri, 21 Feb 2020 13:24:46 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <250f905a-33c3-dd17-15c9-e282299dd742@ti.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > Shouldn't the regulator be managed by runtime PM as well? > Let me try this out. Thanks, Faiz