Dave Gerlach
04abaf07f6
ARM: OMAP2+: omap_device: Sync omap_device and pm_runtime after probe defer
...
Starting from commit 5de85b9d57
("PM / runtime: Re-init runtime PM
states at probe error and driver unbind") pm_runtime core now changes
device runtime_status back to after RPM_SUSPENDED after a probe defer.
Certain OMAP devices make use of "ti,no-idle-on-init" flag which causes
omap_device_enable to be called during the BUS_NOTIFY_ADD_DEVICE event
during probe, along with pm_runtime_set_active.
This call to pm_runtime_set_active typically will prevent a call to
pm_runtime_get in a driver probe function from re-enabling the
omap_device. However, in the case of a probe defer that happens before
the driver probe function is able to run, such as a missing pinctrl
states defer, pm_runtime_reinit will set the device as RPM_SUSPENDED and
then once driver probe is actually able to run, pm_runtime_get will see
the device as suspended and call through to the omap_device layer,
attempting to enable the already enabled omap_device and causing errors
like this:
omap-gpmc 50000000.gpmc: omap_device: omap_device_enable() called from
invalid state 1
omap-gpmc 50000000.gpmc: use pm_runtime_put_sync_suspend() in driver?
We can avoid this error by making sure the pm_runtime status of a device
matches the omap_device state before a probe attempt. By extending the
omap_device bus notifier to act on the BUS_NOTIFY_BIND_DRIVER event we
can check if a device is enabled in omap_device but with a pm_runtime
status of RPM_SUSPENDED and once again mark the device as RPM_ACTIVE to
avoid a second incorrect call to omap_device_enable.
Fixes: 5de85b9d57
("PM / runtime: Re-init runtime PM states at probe
error and driver unbind")
Tested-by: Franklin S Cooper Jr. <fcooper@ti.com >
Signed-off-by: Dave Gerlach <d-gerlach@ti.com >
Signed-off-by: Tony Lindgren <tony@atomide.com >
2017-04-04 08:49:56 -07:00
..
2015-07-25 15:28:16 +01:00
2014-10-27 08:39:26 -07:00
2013-06-12 08:00:35 -07:00
2016-12-27 09:38:04 -08:00
2016-08-26 08:42:35 -07:00
2012-11-12 19:18:51 -07:00
2014-05-08 07:09:53 -07:00
2015-05-06 11:58:58 +01:00
2015-01-07 10:54:40 -08:00
2014-01-17 12:35:48 -08:00
2017-01-24 07:20:02 -08:00
2017-01-24 07:20:02 -08:00
2016-07-04 07:15:38 -07:00
2016-07-04 07:15:38 -07:00
2014-03-12 09:48:26 -07:00
2016-11-09 15:35:46 -07:00
2012-06-18 12:08:06 -06:00
2013-10-13 22:48:36 -06:00
2013-06-08 11:56:15 -06:00
2015-12-22 16:23:08 -08:00
2012-10-18 16:23:46 -07:00
2014-10-27 08:39:25 -07:00
2014-10-27 08:39:25 -07:00
2014-10-27 08:39:25 -07:00
2014-10-27 08:39:25 -07:00
2014-10-27 08:39:25 -07:00
2014-10-27 08:39:25 -07:00
2014-05-08 07:09:53 -07:00
2015-03-31 21:26:50 +03:00
2015-03-31 21:26:50 +03:00
2016-06-10 04:14:37 -07:00
2015-03-31 21:26:50 +03:00
2016-07-22 23:10:57 -07:00
2015-03-31 21:26:50 +03:00
2015-03-31 21:26:50 +03:00
2015-12-22 16:23:08 -08:00
2015-03-31 21:26:55 +03:00
2013-08-23 04:28:36 -06:00
2014-07-02 14:26:06 +03:00
2013-07-21 22:10:03 -06:00
2014-07-06 15:51:23 -06:00
2013-07-21 22:10:14 -06:00
2013-07-21 22:10:25 -06:00
2015-03-27 10:55:57 +02:00
2016-07-22 23:10:57 -07:00
2016-11-10 15:46:13 -07:00
2015-07-25 15:28:14 +01:00
2017-03-27 10:10:42 -07:00
2017-02-28 11:06:10 +00:00
2015-05-20 09:23:43 -07:00
2016-02-19 10:35:39 -08:00
2016-11-07 16:52:14 -07:00
2016-11-10 12:42:38 -07:00
2017-01-05 08:58:37 -08:00
2017-01-05 08:58:37 -08:00
2016-02-22 10:00:50 -08:00
2016-08-26 08:42:35 -07:00
2016-08-26 08:42:35 -07:00
2017-02-28 09:06:23 -08:00
2014-11-20 12:11:25 -08:00
2014-09-18 09:53:57 -07:00
2016-11-10 12:42:49 -07:00
2016-08-26 08:42:35 -07:00
2016-11-10 08:53:30 -07:00
2012-10-31 15:37:13 -07:00
2017-01-20 10:13:06 -08:00
2016-11-18 16:49:23 -08:00
2015-07-16 00:06:05 -07:00
2016-11-07 16:20:04 -07:00
2017-02-28 09:08:33 -08:00
2016-06-10 05:07:25 -07:00
2014-11-26 14:30:53 +01:00
2016-11-10 12:42:49 -07:00
2015-12-03 11:38:09 -08:00
2015-07-15 23:43:41 -06:00
2016-06-22 22:55:47 -07:00
2015-07-15 23:43:41 -06:00
2016-11-07 16:51:58 -07:00
2015-04-02 16:45:07 -03:00
2015-07-16 00:06:05 -07:00
2017-04-04 08:49:56 -07:00
2013-12-10 09:39:52 -08:00
2016-11-10 14:03:19 -07:00
2016-11-10 14:03:19 -07:00
2016-11-10 14:03:19 -07:00
2016-11-10 14:03:19 -07:00
2017-03-04 08:27:50 -08:00
2016-11-09 15:59:18 -07:00
2016-11-09 15:39:41 -07:00
2016-11-09 15:39:41 -07:00
2016-11-09 15:39:41 -07:00
2016-11-09 15:39:41 -07:00
2016-11-09 15:39:41 -07:00
2015-11-30 13:18:37 -08:00
2017-01-20 10:08:57 -08:00
2016-06-22 03:05:18 -07:00
2014-07-15 05:08:56 -07:00
2014-11-26 14:30:53 +01:00
2016-11-23 08:22:10 -08:00
2014-07-05 17:44:57 -06:00
2016-04-10 13:20:10 -06:00
2017-01-29 17:15:36 -08:00
2016-07-22 23:08:58 -07:00
2012-11-13 13:25:38 -08:00
2015-01-14 17:21:00 -08:00
2017-02-27 18:43:47 -08:00
2017-02-16 13:12:15 -08:00
2017-03-27 10:10:42 -07:00
2017-03-27 10:10:42 -07:00
2015-01-07 09:53:51 -08:00
2015-01-07 09:53:51 -08:00
2013-10-08 12:02:12 -07:00
2016-05-12 10:14:54 -07:00
2017-03-27 10:10:42 -07:00
2017-03-27 10:10:42 -07:00
2016-09-19 21:44:26 +02:00
2015-03-15 00:56:13 +00:00
2013-01-11 11:24:18 -08:00
2012-09-12 18:06:31 -07:00
2015-05-14 16:22:05 +01:00
2013-11-14 13:41:48 +09:00
2017-02-23 15:28:04 -08:00
2015-07-20 10:52:36 -07:00
2016-04-14 08:27:30 -07:00
2016-11-07 16:52:14 -07:00
2017-03-02 08:42:27 +01:00
2017-01-30 09:22:21 +01:00
2015-09-14 12:14:47 -07:00
2015-05-20 10:43:37 -07:00
2014-05-15 22:35:10 -06:00
2016-08-01 18:27:08 -04:00
2015-01-07 09:53:51 -08:00
2015-12-22 16:23:08 -08:00
2016-06-13 01:04:01 -07:00
2012-06-18 12:08:06 -06:00
2013-10-13 22:48:25 -06:00
2011-09-15 11:39:10 -07:00
2014-09-08 11:22:40 -05:00
2016-11-09 15:39:41 -07:00
2013-08-23 04:28:36 -06:00
2013-08-23 04:28:36 -06:00
2014-05-08 07:09:53 -07:00
2014-05-15 22:34:48 -06:00
2013-06-08 11:55:18 -06:00
2015-07-23 21:59:18 -07:00
2014-10-27 08:39:25 -07:00
2014-10-27 08:39:25 -07:00
2015-03-31 21:26:36 +03:00
2015-03-31 21:26:36 +03:00
2016-11-07 16:21:53 -07:00
2015-03-31 21:26:36 +03:00
2016-02-09 02:18:52 -07:00
2015-03-31 21:26:36 +03:00
2016-06-22 03:33:25 -07:00
2015-03-31 21:26:36 +03:00
2015-07-23 06:08:24 -06:00
2015-03-31 21:26:36 +03:00
2015-03-31 21:26:36 +03:00
2016-12-27 10:06:00 -08:00
2013-07-21 21:13:59 -06:00
2013-08-29 19:10:59 -07:00
2015-05-04 08:54:41 -07:00
2015-05-04 08:54:41 -07:00
2015-03-31 21:26:53 +03:00
2015-05-08 13:05:15 -06:00
2015-03-31 21:26:44 +03:00
2015-05-14 16:22:05 +01:00
2012-11-15 17:08:51 +01:00
2016-06-10 04:17:07 -07:00
2012-10-31 15:37:14 -07:00
2016-01-22 08:26:08 -08:00
2016-01-22 08:26:08 -08:00
2014-09-18 09:53:57 -07:00
2016-05-18 12:35:46 -07:00
2014-09-18 09:53:57 -07:00
2015-05-14 16:22:05 +01:00
2015-05-14 16:22:05 +01:00
2015-10-14 12:35:27 -07:00
2015-10-14 12:35:27 -07:00
2015-01-14 17:37:16 -08:00
2012-11-08 12:33:07 -07:00
2016-12-27 09:38:04 -08:00
2016-11-10 12:42:15 -07:00
2015-01-14 17:21:00 -08:00
2015-05-04 08:54:41 -07:00
2015-05-04 08:54:41 -07:00
2015-10-12 10:56:36 -07:00
2015-05-04 08:54:41 -07:00
2016-11-07 16:24:53 -07:00
2015-01-07 09:53:51 -08:00
2015-07-28 13:55:27 +02:00
2015-07-28 13:55:27 +02:00
2015-07-28 13:55:27 +02:00
2015-03-25 11:03:39 +02:00
2015-03-25 11:03:39 +02:00
2015-03-25 11:03:39 +02:00
2014-09-18 09:53:57 -07:00
2012-10-18 16:05:55 -07:00