thermal: Add QPNP PMIC temperature alarm driver

Add support for the temperature alarm peripheral found inside
Qualcomm plug-and-play (QPNP) PMIC chips.  The temperature alarm
peripheral outputs a pulse on an interrupt line whenever the
thermal over temperature stage value changes.  Implement an ISR
to manage this interrupt.

Register a thermal zone device in sysfs with mulitple trip points
corresponding to the physical threshold temperatures between over
temperature stages.  The temperature reported by this thermal
zone device should reflect the actual PMIC die temperature if an
ADC is present on the given PMIC.  If no ADC is present, then the
reported temperature should be estimated from the over
temperature stage value.

Send a notification to userspace via sysfs_notify() whenever the
over temperature stage value changes.

Change-Id: Icce6f3668befd9455270d7a8e553e76501d9bd74
Signed-off-by: David Collins <collinsd@codeaurora.org>
4 files changed