aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/siox
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2019-12-16 16:40:48 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-14 21:46:48 +0100
commit27d13da8782aa2c59a3c71c1c31e65c9af72b7fb (patch)
tree81a00a2cc98e0b4051228d36c27d69ddda26c3ea /drivers/siox
parentfirmware: stratix10-svc: Remove unneeded semicolon (diff)
downloadlinux-dev-27d13da8782aa2c59a3c71c1c31e65c9af72b7fb.tar.xz
linux-dev-27d13da8782aa2c59a3c71c1c31e65c9af72b7fb.zip
w1: omap-hdq: Simplify driver with PM runtime autosuspend
We've had generic code handling module sysconfig and OCP reset registers for omap variants for many years now and all the drivers really needs to do is just call runtime PM functions. Looks like the omap-hdq driver got only partially updated over the years to use runtime PM, and still has lots of custom PM code left. We can replace all the custom code for sysconfig, OCP reset, and PM with just a few lines of runtime PM autosuspend code. In order to set the device mode properly when pm_runtime_get_sync() is called during probe, we need to also move parsing of "ti,mode" to happen earlier before we call pm_runtime_enable(). Since we now disable interrupts lazily in omap_hdq_runtime_suspend(), we must remove the call to hdq_disable_interrupt() in omap_w1_read_byte(). And we must clear irqstatus calling wait_event_timeout() on it, so let's add hdq_reset_irqstatus() for that. Note that the earlier driver specific usage count limit of four seems completely artificial and should not be an issue in normal use. Cc: Adam Ford <aford173@gmail.com> Cc: Andrew F. Davis <afd@ti.com> Cc: Andreas Kemnade <andreas@kemnade.info> Cc: H. Nikolaus Schaller <hns@goldelico.com> Cc: Vignesh R <vigneshr@ti.com> Tested-by: Andreas Kemnade <andreas@kemnade.info> # gta04 Tested-by: Adam Ford <aford173@gmail.com> #logicpd-torpedo-37xx-devkit Signed-off-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20191217004048.46298-1-tony@atomide.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/siox')
0 files changed, 0 insertions, 0 deletions