Commit 9c98dcb0 authored by Jarkko Nikula's avatar Jarkko Nikula Committed by Lee Jones

mfd: intel_soc_pmic: Move PMIC interrupt comment to probe function

intel_soc_pmic_find_gpio_irq() tries to find a GPIO interrupt but doesn't
select between it or I2C interrupt so it makes more sense to move this
comment to intel_soc_pmic_i2c_probe() with minor edits.
Signed-off-by: default avatarJarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 575ef7f6
...@@ -26,11 +26,6 @@ ...@@ -26,11 +26,6 @@
#include <linux/mfd/intel_soc_pmic.h> #include <linux/mfd/intel_soc_pmic.h>
#include "intel_soc_pmic_core.h" #include "intel_soc_pmic_core.h"
/*
* On some boards the PMIC interrupt may come from a GPIO line.
* Try to lookup the ACPI table and see if such connection exists. If not,
* return -ENOENT and use the IRQ provided by I2C.
*/
static int intel_soc_pmic_find_gpio_irq(struct device *dev) static int intel_soc_pmic_find_gpio_irq(struct device *dev)
{ {
struct gpio_desc *desc; struct gpio_desc *desc;
...@@ -71,6 +66,11 @@ static int intel_soc_pmic_i2c_probe(struct i2c_client *i2c, ...@@ -71,6 +66,11 @@ static int intel_soc_pmic_i2c_probe(struct i2c_client *i2c,
pmic->regmap = devm_regmap_init_i2c(i2c, config->regmap_config); pmic->regmap = devm_regmap_init_i2c(i2c, config->regmap_config);
/*
* On some boards the PMIC interrupt may come from a GPIO line. Try to
* lookup the ACPI table for a such connection and setup a GPIO
* interrupt if it exists. Otherwise use the IRQ provided by I2C
*/
irq = intel_soc_pmic_find_gpio_irq(dev); irq = intel_soc_pmic_find_gpio_irq(dev);
pmic->irq = (irq < 0) ? i2c->irq : irq; pmic->irq = (irq < 0) ? i2c->irq : irq;
......
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