From: Patrik Flykt <patrik.flykt@linux.intel.com>
To: linux-can@vger.kernel.org
Cc: wg@grandegger.com, mkl@pengutronix.de, dmurphy@ti.com,
sriram.dash@samsung.com, jarkko.nikula@intel.com
Subject: [PATCH 0/1] NET: mcan: Move runtime PM enable/disable to m_can_platform
Date: Tue, 25 Aug 2020 13:17:35 +0300 [thread overview]
Message-ID: <20200825101736.158578-1-patrik.flykt@linux.intel.com> (raw)
Hi,
This is a preparatory patch for modifying PM enabling due to PCI based
M_CAN devices. As the functionality is right now, adding a PCI based
M_CAN driver causes the core PCI functionality to call
pm_runtime_enable() from pci_pm_init() when the PCI device is added.
When the device is added, it is registered with m_can_class_register(),
which ends up calling pm_runtime_enable() once more and causes the
kernel to log an angry 'Unbalanced pm_runtime_enable!' message, as
dev->power.disable_depth has gone down to zero.
To resolve this situation, I have added a patch that moves runtime PM
enabling from m_can.c to the m_can_platform.c driver, which currently
is the only driver that ends up enabling runtime PM. Would this
approach be appropriate, or should PM be enabled in some other way
with PCI based M_CAN devices?
Now, the actual sticky point is that there aren't yet any PCI based
M_CAN devices upstream, but one is in the works. So if the change
proposed works out, should this patch actually be sent in the patch
set providing a PCI based M_CAN device?
Thanks,
Patrik
Patrik Flykt (1):
NET: mcan: Move runtime PM enable/disable to m_can_platform
drivers/net/can/m_can/m_can.c | 6 +-----
drivers/net/can/m_can/m_can_platform.c | 3 +++
2 files changed, 4 insertions(+), 5 deletions(-)
--
2.27.0
next reply other threads:[~2020-08-25 10:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-25 10:17 Patrik Flykt [this message]
2020-08-25 10:17 ` [PATCH 1/1] NET: mcan: Move runtime PM enable/disable to m_can_platform Patrik Flykt
2020-09-01 18:22 ` Dan Murphy
2020-10-19 15:01 ` Patrik Flykt
2020-10-19 15:47 ` Marc Kleine-Budde
2020-10-23 11:58 ` Patrik Flykt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200825101736.158578-1-patrik.flykt@linux.intel.com \
--to=patrik.flykt@linux.intel.com \
--cc=dmurphy@ti.com \
--cc=jarkko.nikula@intel.com \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=sriram.dash@samsung.com \
--cc=wg@grandegger.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox