aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorDoug Anderson <dianders@chromium.org>2014-06-20 17:42:03 -0400
committerSebastian Reichel <sre@kernel.org>2014-07-18 17:40:23 -0400
commit193dcced049ceacc0cce1a512ad8a1e1a26eedad (patch)
tree706d206f021b5c751a7c452dfdfce5bd617a7b8d /Documentation
parent661468b4e2a91516c7ac75bf466fed58ccd74b27 (diff)
charger: tps65090: Allow charger module to be used when no irq
On the ARM Chromebook tps65090 has two masters: the AP (the main processor running linux) and the EC (the embedded controller). The AP is allowed to mess with FETs but the EC is in charge of charge control. The tps65090 interupt line is routed to both the AP and the EC, which can cause quite a headache. Having two people adjusting masks and acking interrupts is a recipe for disaster. In the shipping kernel we had a hack to have the AP pay attention to the IRQ but not to ack it. It also wasn't supposed to configure the IRQ in any way. That hack allowed us to detect when the device was charging without messing with the EC's state. The current tps65090 infrastructure makes the above difficult, and it was a bit of a hack to begin with. Rather than uglify the driver to support it, just extend the driver's existing notion of "no irq" to the charger. This makes the charger code poll every 2 seconds for AC detect, which is sufficient. For proper functioning, requires (mfd: tps65090: Don't tell child devices we have an IRQ if we don't). If we don't have that patch we'll simply fail to probe on devices without an interrupt (just like we did before this patch). Signed-off-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> [sre@kernel.org: Use -ENXIO instead of NO_IRQ for missing interrupt, since NO_IRQ is not available on all architectures.] Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions