Commit 6966df48 authored by Matti Vaittinen's avatar Matti Vaittinen Committed by Mark Brown

regulator: Update protection IRQ helper docs

The documentation of IRQ notification helper had still references to
first RFC implementation which called BUG() while trying to protect the
hardware. Behaviour was improved as calling the BUG() was not a proper
solution. Current implementation attempts to call poweroff if handling
of potentially damaging error notification fails. Update the
documentation to reflect the actual behaviour.
Signed-off-by: default avatarMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Link: https://lore.kernel.org/r/0c9cc4bcf20c3da66fd5a85c97ee4288e5727538.1637233864.git.matti.vaittinen@fi.rohmeurope.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7492b724
...@@ -499,7 +499,8 @@ struct regulator_irq_data { ...@@ -499,7 +499,8 @@ struct regulator_irq_data {
* best to shut-down regulator(s) or reboot the SOC if error * best to shut-down regulator(s) or reboot the SOC if error
* handling is repeatedly failing. If fatal_cnt is given the IRQ * handling is repeatedly failing. If fatal_cnt is given the IRQ
* handling is aborted if it fails for fatal_cnt times and die() * handling is aborted if it fails for fatal_cnt times and die()
* callback (if populated) or BUG() is called to try to prevent * callback (if populated) is called. If die() is not populated
* poweroff for the system is attempted in order to prevent any
* further damage. * further damage.
* @reread_ms: The time which is waited before attempting to re-read status * @reread_ms: The time which is waited before attempting to re-read status
* at the worker if IC reading fails. Immediate re-read is done * at the worker if IC reading fails. Immediate re-read is done
...@@ -516,11 +517,12 @@ struct regulator_irq_data { ...@@ -516,11 +517,12 @@ struct regulator_irq_data {
* @data: Driver private data pointer which will be passed as such to * @data: Driver private data pointer which will be passed as such to
* the renable, map_event and die callbacks in regulator_irq_data. * the renable, map_event and die callbacks in regulator_irq_data.
* @die: Protection callback. If IC status reading or recovery actions * @die: Protection callback. If IC status reading or recovery actions
* fail fatal_cnt times this callback or BUG() is called. This * fail fatal_cnt times this callback is called or system is
* callback should implement a final protection attempt like * powered off. This callback should implement a final protection
* disabling the regulator. If protection succeeded this may * attempt like disabling the regulator. If protection succeeded
* return 0. If anything else is returned the core assumes final * die() may return 0. If anything else is returned the core
* protection failed and calls BUG() as a last resort. * assumes final protection failed and attempts to perform a
* poweroff as a last resort.
* @map_event: Driver callback to map IRQ status into regulator devices with * @map_event: Driver callback to map IRQ status into regulator devices with
* events / errors. NOTE: callback MUST initialize both the * events / errors. NOTE: callback MUST initialize both the
* errors and notifs for all rdevs which it signals having * errors and notifs for all rdevs which it signals having
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment