Message ID | 20241015-topic-mcan-wakeup-source-v6-12-v4-6-fdac1d1e7aa6@baylibre.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8D939D1F9C5 for <linux-arm-kernel@archiver.kernel.org>; Tue, 15 Oct 2024 19:23:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=sjKPLiEdokQkg97Y4Rb67l893kRgrHE7+ULSYL6zJKs=; b=oooyv5mMdbCyzcfuoxBO2LPQFj T1wvqGBC9goueISby0kfaddELV5LhZjIR8zGYFCWhhKSLnUTyhK1O8svC+Fcc446faCM0C8pLyyqn kiqICYyg5ai16v27HRl0zh5x+gtSABFl4EzZjYlMrSVPjcc4HS83yvSgNYVKeYoy/l0pZWKRIGK03 WKqP9SEry6ABg7kfOZAtSHqnm+5Sk9LIZxd7ufgmb8aiqgerTssRpYaVrG3I0Vr9/jPxD6smyx7tD cvD390oKs6UUpOpjbTvXLDaE8l0NgT/0VapCCMl1MbtbsYVyNHKe0s2ni3lS0/SCvwrm1IiyJe6SC CGxE4b8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t0n8D-00000009Nc3-2NUy; Tue, 15 Oct 2024 19:22:57 +0000 Received: from mail-lj1-f170.google.com ([209.85.208.170]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t0n2l-00000009MTd-199W for linux-arm-kernel@lists.infradead.org; Tue, 15 Oct 2024 19:17:20 +0000 Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2fb5a9c7420so13788931fa.3 for <linux-arm-kernel@lists.infradead.org>; Tue, 15 Oct 2024 12:17:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1729019837; x=1729624637; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=sjKPLiEdokQkg97Y4Rb67l893kRgrHE7+ULSYL6zJKs=; b=HNCmWU2IkT1n0tCT1T4oT5G/Lbgi3rARcToeJ+SHHm0ci60hOVkXG2KJy2W+NMlzwr bJ5TcFVrA/trEvEumG8n7mU52QGGWKsYSJOJBf8o066X3qVyG100ijANByagdTH6CrMK wBvpBZWReymjzTOTmou46uQjkMoJvtyQNKUGnxQjUqL11idZ6PtELZ+JjIBcj0VBTGCf rfENche8y6jfRsqq099FaOpk84esnE3VuxX44cvstNIBe5qyIGew80i8TsZTG73JD8AR RSkGdlKRwz3GREQWIdV3/+WxtRXEfZAgC11Bll1xlEfwFr8R9ROXAxcTmk2PC30Zui3y 2ymw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729019837; x=1729624637; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sjKPLiEdokQkg97Y4Rb67l893kRgrHE7+ULSYL6zJKs=; b=cQS5UL1qy6w+5QMsEWE2TZ9fJFrzsRrQSmyl/QO2/usMKYeTe68VEvXiMDnpE2qsJc LvaPA/pkE0D+d2Xk1MYLu9Xn0/3D7NnYhJLA9009o2WN/B9uemqMj+wVkbq69LrizciT qCqXwOpEhfY/wsyBdILtjIX9W1CYPaCImyHgS1iQuubFS34KFro6vSblT/YQhSUcOnQf hsOqw0ATsZBy5cHMuivAASuqMQzaImdyTUoiWZZUstpIpty/CatdR5Qs9bDGH/D1pPPv ecQhn7CD0LBnPaLCavsmBaK3h6rqtLRCPBw14X0ukOIvlU+qzfUeWCSy5sBL4or0gzaG LptQ== X-Forwarded-Encrypted: i=1; AJvYcCUP1d3z0K/Kz16nug7GpZxspHlxcp7FdX7v+CoPg3rAp8uJ/X8MwwVEjtbeb729URFrktM5mvVvB7QUoM+ikSKg@lists.infradead.org X-Gm-Message-State: AOJu0Yy9Smz8noSlfWiWZ8/zTX3Mfq4KEvlHezxBYS8BDhnAZ2txkQdb e1+JVjY12yCsl/Luhi6+Tpay3A0sfr/Gvc2SfAFSo+Hrr81/b7oyYuUggwEFSbA= X-Google-Smtp-Source: AGHT+IE4dzRsD/tCQ28U43nJXbo8BVQgpvc+e/8APYlr/mwBjZLsFjDakC3/JIU6v1rQg0lg4s5rnQ== X-Received: by 2002:a2e:b8ce:0:b0:2fb:c20:dbc3 with SMTP id 38308e7fff4ca-2fb3f2edde8mr59233971fa.39.1729019836565; Tue, 15 Oct 2024 12:17:16 -0700 (PDT) Received: from localhost ([2001:4090:a244:83ae:2517:2666:43c9:d0d3]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c98d779975sm971515a12.67.2024.10.15.12.17.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2024 12:17:16 -0700 (PDT) From: Markus Schneider-Pargmann <msp@baylibre.com> Date: Tue, 15 Oct 2024 21:16:00 +0200 Subject: [PATCH v4 6/9] can: m_can: Add use of optional regulator MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20241015-topic-mcan-wakeup-source-v6-12-v4-6-fdac1d1e7aa6@baylibre.com> References: <20241015-topic-mcan-wakeup-source-v6-12-v4-0-fdac1d1e7aa6@baylibre.com> In-Reply-To: <20241015-topic-mcan-wakeup-source-v6-12-v4-0-fdac1d1e7aa6@baylibre.com> To: Chandrasekar Ramakrishnan <rcsekar@samsung.com>, Marc Kleine-Budde <mkl@pengutronix.de>, Vincent Mailhol <mailhol.vincent@wanadoo.fr>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>, Conor Dooley <conor+dt@kernel.org>, Nishanth Menon <nm@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>, Tero Kristo <kristo@kernel.org> Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Matthias Schiffer <matthias.schiffer@ew.tq-group.com>, Vishal Mahaveer <vishalm@ti.com>, Kevin Hilman <khilman@baylibre.com>, Dhruva Gole <d-gole@ti.com>, Simon Horman <horms@kernel.org>, Vincent MAILHOL <mailhol.vincent@wanadoo.fr>, Markus Schneider-Pargmann <msp@baylibre.com> X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1254; i=msp@baylibre.com; h=from:subject:message-id; bh=aipUUq+7RrB1fQczjwGFQJsXFUnND3UwiWP5TZKO64w=; b=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNL59s/XqnFdKfDRbN+T+WsKHVybDbOyYt1kjex0p2ZPP 8fbcdSko5SFQYyDQVZMkeXuh4Xv6uSuL4hY98gRZg4rE8gQBi5OAZiI3W1GhjWPb03bLCHc+rVj 3ZH/zMcOcPNpBHzacP4tp8yJfSt1F2xnZHj2dff7aQv9JK24TzXfzy/8Wc/B2PdyzTW3nvPTvY3 Cm7gA X-Developer-Key: i=msp@baylibre.com; a=openpgp; fpr=BADD88DB889FDC3E8A3D5FE612FA6A01E0A45B41 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241015_121719_348773_B32037C8 X-CRM114-Status: GOOD ( 12.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
can: m_can: Add am62 wakeup support
|
expand
|
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index c539375005f71c88fd1f7d1a885ce890ce0e9327..274fdcae49c31d4792b81cdc065821206d3cb206 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -23,6 +23,7 @@ #include <linux/pinctrl/consumer.h> #include <linux/platform_device.h> #include <linux/pm_runtime.h> +#include <linux/regulator/consumer.h> #include "m_can.h" @@ -2421,6 +2422,11 @@ struct m_can_classdev *m_can_class_allocate_dev(struct device *dev, if (dev->of_node && of_property_read_bool(dev->of_node, "wakeup-source")) device_set_wakeup_capable(dev, true); + ret = devm_regulator_get_enable_optional(dev, "vio"); + if (ret) + return ERR_PTR( + dev_err_probe(dev, ret, "Failed to get or enable optional regulator\n")); + /* Get TX FIFO size * Defines the total amount of echo buffers for loopback */