public inbox for linux-can@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/1] NET: mcan: Move runtime PM enable/disable to m_can_platform
@ 2020-10-23 11:57 Patrik Flykt
  2020-10-23 11:58 ` [PATCH v2 1/1] " Patrik Flykt
  0 siblings, 1 reply; 4+ messages in thread
From: Patrik Flykt @ 2020-10-23 11:57 UTC (permalink / raw)
  To: linux-can; +Cc: wg, mkl, dmurphy, sriram.dash, jarkko.nikula


        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.

Thanks,

        Patrik


Patrik Flykt (1):
  NET: mcan: Move runtime PM enable/disable to m_can_platform

 drivers/net/can/m_can/m_can.c          | 9 ++-------
 drivers/net/can/m_can/m_can_platform.c | 7 ++++++-
 2 files changed, 8 insertions(+), 8 deletions(-)

-- 
2.28.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-18 15:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-23 11:57 [PATCH v2 0/1] NET: mcan: Move runtime PM enable/disable to m_can_platform Patrik Flykt
2020-10-23 11:58 ` [PATCH v2 1/1] " Patrik Flykt
2020-11-17 11:36   ` Patrik Flykt
2020-11-18 15:47     ` Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox