* [PATCH v9 0/4] power: act8945a_charger: Improvements
@ 2016-09-01 9:29 ` Wenyou Yang
0 siblings, 0 replies; 29+ messages in thread
From: Wenyou Yang @ 2016-09-01 9:29 UTC (permalink / raw)
To: Sebastian Reichel, Dmitry Eremin-Solenikov, David Woodhouse,
Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Lee Jones, Nicolas Ferre, Alexandre Belloni
Cc: linux-kernel, Wenyou Yang, devicetree, linux-arm-kernel,
linux-pm, Wenyou Yang
This patch series is to improve the implementation of act8945a-charger
driver, such as regard the act8945-charger as a sub-device, improve
the way to check the status, fix the power supply type property,
add the status change update, and add more properties: capacity level
property and max current property.
Changes in v9:
- For "lbo-gpios", use devm_gpiod_get_optional(), instead of
devm_gpiod_get(), for simpler and more reasonable.
- Remove unnecessary GPIOLIB dependency.
- For "chglev-gpios", use devm_gpiod_get_optional(), instead of
devm_gpiod_get(), for simper and more reasonable.
- Not include seven patches which have been queued or applied.
Changes in v8:
- As the act8945a_charger is regarded as a sub-device, all
properties can be achieved from its own device node,
use devm_gpiod_get() properly as well to get "lbo-gpios".
- Add missing return -EPROBE_DEFER for "lbo-gpios".
- As the act8945a_charger is regarded as a sub-device, all
properties can be achieved from its own device node,
use devm_gpiod_get() properly as well to get "chglev-gpios".
- Add missing return -EPROBE_DEFER for "chglev-gpios".
- Add 4 new patches: 1/11, 2/11, 9/11, and 11/11.
Changes in v7:
- For "lbo-gpios", use gpiod_get() to fix devm_gpiod_get() wrong use
with parent device as *dev argument.
- Add the handle -EPROBE_DEFER returned from gpiod_get "lbo-gpios".
- Use dev_info() to print log if the lbo irq request failed.
- Remove unneeded semicolon.
- Add depends on GPIOLIB for use gpiod.
- For "chglev-gpios", use gpiod_get() to fix devm_gpiod_get() wrong use
with parent device as *dev argument.
- Add the handle -EPROBE_DEFER returned from gpiod_get "chglev-gpio".
- Remove unneeded semicolon.
Changes in v6:
- For "lbo-gpios", use gpiod API instead of old gpio API to handle.
- For "chglev-gpios", use gpiod API instead of old gpio API to handle.
Changes in v4:
- Change devname of devm_request_irq() from "lbo-detect" to
"act8945a, lbo-detect".
- Fix wrong gpio assignment for chglev_pin.
Wenyou Yang (4):
power: act8945a_charger: Add capacity level property
power: act8945a_charger: Add max current property
doc: bindings: mfd: act8945a: Update the example
ARM: at91/dt: sama5d2_xplained: Add act8945a-charger node.
Documentation/devicetree/bindings/mfd/act8945a.txt | 22 ++-
arch/arm/boot/dts/at91-sama5d2_xplained.dts | 23 ++-
drivers/power/supply/act8945a_charger.c | 166 +++++++++++++++++++--
3 files changed, 187 insertions(+), 24 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH v9 0/4] power: act8945a_charger: Improvements
@ 2016-09-01 9:29 ` Wenyou Yang
0 siblings, 0 replies; 29+ messages in thread
From: Wenyou Yang @ 2016-09-01 9:29 UTC (permalink / raw)
To: Sebastian Reichel, Dmitry Eremin-Solenikov, David Woodhouse,
Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Lee Jones, Nicolas Ferre, Alexandre Belloni
Cc: linux-kernel, Wenyou Yang, devicetree, linux-arm-kernel,
linux-pm, Wenyou Yang
This patch series is to improve the implementation of act8945a-charger
driver, such as regard the act8945-charger as a sub-device, improve
the way to check the status, fix the power supply type property,
add the status change update, and add more properties: capacity level
property and max current property.
Changes in v9:
- For "lbo-gpios", use devm_gpiod_get_optional(), instead of
devm_gpiod_get(), for simpler and more reasonable.
- Remove unnecessary GPIOLIB dependency.
- For "chglev-gpios", use devm_gpiod_get_optional(), instead of
devm_gpiod_get(), for simper and more reasonable.
- Not include seven patches which have been queued or applied.
Changes in v8:
- As the act8945a_charger is regarded as a sub-device, all
properties can be achieved from its own device node,
use devm_gpiod_get() properly as well to get "lbo-gpios".
- Add missing return -EPROBE_DEFER for "lbo-gpios".
- As the act8945a_charger is regarded as a sub-device, all
properties can be achieved from its own device node,
use devm_gpiod_get() properly as well to get "chglev-gpios".
- Add missing return -EPROBE_DEFER for "chglev-gpios".
- Add 4 new patches: 1/11, 2/11, 9/11, and 11/11.
Changes in v7:
- For "lbo-gpios", use gpiod_get() to fix devm_gpiod_get() wrong use
with parent device as *dev argument.
- Add the handle -EPROBE_DEFER returned from gpiod_get "lbo-gpios".
- Use dev_info() to print log if the lbo irq request failed.
- Remove unneeded semicolon.
- Add depends on GPIOLIB for use gpiod.
- For "chglev-gpios", use gpiod_get() to fix devm_gpiod_get() wrong use
with parent device as *dev argument.
- Add the handle -EPROBE_DEFER returned from gpiod_get "chglev-gpio".
- Remove unneeded semicolon.
Changes in v6:
- For "lbo-gpios", use gpiod API instead of old gpio API to handle.
- For "chglev-gpios", use gpiod API instead of old gpio API to handle.
Changes in v4:
- Change devname of devm_request_irq() from "lbo-detect" to
"act8945a, lbo-detect".
- Fix wrong gpio assignment for chglev_pin.
Wenyou Yang (4):
power: act8945a_charger: Add capacity level property
power: act8945a_charger: Add max current property
doc: bindings: mfd: act8945a: Update the example
ARM: at91/dt: sama5d2_xplained: Add act8945a-charger node.
Documentation/devicetree/bindings/mfd/act8945a.txt | 22 ++-
arch/arm/boot/dts/at91-sama5d2_xplained.dts | 23 ++-
drivers/power/supply/act8945a_charger.c | 166 +++++++++++++++++++--
3 files changed, 187 insertions(+), 24 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH v9 0/4] power: act8945a_charger: Improvements
@ 2016-09-01 9:29 ` Wenyou Yang
0 siblings, 0 replies; 29+ messages in thread
From: Wenyou Yang @ 2016-09-01 9:29 UTC (permalink / raw)
To: linux-arm-kernel
This patch series is to improve the implementation of act8945a-charger
driver, such as regard the act8945-charger as a sub-device, improve
the way to check the status, fix the power supply type property,
add the status change update, and add more properties: capacity level
property and max current property.
Changes in v9:
- For "lbo-gpios", use devm_gpiod_get_optional(), instead of
devm_gpiod_get(), for simpler and more reasonable.
- Remove unnecessary GPIOLIB dependency.
- For "chglev-gpios", use devm_gpiod_get_optional(), instead of
devm_gpiod_get(), for simper and more reasonable.
- Not include seven patches which have been queued or applied.
Changes in v8:
- As the act8945a_charger is regarded as a sub-device, all
properties can be achieved from its own device node,
use devm_gpiod_get() properly as well to get "lbo-gpios".
- Add missing return -EPROBE_DEFER for "lbo-gpios".
- As the act8945a_charger is regarded as a sub-device, all
properties can be achieved from its own device node,
use devm_gpiod_get() properly as well to get "chglev-gpios".
- Add missing return -EPROBE_DEFER for "chglev-gpios".
- Add 4 new patches: 1/11, 2/11, 9/11, and 11/11.
Changes in v7:
- For "lbo-gpios", use gpiod_get() to fix devm_gpiod_get() wrong use
with parent device as *dev argument.
- Add the handle -EPROBE_DEFER returned from gpiod_get "lbo-gpios".
- Use dev_info() to print log if the lbo irq request failed.
- Remove unneeded semicolon.
- Add depends on GPIOLIB for use gpiod.
- For "chglev-gpios", use gpiod_get() to fix devm_gpiod_get() wrong use
with parent device as *dev argument.
- Add the handle -EPROBE_DEFER returned from gpiod_get "chglev-gpio".
- Remove unneeded semicolon.
Changes in v6:
- For "lbo-gpios", use gpiod API instead of old gpio API to handle.
- For "chglev-gpios", use gpiod API instead of old gpio API to handle.
Changes in v4:
- Change devname of devm_request_irq() from "lbo-detect" to
"act8945a, lbo-detect".
- Fix wrong gpio assignment for chglev_pin.
Wenyou Yang (4):
power: act8945a_charger: Add capacity level property
power: act8945a_charger: Add max current property
doc: bindings: mfd: act8945a: Update the example
ARM: at91/dt: sama5d2_xplained: Add act8945a-charger node.
Documentation/devicetree/bindings/mfd/act8945a.txt | 22 ++-
arch/arm/boot/dts/at91-sama5d2_xplained.dts | 23 ++-
drivers/power/supply/act8945a_charger.c | 166 +++++++++++++++++++--
3 files changed, 187 insertions(+), 24 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH v9 1/4] power: act8945a_charger: Add capacity level property
2016-09-01 9:29 ` Wenyou Yang
(?)
@ 2016-09-01 9:29 ` Wenyou Yang
-1 siblings, 0 replies; 29+ messages in thread
From: Wenyou Yang @ 2016-09-01 9:29 UTC (permalink / raw)
To: Sebastian Reichel, Dmitry Eremin-Solenikov, David Woodhouse,
Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Lee Jones, Nicolas Ferre, Alexandre Belloni
Cc: linux-kernel, Wenyou Yang, devicetree, linux-arm-kernel,
linux-pm, Wenyou Yang
Add the power supply capacity level property, it corresponds to
POWER_SUPPLY_CAPACITY_LEVEL_*.
It also utilizes the precision voltage detector function module
to catch the low battery voltage.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
Changes in v9:
- For "lbo-gpios", use devm_gpiod_get_optional(), instead of
devm_gpiod_get(), for simpler and more reasonable.
- Remove unnecessary GPIOLIB dependency.
Changes in v8:
- As the act8945a_charger is regarded as a sub-device, all
properties can be achieved from its own device node,
use devm_gpiod_get() properly as well to get "lbo-gpios".
- Add missing return -EPROBE_DEFER for "lbo-gpios".
Changes in v7:
- For "lbo-gpios", use gpiod_get() to fix devm_gpiod_get() wrong use
with parent device as *dev argument.
- Add the handle -EPROBE_DEFER returned from gpiod_get "lbo-gpios".
- Use dev_info() to print log if the lbo irq request failed.
- Remove unneeded semicolon.
- Add depends on GPIOLIB for use gpiod.
Changes in v6:
- For "lbo-gpios", use gpiod API instead of old gpio API to handle.
Changes in v4:
- Change devname of devm_request_irq() from "lbo-detect" to
"act8945a, lbo-detect".
drivers/power/supply/act8945a_charger.c | 79 ++++++++++++++++++++++++++++++++-
1 file changed, 78 insertions(+), 1 deletion(-)
diff --git a/drivers/power/supply/act8945a_charger.c b/drivers/power/supply/act8945a_charger.c
index 48775f8..2f87599 100644
--- a/drivers/power/supply/act8945a_charger.c
+++ b/drivers/power/supply/act8945a_charger.c
@@ -18,6 +18,7 @@
#include <linux/platform_device.h>
#include <linux/power_supply.h>
#include <linux/regmap.h>
+#include <linux/gpio/consumer.h>
static const char *act8945a_charger_model = "ACT8945A";
static const char *act8945a_charger_manufacturer = "Active-semi";
@@ -83,6 +84,7 @@ struct act8945a_charger {
struct work_struct work;
bool init_done;
+ struct gpio_desc *lbo_gpio;
};
static int act8945a_get_charger_state(struct regmap *regmap, int *val)
@@ -208,11 +210,67 @@ static int act8945a_get_battery_health(struct regmap *regmap, int *val)
return 0;
}
+static int act8945a_get_capacity_level(struct act8945a_charger *charger,
+ struct regmap *regmap, int *val)
+{
+ int ret;
+ unsigned int status, state, config;
+ int lbo_level = gpiod_get_value(charger->lbo_gpio);
+
+ ret = regmap_read(regmap, ACT8945A_APCH_STATUS, &status);
+ if (ret < 0)
+ return ret;
+
+ ret = regmap_read(regmap, ACT8945A_APCH_CFG, &config);
+ if (ret < 0)
+ return ret;
+
+ ret = regmap_read(regmap, ACT8945A_APCH_STATE, &state);
+ if (ret < 0)
+ return ret;
+
+ state &= APCH_STATE_CSTATE;
+ state >>= APCH_STATE_CSTATE_SHIFT;
+
+ switch (state) {
+ case APCH_STATE_CSTATE_PRE:
+ *val = POWER_SUPPLY_CAPACITY_LEVEL_LOW;
+ break;
+ case APCH_STATE_CSTATE_FAST:
+ if (lbo_level)
+ *val = POWER_SUPPLY_CAPACITY_LEVEL_HIGH;
+ else
+ *val = POWER_SUPPLY_CAPACITY_LEVEL_LOW;
+ break;
+ case APCH_STATE_CSTATE_EOC:
+ if (status & APCH_STATUS_CHGDAT)
+ *val = POWER_SUPPLY_CAPACITY_LEVEL_FULL;
+ else
+ *val = POWER_SUPPLY_CAPACITY_LEVEL_NORMAL;
+ break;
+ case APCH_STATE_CSTATE_DISABLED:
+ default:
+ if (config & APCH_CFG_SUSCHG) {
+ *val = POWER_SUPPLY_CAPACITY_LEVEL_UNKNOWN;
+ } else {
+ *val = POWER_SUPPLY_CAPACITY_LEVEL_NORMAL;
+ if (!(status & APCH_STATUS_INDAT)) {
+ if (!lbo_level)
+ *val = POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL;
+ }
+ }
+ break;
+ }
+
+ return 0;
+}
+
static enum power_supply_property act8945a_charger_props[] = {
POWER_SUPPLY_PROP_STATUS,
POWER_SUPPLY_PROP_CHARGE_TYPE,
POWER_SUPPLY_PROP_TECHNOLOGY,
POWER_SUPPLY_PROP_HEALTH,
+ POWER_SUPPLY_PROP_CAPACITY_LEVEL,
POWER_SUPPLY_PROP_MODEL_NAME,
POWER_SUPPLY_PROP_MANUFACTURER
};
@@ -238,6 +296,10 @@ static int act8945a_charger_get_property(struct power_supply *psy,
case POWER_SUPPLY_PROP_HEALTH:
ret = act8945a_get_battery_health(regmap, &val->intval);
break;
+ case POWER_SUPPLY_PROP_CAPACITY_LEVEL:
+ ret = act8945a_get_capacity_level(charger,
+ regmap, &val->intval);
+ break;
case POWER_SUPPLY_PROP_MODEL_NAME:
val->strval = act8945a_charger_model;
break;
@@ -335,7 +397,7 @@ static int act8945a_charger_config(struct device *dev,
u32 pre_time_out;
u32 input_voltage_threshold;
int chglev_pin;
- int ret;
+ int err, ret;
unsigned int tmp;
unsigned int value = 0;
@@ -354,6 +416,21 @@ static int act8945a_charger_config(struct device *dev,
dev_info(dev, "have been suspended\n");
}
+ charger->lbo_gpio = devm_gpiod_get_optional(dev, "active-semi,lbo",
+ GPIOD_IN);
+ if (IS_ERR(charger->lbo_gpio)) {
+ err = PTR_ERR(charger->lbo_gpio);
+ dev_err(dev, "unable to claim gpio \"lbo\": %d\n", err);
+ return err;
+ }
+
+ ret = devm_request_irq(dev, gpiod_to_irq(charger->lbo_gpio),
+ act8945a_status_changed,
+ (IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING),
+ "act8945a_lbo_detect", charger);
+ if (ret)
+ dev_info(dev, "failed to request gpio \"lbo\" IRQ\n");
+
chglev_pin = of_get_named_gpio_flags(np,
"active-semi,chglev-gpios", 0, &flags);
--
2.7.4
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH v9 1/4] power: act8945a_charger: Add capacity level property
@ 2016-09-01 9:29 ` Wenyou Yang
0 siblings, 0 replies; 29+ messages in thread
From: Wenyou Yang @ 2016-09-01 9:29 UTC (permalink / raw)
To: Sebastian Reichel, Dmitry Eremin-Solenikov, David Woodhouse,
Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Lee Jones, Nicolas Ferre, Alexandre Belloni
Cc: linux-kernel, Wenyou Yang, devicetree, linux-arm-kernel,
linux-pm, Wenyou Yang
Add the power supply capacity level property, it corresponds to
POWER_SUPPLY_CAPACITY_LEVEL_*.
It also utilizes the precision voltage detector function module
to catch the low battery voltage.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
Changes in v9:
- For "lbo-gpios", use devm_gpiod_get_optional(), instead of
devm_gpiod_get(), for simpler and more reasonable.
- Remove unnecessary GPIOLIB dependency.
Changes in v8:
- As the act8945a_charger is regarded as a sub-device, all
properties can be achieved from its own device node,
use devm_gpiod_get() properly as well to get "lbo-gpios".
- Add missing return -EPROBE_DEFER for "lbo-gpios".
Changes in v7:
- For "lbo-gpios", use gpiod_get() to fix devm_gpiod_get() wrong use
with parent device as *dev argument.
- Add the handle -EPROBE_DEFER returned from gpiod_get "lbo-gpios".
- Use dev_info() to print log if the lbo irq request failed.
- Remove unneeded semicolon.
- Add depends on GPIOLIB for use gpiod.
Changes in v6:
- For "lbo-gpios", use gpiod API instead of old gpio API to handle.
Changes in v4:
- Change devname of devm_request_irq() from "lbo-detect" to
"act8945a, lbo-detect".
drivers/power/supply/act8945a_charger.c | 79 ++++++++++++++++++++++++++++++++-
1 file changed, 78 insertions(+), 1 deletion(-)
diff --git a/drivers/power/supply/act8945a_charger.c b/drivers/power/supply/act8945a_charger.c
index 48775f8..2f87599 100644
--- a/drivers/power/supply/act8945a_charger.c
+++ b/drivers/power/supply/act8945a_charger.c
@@ -18,6 +18,7 @@
#include <linux/platform_device.h>
#include <linux/power_supply.h>
#include <linux/regmap.h>
+#include <linux/gpio/consumer.h>
static const char *act8945a_charger_model = "ACT8945A";
static const char *act8945a_charger_manufacturer = "Active-semi";
@@ -83,6 +84,7 @@ struct act8945a_charger {
struct work_struct work;
bool init_done;
+ struct gpio_desc *lbo_gpio;
};
static int act8945a_get_charger_state(struct regmap *regmap, int *val)
@@ -208,11 +210,67 @@ static int act8945a_get_battery_health(struct regmap *regmap, int *val)
return 0;
}
+static int act8945a_get_capacity_level(struct act8945a_charger *charger,
+ struct regmap *regmap, int *val)
+{
+ int ret;
+ unsigned int status, state, config;
+ int lbo_level = gpiod_get_value(charger->lbo_gpio);
+
+ ret = regmap_read(regmap, ACT8945A_APCH_STATUS, &status);
+ if (ret < 0)
+ return ret;
+
+ ret = regmap_read(regmap, ACT8945A_APCH_CFG, &config);
+ if (ret < 0)
+ return ret;
+
+ ret = regmap_read(regmap, ACT8945A_APCH_STATE, &state);
+ if (ret < 0)
+ return ret;
+
+ state &= APCH_STATE_CSTATE;
+ state >>= APCH_STATE_CSTATE_SHIFT;
+
+ switch (state) {
+ case APCH_STATE_CSTATE_PRE:
+ *val = POWER_SUPPLY_CAPACITY_LEVEL_LOW;
+ break;
+ case APCH_STATE_CSTATE_FAST:
+ if (lbo_level)
+ *val = POWER_SUPPLY_CAPACITY_LEVEL_HIGH;
+ else
+ *val = POWER_SUPPLY_CAPACITY_LEVEL_LOW;
+ break;
+ case APCH_STATE_CSTATE_EOC:
+ if (status & APCH_STATUS_CHGDAT)
+ *val = POWER_SUPPLY_CAPACITY_LEVEL_FULL;
+ else
+ *val = POWER_SUPPLY_CAPACITY_LEVEL_NORMAL;
+ break;
+ case APCH_STATE_CSTATE_DISABLED:
+ default:
+ if (config & APCH_CFG_SUSCHG) {
+ *val = POWER_SUPPLY_CAPACITY_LEVEL_UNKNOWN;
+ } else {
+ *val = POWER_SUPPLY_CAPACITY_LEVEL_NORMAL;
+ if (!(status & APCH_STATUS_INDAT)) {
+ if (!lbo_level)
+ *val = POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL;
+ }
+ }
+ break;
+ }
+
+ return 0;
+}
+
static enum power_supply_property act8945a_charger_props[] = {
POWER_SUPPLY_PROP_STATUS,
POWER_SUPPLY_PROP_CHARGE_TYPE,
POWER_SUPPLY_PROP_TECHNOLOGY,
POWER_SUPPLY_PROP_HEALTH,
+ POWER_SUPPLY_PROP_CAPACITY_LEVEL,
POWER_SUPPLY_PROP_MODEL_NAME,
POWER_SUPPLY_PROP_MANUFACTURER
};
@@ -238,6 +296,10 @@ static int act8945a_charger_get_property(struct power_supply *psy,
case POWER_SUPPLY_PROP_HEALTH:
ret = act8945a_get_battery_health(regmap, &val->intval);
break;
+ case POWER_SUPPLY_PROP_CAPACITY_LEVEL:
+ ret = act8945a_get_capacity_level(charger,
+ regmap, &val->intval);
+ break;
case POWER_SUPPLY_PROP_MODEL_NAME:
val->strval = act8945a_charger_model;
break;
@@ -335,7 +397,7 @@ static int act8945a_charger_config(struct device *dev,
u32 pre_time_out;
u32 input_voltage_threshold;
int chglev_pin;
- int ret;
+ int err, ret;
unsigned int tmp;
unsigned int value = 0;
@@ -354,6 +416,21 @@ static int act8945a_charger_config(struct device *dev,
dev_info(dev, "have been suspended\n");
}
+ charger->lbo_gpio = devm_gpiod_get_optional(dev, "active-semi,lbo",
+ GPIOD_IN);
+ if (IS_ERR(charger->lbo_gpio)) {
+ err = PTR_ERR(charger->lbo_gpio);
+ dev_err(dev, "unable to claim gpio \"lbo\": %d\n", err);
+ return err;
+ }
+
+ ret = devm_request_irq(dev, gpiod_to_irq(charger->lbo_gpio),
+ act8945a_status_changed,
+ (IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING),
+ "act8945a_lbo_detect", charger);
+ if (ret)
+ dev_info(dev, "failed to request gpio \"lbo\" IRQ\n");
+
chglev_pin = of_get_named_gpio_flags(np,
"active-semi,chglev-gpios", 0, &flags);
--
2.7.4
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH v9 1/4] power: act8945a_charger: Add capacity level property
@ 2016-09-01 9:29 ` Wenyou Yang
0 siblings, 0 replies; 29+ messages in thread
From: Wenyou Yang @ 2016-09-01 9:29 UTC (permalink / raw)
To: linux-arm-kernel
Add the power supply capacity level property, it corresponds to
POWER_SUPPLY_CAPACITY_LEVEL_*.
It also utilizes the precision voltage detector function module
to catch the low battery voltage.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
Changes in v9:
- For "lbo-gpios", use devm_gpiod_get_optional(), instead of
devm_gpiod_get(), for simpler and more reasonable.
- Remove unnecessary GPIOLIB dependency.
Changes in v8:
- As the act8945a_charger is regarded as a sub-device, all
properties can be achieved from its own device node,
use devm_gpiod_get() properly as well to get "lbo-gpios".
- Add missing return -EPROBE_DEFER for "lbo-gpios".
Changes in v7:
- For "lbo-gpios", use gpiod_get() to fix devm_gpiod_get() wrong use
with parent device as *dev argument.
- Add the handle -EPROBE_DEFER returned from gpiod_get "lbo-gpios".
- Use dev_info() to print log if the lbo irq request failed.
- Remove unneeded semicolon.
- Add depends on GPIOLIB for use gpiod.
Changes in v6:
- For "lbo-gpios", use gpiod API instead of old gpio API to handle.
Changes in v4:
- Change devname of devm_request_irq() from "lbo-detect" to
"act8945a, lbo-detect".
drivers/power/supply/act8945a_charger.c | 79 ++++++++++++++++++++++++++++++++-
1 file changed, 78 insertions(+), 1 deletion(-)
diff --git a/drivers/power/supply/act8945a_charger.c b/drivers/power/supply/act8945a_charger.c
index 48775f8..2f87599 100644
--- a/drivers/power/supply/act8945a_charger.c
+++ b/drivers/power/supply/act8945a_charger.c
@@ -18,6 +18,7 @@
#include <linux/platform_device.h>
#include <linux/power_supply.h>
#include <linux/regmap.h>
+#include <linux/gpio/consumer.h>
static const char *act8945a_charger_model = "ACT8945A";
static const char *act8945a_charger_manufacturer = "Active-semi";
@@ -83,6 +84,7 @@ struct act8945a_charger {
struct work_struct work;
bool init_done;
+ struct gpio_desc *lbo_gpio;
};
static int act8945a_get_charger_state(struct regmap *regmap, int *val)
@@ -208,11 +210,67 @@ static int act8945a_get_battery_health(struct regmap *regmap, int *val)
return 0;
}
+static int act8945a_get_capacity_level(struct act8945a_charger *charger,
+ struct regmap *regmap, int *val)
+{
+ int ret;
+ unsigned int status, state, config;
+ int lbo_level = gpiod_get_value(charger->lbo_gpio);
+
+ ret = regmap_read(regmap, ACT8945A_APCH_STATUS, &status);
+ if (ret < 0)
+ return ret;
+
+ ret = regmap_read(regmap, ACT8945A_APCH_CFG, &config);
+ if (ret < 0)
+ return ret;
+
+ ret = regmap_read(regmap, ACT8945A_APCH_STATE, &state);
+ if (ret < 0)
+ return ret;
+
+ state &= APCH_STATE_CSTATE;
+ state >>= APCH_STATE_CSTATE_SHIFT;
+
+ switch (state) {
+ case APCH_STATE_CSTATE_PRE:
+ *val = POWER_SUPPLY_CAPACITY_LEVEL_LOW;
+ break;
+ case APCH_STATE_CSTATE_FAST:
+ if (lbo_level)
+ *val = POWER_SUPPLY_CAPACITY_LEVEL_HIGH;
+ else
+ *val = POWER_SUPPLY_CAPACITY_LEVEL_LOW;
+ break;
+ case APCH_STATE_CSTATE_EOC:
+ if (status & APCH_STATUS_CHGDAT)
+ *val = POWER_SUPPLY_CAPACITY_LEVEL_FULL;
+ else
+ *val = POWER_SUPPLY_CAPACITY_LEVEL_NORMAL;
+ break;
+ case APCH_STATE_CSTATE_DISABLED:
+ default:
+ if (config & APCH_CFG_SUSCHG) {
+ *val = POWER_SUPPLY_CAPACITY_LEVEL_UNKNOWN;
+ } else {
+ *val = POWER_SUPPLY_CAPACITY_LEVEL_NORMAL;
+ if (!(status & APCH_STATUS_INDAT)) {
+ if (!lbo_level)
+ *val = POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL;
+ }
+ }
+ break;
+ }
+
+ return 0;
+}
+
static enum power_supply_property act8945a_charger_props[] = {
POWER_SUPPLY_PROP_STATUS,
POWER_SUPPLY_PROP_CHARGE_TYPE,
POWER_SUPPLY_PROP_TECHNOLOGY,
POWER_SUPPLY_PROP_HEALTH,
+ POWER_SUPPLY_PROP_CAPACITY_LEVEL,
POWER_SUPPLY_PROP_MODEL_NAME,
POWER_SUPPLY_PROP_MANUFACTURER
};
@@ -238,6 +296,10 @@ static int act8945a_charger_get_property(struct power_supply *psy,
case POWER_SUPPLY_PROP_HEALTH:
ret = act8945a_get_battery_health(regmap, &val->intval);
break;
+ case POWER_SUPPLY_PROP_CAPACITY_LEVEL:
+ ret = act8945a_get_capacity_level(charger,
+ regmap, &val->intval);
+ break;
case POWER_SUPPLY_PROP_MODEL_NAME:
val->strval = act8945a_charger_model;
break;
@@ -335,7 +397,7 @@ static int act8945a_charger_config(struct device *dev,
u32 pre_time_out;
u32 input_voltage_threshold;
int chglev_pin;
- int ret;
+ int err, ret;
unsigned int tmp;
unsigned int value = 0;
@@ -354,6 +416,21 @@ static int act8945a_charger_config(struct device *dev,
dev_info(dev, "have been suspended\n");
}
+ charger->lbo_gpio = devm_gpiod_get_optional(dev, "active-semi,lbo",
+ GPIOD_IN);
+ if (IS_ERR(charger->lbo_gpio)) {
+ err = PTR_ERR(charger->lbo_gpio);
+ dev_err(dev, "unable to claim gpio \"lbo\": %d\n", err);
+ return err;
+ }
+
+ ret = devm_request_irq(dev, gpiod_to_irq(charger->lbo_gpio),
+ act8945a_status_changed,
+ (IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING),
+ "act8945a_lbo_detect", charger);
+ if (ret)
+ dev_info(dev, "failed to request gpio \"lbo\" IRQ\n");
+
chglev_pin = of_get_named_gpio_flags(np,
"active-semi,chglev-gpios", 0, &flags);
--
2.7.4
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH v9 2/4] power: act8945a_charger: Add max current property
2016-09-01 9:29 ` Wenyou Yang
(?)
@ 2016-09-01 9:29 ` Wenyou Yang
-1 siblings, 0 replies; 29+ messages in thread
From: Wenyou Yang @ 2016-09-01 9:29 UTC (permalink / raw)
To: Sebastian Reichel, Dmitry Eremin-Solenikov, David Woodhouse,
Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Lee Jones, Nicolas Ferre, Alexandre Belloni
Cc: linux-kernel, Wenyou Yang, devicetree, linux-arm-kernel,
linux-pm, Wenyou Yang
Add the power supply's current max property,
POWER_SUPPLY_PROP_CURRENT_MAX.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
Changes in v9:
- For "chglev-gpios", use devm_gpiod_get_optional(), instead of
devm_gpiod_get(), for simper and more reasonable.
Changes in v8:
- As the act8945a_charger is regarded as a sub-device, all
properties can be achieved from its own device node,
use devm_gpiod_get() properly as well to get "chglev-gpios".
- Add missing return -EPROBE_DEFER for "chglev-gpios".
Changes in v7:
- For "chglev-gpios", use gpiod_get() to fix devm_gpiod_get() wrong use
with parent device as *dev argument.
- Add the handle -EPROBE_DEFER returned from gpiod_get "chglev-gpio".
- Remove unneeded semicolon.
Changes in v6:
- For "chglev-gpios", use gpiod API instead of old gpio API to handle.
Changes in v4:
- Fix wrong gpio assignment for chglev_pin.
drivers/power/supply/act8945a_charger.c | 89 +++++++++++++++++++++++++++++----
1 file changed, 80 insertions(+), 9 deletions(-)
diff --git a/drivers/power/supply/act8945a_charger.c b/drivers/power/supply/act8945a_charger.c
index 2f87599..d1eb2e3 100644
--- a/drivers/power/supply/act8945a_charger.c
+++ b/drivers/power/supply/act8945a_charger.c
@@ -13,7 +13,6 @@
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/of.h>
-#include <linux/of_gpio.h>
#include <linux/of_irq.h>
#include <linux/platform_device.h>
#include <linux/power_supply.h>
@@ -85,6 +84,7 @@ struct act8945a_charger {
bool init_done;
struct gpio_desc *lbo_gpio;
+ struct gpio_desc *chglev_gpio;
};
static int act8945a_get_charger_state(struct regmap *regmap, int *val)
@@ -265,12 +265,80 @@ static int act8945a_get_capacity_level(struct act8945a_charger *charger,
return 0;
}
+#define MAX_CURRENT_USB_HIGH 450000
+#define MAX_CURRENT_USB_LOW 90000
+#define MAX_CURRENT_USB_PRE 45000
+/*
+ * Riset(K) = 2336 * (1V/Ichg(mA)) - 0.205
+ * Riset = 2.43K
+ */
+#define MAX_CURRENT_AC_HIGH 886527
+#define MAX_CURRENT_AC_LOW 117305
+#define MAX_CURRENT_AC_HIGH_PRE 88653
+#define MAX_CURRENT_AC_LOW_PRE 11731
+
+static int act8945a_get_current_max(struct act8945a_charger *charger,
+ struct regmap *regmap, int *val)
+{
+ int ret;
+ unsigned int status, state;
+ unsigned int acin_state;
+ int chgin_level = gpiod_get_value(charger->chglev_gpio);
+
+ ret = regmap_read(regmap, ACT8945A_APCH_STATUS, &status);
+ if (ret < 0)
+ return ret;
+
+ ret = regmap_read(regmap, ACT8945A_APCH_STATE, &state);
+ if (ret < 0)
+ return ret;
+
+ acin_state = (state & APCH_STATE_ACINSTAT) >> 1;
+
+ state &= APCH_STATE_CSTATE;
+ state >>= APCH_STATE_CSTATE_SHIFT;
+
+ switch (state) {
+ case APCH_STATE_CSTATE_PRE:
+ if (acin_state) {
+ if (chgin_level)
+ *val = MAX_CURRENT_AC_HIGH_PRE;
+ else
+ *val = MAX_CURRENT_AC_LOW_PRE;
+ } else {
+ *val = MAX_CURRENT_USB_PRE;
+ }
+ break;
+ case APCH_STATE_CSTATE_FAST:
+ if (acin_state) {
+ if (chgin_level)
+ *val = MAX_CURRENT_AC_HIGH;
+ else
+ *val = MAX_CURRENT_AC_LOW;
+ } else {
+ if (chgin_level)
+ *val = MAX_CURRENT_USB_HIGH;
+ else
+ *val = MAX_CURRENT_USB_LOW;
+ }
+ break;
+ case APCH_STATE_CSTATE_EOC:
+ case APCH_STATE_CSTATE_DISABLED:
+ default:
+ *val = 0;
+ break;
+ }
+
+ return 0;
+}
+
static enum power_supply_property act8945a_charger_props[] = {
POWER_SUPPLY_PROP_STATUS,
POWER_SUPPLY_PROP_CHARGE_TYPE,
POWER_SUPPLY_PROP_TECHNOLOGY,
POWER_SUPPLY_PROP_HEALTH,
POWER_SUPPLY_PROP_CAPACITY_LEVEL,
+ POWER_SUPPLY_PROP_CURRENT_MAX,
POWER_SUPPLY_PROP_MODEL_NAME,
POWER_SUPPLY_PROP_MANUFACTURER
};
@@ -300,6 +368,10 @@ static int act8945a_charger_get_property(struct power_supply *psy,
ret = act8945a_get_capacity_level(charger,
regmap, &val->intval);
break;
+ case POWER_SUPPLY_PROP_CURRENT_MAX:
+ ret = act8945a_get_current_max(charger,
+ regmap, &val->intval);
+ break;
case POWER_SUPPLY_PROP_MODEL_NAME:
val->strval = act8945a_charger_model;
break;
@@ -390,13 +462,11 @@ static int act8945a_charger_config(struct device *dev,
struct act8945a_charger *charger)
{
struct device_node *np = dev->of_node;
- enum of_gpio_flags flags;
struct regmap *regmap = charger->regmap;
u32 total_time_out;
u32 pre_time_out;
u32 input_voltage_threshold;
- int chglev_pin;
int err, ret;
unsigned int tmp;
@@ -431,12 +501,13 @@ static int act8945a_charger_config(struct device *dev,
if (ret)
dev_info(dev, "failed to request gpio \"lbo\" IRQ\n");
- chglev_pin = of_get_named_gpio_flags(np,
- "active-semi,chglev-gpios", 0, &flags);
-
- if (gpio_is_valid(chglev_pin)) {
- gpio_set_value(chglev_pin,
- ((flags == OF_GPIO_ACTIVE_LOW) ? 0 : 1));
+ charger->chglev_gpio = devm_gpiod_get_optional(dev,
+ "active-semi,chglev",
+ GPIOD_IN);
+ if (IS_ERR(charger->chglev_gpio)) {
+ err = PTR_ERR(charger->chglev_gpio);
+ dev_err(dev, "unable to claim gpio \"chglev\": %d\n", err);
+ return err;
}
if (of_property_read_u32(np,
--
2.7.4
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH v9 2/4] power: act8945a_charger: Add max current property
@ 2016-09-01 9:29 ` Wenyou Yang
0 siblings, 0 replies; 29+ messages in thread
From: Wenyou Yang @ 2016-09-01 9:29 UTC (permalink / raw)
To: Sebastian Reichel, Dmitry Eremin-Solenikov, David Woodhouse,
Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Lee Jones, Nicolas Ferre, Alexandre Belloni
Cc: linux-kernel, Wenyou Yang, devicetree, linux-arm-kernel,
linux-pm, Wenyou Yang
Add the power supply's current max property,
POWER_SUPPLY_PROP_CURRENT_MAX.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
Changes in v9:
- For "chglev-gpios", use devm_gpiod_get_optional(), instead of
devm_gpiod_get(), for simper and more reasonable.
Changes in v8:
- As the act8945a_charger is regarded as a sub-device, all
properties can be achieved from its own device node,
use devm_gpiod_get() properly as well to get "chglev-gpios".
- Add missing return -EPROBE_DEFER for "chglev-gpios".
Changes in v7:
- For "chglev-gpios", use gpiod_get() to fix devm_gpiod_get() wrong use
with parent device as *dev argument.
- Add the handle -EPROBE_DEFER returned from gpiod_get "chglev-gpio".
- Remove unneeded semicolon.
Changes in v6:
- For "chglev-gpios", use gpiod API instead of old gpio API to handle.
Changes in v4:
- Fix wrong gpio assignment for chglev_pin.
drivers/power/supply/act8945a_charger.c | 89 +++++++++++++++++++++++++++++----
1 file changed, 80 insertions(+), 9 deletions(-)
diff --git a/drivers/power/supply/act8945a_charger.c b/drivers/power/supply/act8945a_charger.c
index 2f87599..d1eb2e3 100644
--- a/drivers/power/supply/act8945a_charger.c
+++ b/drivers/power/supply/act8945a_charger.c
@@ -13,7 +13,6 @@
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/of.h>
-#include <linux/of_gpio.h>
#include <linux/of_irq.h>
#include <linux/platform_device.h>
#include <linux/power_supply.h>
@@ -85,6 +84,7 @@ struct act8945a_charger {
bool init_done;
struct gpio_desc *lbo_gpio;
+ struct gpio_desc *chglev_gpio;
};
static int act8945a_get_charger_state(struct regmap *regmap, int *val)
@@ -265,12 +265,80 @@ static int act8945a_get_capacity_level(struct act8945a_charger *charger,
return 0;
}
+#define MAX_CURRENT_USB_HIGH 450000
+#define MAX_CURRENT_USB_LOW 90000
+#define MAX_CURRENT_USB_PRE 45000
+/*
+ * Riset(K) = 2336 * (1V/Ichg(mA)) - 0.205
+ * Riset = 2.43K
+ */
+#define MAX_CURRENT_AC_HIGH 886527
+#define MAX_CURRENT_AC_LOW 117305
+#define MAX_CURRENT_AC_HIGH_PRE 88653
+#define MAX_CURRENT_AC_LOW_PRE 11731
+
+static int act8945a_get_current_max(struct act8945a_charger *charger,
+ struct regmap *regmap, int *val)
+{
+ int ret;
+ unsigned int status, state;
+ unsigned int acin_state;
+ int chgin_level = gpiod_get_value(charger->chglev_gpio);
+
+ ret = regmap_read(regmap, ACT8945A_APCH_STATUS, &status);
+ if (ret < 0)
+ return ret;
+
+ ret = regmap_read(regmap, ACT8945A_APCH_STATE, &state);
+ if (ret < 0)
+ return ret;
+
+ acin_state = (state & APCH_STATE_ACINSTAT) >> 1;
+
+ state &= APCH_STATE_CSTATE;
+ state >>= APCH_STATE_CSTATE_SHIFT;
+
+ switch (state) {
+ case APCH_STATE_CSTATE_PRE:
+ if (acin_state) {
+ if (chgin_level)
+ *val = MAX_CURRENT_AC_HIGH_PRE;
+ else
+ *val = MAX_CURRENT_AC_LOW_PRE;
+ } else {
+ *val = MAX_CURRENT_USB_PRE;
+ }
+ break;
+ case APCH_STATE_CSTATE_FAST:
+ if (acin_state) {
+ if (chgin_level)
+ *val = MAX_CURRENT_AC_HIGH;
+ else
+ *val = MAX_CURRENT_AC_LOW;
+ } else {
+ if (chgin_level)
+ *val = MAX_CURRENT_USB_HIGH;
+ else
+ *val = MAX_CURRENT_USB_LOW;
+ }
+ break;
+ case APCH_STATE_CSTATE_EOC:
+ case APCH_STATE_CSTATE_DISABLED:
+ default:
+ *val = 0;
+ break;
+ }
+
+ return 0;
+}
+
static enum power_supply_property act8945a_charger_props[] = {
POWER_SUPPLY_PROP_STATUS,
POWER_SUPPLY_PROP_CHARGE_TYPE,
POWER_SUPPLY_PROP_TECHNOLOGY,
POWER_SUPPLY_PROP_HEALTH,
POWER_SUPPLY_PROP_CAPACITY_LEVEL,
+ POWER_SUPPLY_PROP_CURRENT_MAX,
POWER_SUPPLY_PROP_MODEL_NAME,
POWER_SUPPLY_PROP_MANUFACTURER
};
@@ -300,6 +368,10 @@ static int act8945a_charger_get_property(struct power_supply *psy,
ret = act8945a_get_capacity_level(charger,
regmap, &val->intval);
break;
+ case POWER_SUPPLY_PROP_CURRENT_MAX:
+ ret = act8945a_get_current_max(charger,
+ regmap, &val->intval);
+ break;
case POWER_SUPPLY_PROP_MODEL_NAME:
val->strval = act8945a_charger_model;
break;
@@ -390,13 +462,11 @@ static int act8945a_charger_config(struct device *dev,
struct act8945a_charger *charger)
{
struct device_node *np = dev->of_node;
- enum of_gpio_flags flags;
struct regmap *regmap = charger->regmap;
u32 total_time_out;
u32 pre_time_out;
u32 input_voltage_threshold;
- int chglev_pin;
int err, ret;
unsigned int tmp;
@@ -431,12 +501,13 @@ static int act8945a_charger_config(struct device *dev,
if (ret)
dev_info(dev, "failed to request gpio \"lbo\" IRQ\n");
- chglev_pin = of_get_named_gpio_flags(np,
- "active-semi,chglev-gpios", 0, &flags);
-
- if (gpio_is_valid(chglev_pin)) {
- gpio_set_value(chglev_pin,
- ((flags == OF_GPIO_ACTIVE_LOW) ? 0 : 1));
+ charger->chglev_gpio = devm_gpiod_get_optional(dev,
+ "active-semi,chglev",
+ GPIOD_IN);
+ if (IS_ERR(charger->chglev_gpio)) {
+ err = PTR_ERR(charger->chglev_gpio);
+ dev_err(dev, "unable to claim gpio \"chglev\": %d\n", err);
+ return err;
}
if (of_property_read_u32(np,
--
2.7.4
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH v9 2/4] power: act8945a_charger: Add max current property
@ 2016-09-01 9:29 ` Wenyou Yang
0 siblings, 0 replies; 29+ messages in thread
From: Wenyou Yang @ 2016-09-01 9:29 UTC (permalink / raw)
To: linux-arm-kernel
Add the power supply's current max property,
POWER_SUPPLY_PROP_CURRENT_MAX.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
Changes in v9:
- For "chglev-gpios", use devm_gpiod_get_optional(), instead of
devm_gpiod_get(), for simper and more reasonable.
Changes in v8:
- As the act8945a_charger is regarded as a sub-device, all
properties can be achieved from its own device node,
use devm_gpiod_get() properly as well to get "chglev-gpios".
- Add missing return -EPROBE_DEFER for "chglev-gpios".
Changes in v7:
- For "chglev-gpios", use gpiod_get() to fix devm_gpiod_get() wrong use
with parent device as *dev argument.
- Add the handle -EPROBE_DEFER returned from gpiod_get "chglev-gpio".
- Remove unneeded semicolon.
Changes in v6:
- For "chglev-gpios", use gpiod API instead of old gpio API to handle.
Changes in v4:
- Fix wrong gpio assignment for chglev_pin.
drivers/power/supply/act8945a_charger.c | 89 +++++++++++++++++++++++++++++----
1 file changed, 80 insertions(+), 9 deletions(-)
diff --git a/drivers/power/supply/act8945a_charger.c b/drivers/power/supply/act8945a_charger.c
index 2f87599..d1eb2e3 100644
--- a/drivers/power/supply/act8945a_charger.c
+++ b/drivers/power/supply/act8945a_charger.c
@@ -13,7 +13,6 @@
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/of.h>
-#include <linux/of_gpio.h>
#include <linux/of_irq.h>
#include <linux/platform_device.h>
#include <linux/power_supply.h>
@@ -85,6 +84,7 @@ struct act8945a_charger {
bool init_done;
struct gpio_desc *lbo_gpio;
+ struct gpio_desc *chglev_gpio;
};
static int act8945a_get_charger_state(struct regmap *regmap, int *val)
@@ -265,12 +265,80 @@ static int act8945a_get_capacity_level(struct act8945a_charger *charger,
return 0;
}
+#define MAX_CURRENT_USB_HIGH 450000
+#define MAX_CURRENT_USB_LOW 90000
+#define MAX_CURRENT_USB_PRE 45000
+/*
+ * Riset(K) = 2336 * (1V/Ichg(mA)) - 0.205
+ * Riset = 2.43K
+ */
+#define MAX_CURRENT_AC_HIGH 886527
+#define MAX_CURRENT_AC_LOW 117305
+#define MAX_CURRENT_AC_HIGH_PRE 88653
+#define MAX_CURRENT_AC_LOW_PRE 11731
+
+static int act8945a_get_current_max(struct act8945a_charger *charger,
+ struct regmap *regmap, int *val)
+{
+ int ret;
+ unsigned int status, state;
+ unsigned int acin_state;
+ int chgin_level = gpiod_get_value(charger->chglev_gpio);
+
+ ret = regmap_read(regmap, ACT8945A_APCH_STATUS, &status);
+ if (ret < 0)
+ return ret;
+
+ ret = regmap_read(regmap, ACT8945A_APCH_STATE, &state);
+ if (ret < 0)
+ return ret;
+
+ acin_state = (state & APCH_STATE_ACINSTAT) >> 1;
+
+ state &= APCH_STATE_CSTATE;
+ state >>= APCH_STATE_CSTATE_SHIFT;
+
+ switch (state) {
+ case APCH_STATE_CSTATE_PRE:
+ if (acin_state) {
+ if (chgin_level)
+ *val = MAX_CURRENT_AC_HIGH_PRE;
+ else
+ *val = MAX_CURRENT_AC_LOW_PRE;
+ } else {
+ *val = MAX_CURRENT_USB_PRE;
+ }
+ break;
+ case APCH_STATE_CSTATE_FAST:
+ if (acin_state) {
+ if (chgin_level)
+ *val = MAX_CURRENT_AC_HIGH;
+ else
+ *val = MAX_CURRENT_AC_LOW;
+ } else {
+ if (chgin_level)
+ *val = MAX_CURRENT_USB_HIGH;
+ else
+ *val = MAX_CURRENT_USB_LOW;
+ }
+ break;
+ case APCH_STATE_CSTATE_EOC:
+ case APCH_STATE_CSTATE_DISABLED:
+ default:
+ *val = 0;
+ break;
+ }
+
+ return 0;
+}
+
static enum power_supply_property act8945a_charger_props[] = {
POWER_SUPPLY_PROP_STATUS,
POWER_SUPPLY_PROP_CHARGE_TYPE,
POWER_SUPPLY_PROP_TECHNOLOGY,
POWER_SUPPLY_PROP_HEALTH,
POWER_SUPPLY_PROP_CAPACITY_LEVEL,
+ POWER_SUPPLY_PROP_CURRENT_MAX,
POWER_SUPPLY_PROP_MODEL_NAME,
POWER_SUPPLY_PROP_MANUFACTURER
};
@@ -300,6 +368,10 @@ static int act8945a_charger_get_property(struct power_supply *psy,
ret = act8945a_get_capacity_level(charger,
regmap, &val->intval);
break;
+ case POWER_SUPPLY_PROP_CURRENT_MAX:
+ ret = act8945a_get_current_max(charger,
+ regmap, &val->intval);
+ break;
case POWER_SUPPLY_PROP_MODEL_NAME:
val->strval = act8945a_charger_model;
break;
@@ -390,13 +462,11 @@ static int act8945a_charger_config(struct device *dev,
struct act8945a_charger *charger)
{
struct device_node *np = dev->of_node;
- enum of_gpio_flags flags;
struct regmap *regmap = charger->regmap;
u32 total_time_out;
u32 pre_time_out;
u32 input_voltage_threshold;
- int chglev_pin;
int err, ret;
unsigned int tmp;
@@ -431,12 +501,13 @@ static int act8945a_charger_config(struct device *dev,
if (ret)
dev_info(dev, "failed to request gpio \"lbo\" IRQ\n");
- chglev_pin = of_get_named_gpio_flags(np,
- "active-semi,chglev-gpios", 0, &flags);
-
- if (gpio_is_valid(chglev_pin)) {
- gpio_set_value(chglev_pin,
- ((flags == OF_GPIO_ACTIVE_LOW) ? 0 : 1));
+ charger->chglev_gpio = devm_gpiod_get_optional(dev,
+ "active-semi,chglev",
+ GPIOD_IN);
+ if (IS_ERR(charger->chglev_gpio)) {
+ err = PTR_ERR(charger->chglev_gpio);
+ dev_err(dev, "unable to claim gpio \"chglev\": %d\n", err);
+ return err;
}
if (of_property_read_u32(np,
--
2.7.4
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
2016-09-01 9:29 ` Wenyou Yang
(?)
@ 2016-09-01 9:30 ` Wenyou Yang
-1 siblings, 0 replies; 29+ messages in thread
From: Wenyou Yang @ 2016-09-01 9:30 UTC (permalink / raw)
To: Sebastian Reichel, Dmitry Eremin-Solenikov, David Woodhouse,
Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Lee Jones, Nicolas Ferre, Alexandre Belloni
Cc: linux-kernel, Wenyou Yang, devicetree, linux-arm-kernel,
linux-pm, Wenyou Yang
Since the act8945a-charger is regarded as a sub-device and it using
"interrupts" property, update the examples section.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
Changes in v9: None
Changes in v8: None
Changes in v7: None
Changes in v6: None
Changes in v4: None
Documentation/devicetree/bindings/mfd/act8945a.txt | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/Documentation/devicetree/bindings/mfd/act8945a.txt b/Documentation/devicetree/bindings/mfd/act8945a.txt
index f712830..462819a 100644
--- a/Documentation/devicetree/bindings/mfd/act8945a.txt
+++ b/Documentation/devicetree/bindings/mfd/act8945a.txt
@@ -14,13 +14,6 @@ Example:
reg = <0x5b>;
status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_charger_chglev>;
- active-semi,chglev-gpio = <&pioA 12 GPIO_ACTIVE_HIGH>;
- active-semi,input-voltage-threshold-microvolt = <6600>;
- active-semi,precondition-timeout = <40>;
- active-semi,total-timeout = <3>;
-
active-semi,vsel-high;
regulators {
@@ -73,4 +66,19 @@ Example:
regulator-always-on;
};
};
+
+ charger {
+ compatible = "active-semi,act8945a-charger";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>;
+ interrupt-parent = <&pioA>;
+ interrupts = <45 GPIO_ACTIVE_LOW>;
+
+ active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;
+ active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;
+ active-semi,input-voltage-threshold-microvolt = <6600>;
+ active-semi,precondition-timeout = <40>;
+ active-semi,total-timeout = <3>;
+ status = "okay";
+ };
};
--
2.7.4
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
@ 2016-09-01 9:30 ` Wenyou Yang
0 siblings, 0 replies; 29+ messages in thread
From: Wenyou Yang @ 2016-09-01 9:30 UTC (permalink / raw)
To: Sebastian Reichel, Dmitry Eremin-Solenikov, David Woodhouse,
Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Lee Jones, Nicolas Ferre, Alexandre Belloni
Cc: linux-kernel, Wenyou Yang, devicetree, linux-arm-kernel,
linux-pm, Wenyou Yang
Since the act8945a-charger is regarded as a sub-device and it using
"interrupts" property, update the examples section.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
Changes in v9: None
Changes in v8: None
Changes in v7: None
Changes in v6: None
Changes in v4: None
Documentation/devicetree/bindings/mfd/act8945a.txt | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/Documentation/devicetree/bindings/mfd/act8945a.txt b/Documentation/devicetree/bindings/mfd/act8945a.txt
index f712830..462819a 100644
--- a/Documentation/devicetree/bindings/mfd/act8945a.txt
+++ b/Documentation/devicetree/bindings/mfd/act8945a.txt
@@ -14,13 +14,6 @@ Example:
reg = <0x5b>;
status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_charger_chglev>;
- active-semi,chglev-gpio = <&pioA 12 GPIO_ACTIVE_HIGH>;
- active-semi,input-voltage-threshold-microvolt = <6600>;
- active-semi,precondition-timeout = <40>;
- active-semi,total-timeout = <3>;
-
active-semi,vsel-high;
regulators {
@@ -73,4 +66,19 @@ Example:
regulator-always-on;
};
};
+
+ charger {
+ compatible = "active-semi,act8945a-charger";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>;
+ interrupt-parent = <&pioA>;
+ interrupts = <45 GPIO_ACTIVE_LOW>;
+
+ active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;
+ active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;
+ active-semi,input-voltage-threshold-microvolt = <6600>;
+ active-semi,precondition-timeout = <40>;
+ active-semi,total-timeout = <3>;
+ status = "okay";
+ };
};
--
2.7.4
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
@ 2016-09-01 9:30 ` Wenyou Yang
0 siblings, 0 replies; 29+ messages in thread
From: Wenyou Yang @ 2016-09-01 9:30 UTC (permalink / raw)
To: linux-arm-kernel
Since the act8945a-charger is regarded as a sub-device and it using
"interrupts" property, update the examples section.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
Changes in v9: None
Changes in v8: None
Changes in v7: None
Changes in v6: None
Changes in v4: None
Documentation/devicetree/bindings/mfd/act8945a.txt | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/Documentation/devicetree/bindings/mfd/act8945a.txt b/Documentation/devicetree/bindings/mfd/act8945a.txt
index f712830..462819a 100644
--- a/Documentation/devicetree/bindings/mfd/act8945a.txt
+++ b/Documentation/devicetree/bindings/mfd/act8945a.txt
@@ -14,13 +14,6 @@ Example:
reg = <0x5b>;
status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_charger_chglev>;
- active-semi,chglev-gpio = <&pioA 12 GPIO_ACTIVE_HIGH>;
- active-semi,input-voltage-threshold-microvolt = <6600>;
- active-semi,precondition-timeout = <40>;
- active-semi,total-timeout = <3>;
-
active-semi,vsel-high;
regulators {
@@ -73,4 +66,19 @@ Example:
regulator-always-on;
};
};
+
+ charger {
+ compatible = "active-semi,act8945a-charger";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>;
+ interrupt-parent = <&pioA>;
+ interrupts = <45 GPIO_ACTIVE_LOW>;
+
+ active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;
+ active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;
+ active-semi,input-voltage-threshold-microvolt = <6600>;
+ active-semi,precondition-timeout = <40>;
+ active-semi,total-timeout = <3>;
+ status = "okay";
+ };
};
--
2.7.4
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH v9 4/4] ARM: at91/dt: sama5d2_xplained: Add act8945a-charger node.
2016-09-01 9:29 ` Wenyou Yang
(?)
@ 2016-09-01 9:30 ` Wenyou Yang
-1 siblings, 0 replies; 29+ messages in thread
From: Wenyou Yang @ 2016-09-01 9:30 UTC (permalink / raw)
To: Sebastian Reichel, Dmitry Eremin-Solenikov, David Woodhouse,
Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Lee Jones, Nicolas Ferre, Alexandre Belloni
Cc: linux-kernel, Wenyou Yang, devicetree, linux-arm-kernel,
linux-pm, Wenyou Yang
Add act8945a-charger as a sub-device node.
Use the "interrupts" property, instead of the "active-semi,irq_gpios"
to denote the act8945a chager's irq.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
Changes in v9:
- Not include seven patches which have been queued or applied.
Changes in v8:
- Add 4 new patches: 1/11, 2/11, 9/11, and 11/11.
Changes in v7: None
Changes in v6: None
Changes in v4: None
arch/arm/boot/dts/at91-sama5d2_xplained.dts | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/arch/arm/boot/dts/at91-sama5d2_xplained.dts b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
index 0b9a59d..87eff10 100644
--- a/arch/arm/boot/dts/at91-sama5d2_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
@@ -162,14 +162,6 @@
compatible = "active-semi,act8945a";
reg = <0x5b>;
active-semi,vsel-high;
- active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;
- active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;
- active-semi,irq_gpios = <&pioA 45 GPIO_ACTIVE_LOW>;
- active-semi,input-voltage-threshold-microvolt = <6600>;
- active-semi,precondition-timeout = <40>;
- active-semi,total-timeout = <3>;
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>;
status = "okay";
regulators {
@@ -222,6 +214,21 @@
regulator-always-on;
};
};
+
+ charger {
+ compatible = "active-semi,act8945a-charger";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>;
+ interrupt-parent = <&pioA>;
+ interrupts = <45 GPIO_ACTIVE_LOW>;
+
+ active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;
+ active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;
+ active-semi,input-voltage-threshold-microvolt = <6600>;
+ active-semi,precondition-timeout = <40>;
+ active-semi,total-timeout = <3>;
+ status = "okay";
+ };
};
};
--
2.7.4
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH v9 4/4] ARM: at91/dt: sama5d2_xplained: Add act8945a-charger node.
@ 2016-09-01 9:30 ` Wenyou Yang
0 siblings, 0 replies; 29+ messages in thread
From: Wenyou Yang @ 2016-09-01 9:30 UTC (permalink / raw)
To: Sebastian Reichel, Dmitry Eremin-Solenikov, David Woodhouse,
Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Lee Jones, Nicolas Ferre, Alexandre Belloni
Cc: linux-kernel, Wenyou Yang, devicetree, linux-arm-kernel,
linux-pm, Wenyou Yang
Add act8945a-charger as a sub-device node.
Use the "interrupts" property, instead of the "active-semi,irq_gpios"
to denote the act8945a chager's irq.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
Changes in v9:
- Not include seven patches which have been queued or applied.
Changes in v8:
- Add 4 new patches: 1/11, 2/11, 9/11, and 11/11.
Changes in v7: None
Changes in v6: None
Changes in v4: None
arch/arm/boot/dts/at91-sama5d2_xplained.dts | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/arch/arm/boot/dts/at91-sama5d2_xplained.dts b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
index 0b9a59d..87eff10 100644
--- a/arch/arm/boot/dts/at91-sama5d2_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
@@ -162,14 +162,6 @@
compatible = "active-semi,act8945a";
reg = <0x5b>;
active-semi,vsel-high;
- active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;
- active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;
- active-semi,irq_gpios = <&pioA 45 GPIO_ACTIVE_LOW>;
- active-semi,input-voltage-threshold-microvolt = <6600>;
- active-semi,precondition-timeout = <40>;
- active-semi,total-timeout = <3>;
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>;
status = "okay";
regulators {
@@ -222,6 +214,21 @@
regulator-always-on;
};
};
+
+ charger {
+ compatible = "active-semi,act8945a-charger";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>;
+ interrupt-parent = <&pioA>;
+ interrupts = <45 GPIO_ACTIVE_LOW>;
+
+ active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;
+ active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;
+ active-semi,input-voltage-threshold-microvolt = <6600>;
+ active-semi,precondition-timeout = <40>;
+ active-semi,total-timeout = <3>;
+ status = "okay";
+ };
};
};
--
2.7.4
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH v9 4/4] ARM: at91/dt: sama5d2_xplained: Add act8945a-charger node.
@ 2016-09-01 9:30 ` Wenyou Yang
0 siblings, 0 replies; 29+ messages in thread
From: Wenyou Yang @ 2016-09-01 9:30 UTC (permalink / raw)
To: linux-arm-kernel
Add act8945a-charger as a sub-device node.
Use the "interrupts" property, instead of the "active-semi,irq_gpios"
to denote the act8945a chager's irq.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
Changes in v9:
- Not include seven patches which have been queued or applied.
Changes in v8:
- Add 4 new patches: 1/11, 2/11, 9/11, and 11/11.
Changes in v7: None
Changes in v6: None
Changes in v4: None
arch/arm/boot/dts/at91-sama5d2_xplained.dts | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/arch/arm/boot/dts/at91-sama5d2_xplained.dts b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
index 0b9a59d..87eff10 100644
--- a/arch/arm/boot/dts/at91-sama5d2_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
@@ -162,14 +162,6 @@
compatible = "active-semi,act8945a";
reg = <0x5b>;
active-semi,vsel-high;
- active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;
- active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;
- active-semi,irq_gpios = <&pioA 45 GPIO_ACTIVE_LOW>;
- active-semi,input-voltage-threshold-microvolt = <6600>;
- active-semi,precondition-timeout = <40>;
- active-semi,total-timeout = <3>;
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>;
status = "okay";
regulators {
@@ -222,6 +214,21 @@
regulator-always-on;
};
};
+
+ charger {
+ compatible = "active-semi,act8945a-charger";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>;
+ interrupt-parent = <&pioA>;
+ interrupts = <45 GPIO_ACTIVE_LOW>;
+
+ active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;
+ active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;
+ active-semi,input-voltage-threshold-microvolt = <6600>;
+ active-semi,precondition-timeout = <40>;
+ active-semi,total-timeout = <3>;
+ status = "okay";
+ };
};
};
--
2.7.4
^ permalink raw reply related [flat|nested] 29+ messages in thread
* Re: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
@ 2016-09-01 11:22 ` Lee Jones
0 siblings, 0 replies; 29+ messages in thread
From: Lee Jones @ 2016-09-01 11:22 UTC (permalink / raw)
To: Wenyou Yang
Cc: Sebastian Reichel, Dmitry Eremin-Solenikov, David Woodhouse,
Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Nicolas Ferre, Alexandre Belloni, linux-kernel, Wenyou Yang,
devicetree, linux-arm-kernel, linux-pm
On Thu, 01 Sep 2016, Wenyou Yang wrote:
> Since the act8945a-charger is regarded as a sub-device and it using
> "interrupts" property, update the examples section.
>
> Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
> ---
>
> Changes in v9: None
> Changes in v8: None
> Changes in v7: None
> Changes in v6: None
> Changes in v4: None
>
> Documentation/devicetree/bindings/mfd/act8945a.txt | 22 +++++++++++++++-------
> 1 file changed, 15 insertions(+), 7 deletions(-)
This is a functional change. I'll require a DT Ack.
> diff --git a/Documentation/devicetree/bindings/mfd/act8945a.txt b/Documentation/devicetree/bindings/mfd/act8945a.txt
> index f712830..462819a 100644
> --- a/Documentation/devicetree/bindings/mfd/act8945a.txt
> +++ b/Documentation/devicetree/bindings/mfd/act8945a.txt
> @@ -14,13 +14,6 @@ Example:
> reg = <0x5b>;
> status = "okay";
>
> - pinctrl-names = "default";
> - pinctrl-0 = <&pinctrl_charger_chglev>;
> - active-semi,chglev-gpio = <&pioA 12 GPIO_ACTIVE_HIGH>;
> - active-semi,input-voltage-threshold-microvolt = <6600>;
> - active-semi,precondition-timeout = <40>;
> - active-semi,total-timeout = <3>;
> -
> active-semi,vsel-high;
>
> regulators {
> @@ -73,4 +66,19 @@ Example:
> regulator-always-on;
> };
> };
> +
> + charger {
> + compatible = "active-semi,act8945a-charger";
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>;
> + interrupt-parent = <&pioA>;
> + interrupts = <45 GPIO_ACTIVE_LOW>;
> +
> + active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;
> + active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;
> + active-semi,input-voltage-threshold-microvolt = <6600>;
> + active-semi,precondition-timeout = <40>;
> + active-semi,total-timeout = <3>;
> + status = "okay";
> + };
> };
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
@ 2016-09-01 11:22 ` Lee Jones
0 siblings, 0 replies; 29+ messages in thread
From: Lee Jones @ 2016-09-01 11:22 UTC (permalink / raw)
To: Wenyou Yang
Cc: Sebastian Reichel, Dmitry Eremin-Solenikov, David Woodhouse,
Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Nicolas Ferre, Alexandre Belloni,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Wenyou Yang,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-pm-u79uwXL29TY76Z2rM5mHXA
On Thu, 01 Sep 2016, Wenyou Yang wrote:
> Since the act8945a-charger is regarded as a sub-device and it using
> "interrupts" property, update the examples section.
>
> Signed-off-by: Wenyou Yang <wenyou.yang-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
> ---
>
> Changes in v9: None
> Changes in v8: None
> Changes in v7: None
> Changes in v6: None
> Changes in v4: None
>
> Documentation/devicetree/bindings/mfd/act8945a.txt | 22 +++++++++++++++-------
> 1 file changed, 15 insertions(+), 7 deletions(-)
This is a functional change. I'll require a DT Ack.
> diff --git a/Documentation/devicetree/bindings/mfd/act8945a.txt b/Documentation/devicetree/bindings/mfd/act8945a.txt
> index f712830..462819a 100644
> --- a/Documentation/devicetree/bindings/mfd/act8945a.txt
> +++ b/Documentation/devicetree/bindings/mfd/act8945a.txt
> @@ -14,13 +14,6 @@ Example:
> reg = <0x5b>;
> status = "okay";
>
> - pinctrl-names = "default";
> - pinctrl-0 = <&pinctrl_charger_chglev>;
> - active-semi,chglev-gpio = <&pioA 12 GPIO_ACTIVE_HIGH>;
> - active-semi,input-voltage-threshold-microvolt = <6600>;
> - active-semi,precondition-timeout = <40>;
> - active-semi,total-timeout = <3>;
> -
> active-semi,vsel-high;
>
> regulators {
> @@ -73,4 +66,19 @@ Example:
> regulator-always-on;
> };
> };
> +
> + charger {
> + compatible = "active-semi,act8945a-charger";
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>;
> + interrupt-parent = <&pioA>;
> + interrupts = <45 GPIO_ACTIVE_LOW>;
> +
> + active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;
> + active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;
> + active-semi,input-voltage-threshold-microvolt = <6600>;
> + active-semi,precondition-timeout = <40>;
> + active-semi,total-timeout = <3>;
> + status = "okay";
> + };
> };
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
@ 2016-09-01 11:22 ` Lee Jones
0 siblings, 0 replies; 29+ messages in thread
From: Lee Jones @ 2016-09-01 11:22 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 01 Sep 2016, Wenyou Yang wrote:
> Since the act8945a-charger is regarded as a sub-device and it using
> "interrupts" property, update the examples section.
>
> Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
> ---
>
> Changes in v9: None
> Changes in v8: None
> Changes in v7: None
> Changes in v6: None
> Changes in v4: None
>
> Documentation/devicetree/bindings/mfd/act8945a.txt | 22 +++++++++++++++-------
> 1 file changed, 15 insertions(+), 7 deletions(-)
This is a functional change. I'll require a DT Ack.
> diff --git a/Documentation/devicetree/bindings/mfd/act8945a.txt b/Documentation/devicetree/bindings/mfd/act8945a.txt
> index f712830..462819a 100644
> --- a/Documentation/devicetree/bindings/mfd/act8945a.txt
> +++ b/Documentation/devicetree/bindings/mfd/act8945a.txt
> @@ -14,13 +14,6 @@ Example:
> reg = <0x5b>;
> status = "okay";
>
> - pinctrl-names = "default";
> - pinctrl-0 = <&pinctrl_charger_chglev>;
> - active-semi,chglev-gpio = <&pioA 12 GPIO_ACTIVE_HIGH>;
> - active-semi,input-voltage-threshold-microvolt = <6600>;
> - active-semi,precondition-timeout = <40>;
> - active-semi,total-timeout = <3>;
> -
> active-semi,vsel-high;
>
> regulators {
> @@ -73,4 +66,19 @@ Example:
> regulator-always-on;
> };
> };
> +
> + charger {
> + compatible = "active-semi,act8945a-charger";
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>;
> + interrupt-parent = <&pioA>;
> + interrupts = <45 GPIO_ACTIVE_LOW>;
> +
> + active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;
> + active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;
> + active-semi,input-voltage-threshold-microvolt = <6600>;
> + active-semi,precondition-timeout = <40>;
> + active-semi,total-timeout = <3>;
> + status = "okay";
> + };
> };
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH v9 1/4] power: act8945a_charger: Add capacity level property
2016-09-01 9:29 ` Wenyou Yang
@ 2016-09-01 12:43 ` Sebastian Reichel
-1 siblings, 0 replies; 29+ messages in thread
From: Sebastian Reichel @ 2016-09-01 12:43 UTC (permalink / raw)
To: Wenyou Yang
Cc: Dmitry Eremin-Solenikov, David Woodhouse, Rob Herring,
Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, Lee Jones,
Nicolas Ferre, Alexandre Belloni, linux-kernel, Wenyou Yang,
devicetree, linux-arm-kernel, linux-pm
[-- Attachment #1: Type: text/plain, Size: 313 bytes --]
Hi,
On Thu, Sep 01, 2016 at 05:29:58PM +0800, Wenyou Yang wrote:
> Add the power supply capacity level property, it corresponds to
> POWER_SUPPLY_CAPACITY_LEVEL_*.
>
> It also utilizes the precision voltage detector function module
> to catch the low battery voltage.
Thanks, queued.
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH v9 1/4] power: act8945a_charger: Add capacity level property
@ 2016-09-01 12:43 ` Sebastian Reichel
0 siblings, 0 replies; 29+ messages in thread
From: Sebastian Reichel @ 2016-09-01 12:43 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Thu, Sep 01, 2016 at 05:29:58PM +0800, Wenyou Yang wrote:
> Add the power supply capacity level property, it corresponds to
> POWER_SUPPLY_CAPACITY_LEVEL_*.
>
> It also utilizes the precision voltage detector function module
> to catch the low battery voltage.
Thanks, queued.
-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160901/29515981/attachment-0001.sig>
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH v9 2/4] power: act8945a_charger: Add max current property
2016-09-01 9:29 ` Wenyou Yang
@ 2016-09-01 12:44 ` Sebastian Reichel
-1 siblings, 0 replies; 29+ messages in thread
From: Sebastian Reichel @ 2016-09-01 12:44 UTC (permalink / raw)
To: Wenyou Yang
Cc: Dmitry Eremin-Solenikov, David Woodhouse, Rob Herring,
Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, Lee Jones,
Nicolas Ferre, Alexandre Belloni, linux-kernel, Wenyou Yang,
devicetree, linux-arm-kernel, linux-pm
[-- Attachment #1: Type: text/plain, Size: 244 bytes --]
Hi,
On Thu, Sep 01, 2016 at 05:29:59PM +0800, Wenyou Yang wrote:
> Add the power supply's current max property,
> POWER_SUPPLY_PROP_CURRENT_MAX.
>
> Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Thanks, queued.
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH v9 2/4] power: act8945a_charger: Add max current property
@ 2016-09-01 12:44 ` Sebastian Reichel
0 siblings, 0 replies; 29+ messages in thread
From: Sebastian Reichel @ 2016-09-01 12:44 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Thu, Sep 01, 2016 at 05:29:59PM +0800, Wenyou Yang wrote:
> Add the power supply's current max property,
> POWER_SUPPLY_PROP_CURRENT_MAX.
>
> Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Thanks, queued.
-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160901/a2e21344/attachment.sig>
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
2016-09-01 11:22 ` Lee Jones
@ 2016-09-01 12:47 ` Sebastian Reichel
-1 siblings, 0 replies; 29+ messages in thread
From: Sebastian Reichel @ 2016-09-01 12:47 UTC (permalink / raw)
To: Lee Jones
Cc: Wenyou Yang, Dmitry Eremin-Solenikov, David Woodhouse,
Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Nicolas Ferre, Alexandre Belloni, linux-kernel, Wenyou Yang,
devicetree, linux-arm-kernel, linux-pm
[-- Attachment #1: Type: text/plain, Size: 794 bytes --]
Hi Lee,
On Thu, Sep 01, 2016 at 12:22:51PM +0100, Lee Jones wrote:
> On Thu, 01 Sep 2016, Wenyou Yang wrote:
>
> > Since the act8945a-charger is regarded as a sub-device and it using
> > "interrupts" property, update the examples section.
> >
> > Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
> > ---
> >
> > Changes in v9: None
> > Changes in v8: None
> > Changes in v7: None
> > Changes in v6: None
> > Changes in v4: None
> >
> > Documentation/devicetree/bindings/mfd/act8945a.txt | 22 +++++++++++++++-------
> > 1 file changed, 15 insertions(+), 7 deletions(-)
>
> This is a functional change. I'll require a DT Ack.
Wenyou Yang forgot to take over Rob's Acked-By from the previous
version: https://patchwork.kernel.org/patch/9298871/
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
@ 2016-09-01 12:47 ` Sebastian Reichel
0 siblings, 0 replies; 29+ messages in thread
From: Sebastian Reichel @ 2016-09-01 12:47 UTC (permalink / raw)
To: linux-arm-kernel
Hi Lee,
On Thu, Sep 01, 2016 at 12:22:51PM +0100, Lee Jones wrote:
> On Thu, 01 Sep 2016, Wenyou Yang wrote:
>
> > Since the act8945a-charger is regarded as a sub-device and it using
> > "interrupts" property, update the examples section.
> >
> > Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
> > ---
> >
> > Changes in v9: None
> > Changes in v8: None
> > Changes in v7: None
> > Changes in v6: None
> > Changes in v4: None
> >
> > Documentation/devicetree/bindings/mfd/act8945a.txt | 22 +++++++++++++++-------
> > 1 file changed, 15 insertions(+), 7 deletions(-)
>
> This is a functional change. I'll require a DT Ack.
Wenyou Yang forgot to take over Rob's Acked-By from the previous
version: https://patchwork.kernel.org/patch/9298871/
-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160901/51e83537/attachment.sig>
^ permalink raw reply [flat|nested] 29+ messages in thread
* RE: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
2016-09-01 12:47 ` Sebastian Reichel
(?)
@ 2016-09-01 12:52 ` Wenyou.Yang-UWL1GkI3JZL3oGB3hsPCZA
-1 siblings, 0 replies; 29+ messages in thread
From: Wenyou.Yang @ 2016-09-01 12:52 UTC (permalink / raw)
To: sre, lee.jones
Cc: dbaryshkov, dwmw2, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak, nicolas.ferre, alexandre.belloni,
linux-kernel, devicetree, linux-arm-kernel, linux-pm
> -----Original Message-----
> From: Sebastian Reichel [mailto:sre@kernel.org]
> Sent: 2016年9月1日 20:48
> To: Lee Jones <lee.jones@linaro.org>
> Cc: Wenyou Yang - A41535 <Wenyou.Yang@microchip.com>; Dmitry Eremin-
> Solenikov <dbaryshkov@gmail.com>; David Woodhouse
> <dwmw2@infradead.org>; Rob Herring <robh+dt@kernel.org>; Pawel Moll
> <pawel.moll@arm.com>; Mark Rutland <mark.rutland@arm.com>; Ian Campbell
> <ijc+devicetree@hellion.org.uk>; Kumar Gala <galak@codeaurora.org>; Nicolas
> Ferre <nicolas.ferre@atmel.com>; Alexandre Belloni <alexandre.belloni@free-
> electrons.com>; linux-kernel@vger.kernel.org; Wenyou Yang - A41535
> <Wenyou.Yang@microchip.com>; devicetree@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-pm@vger.kernel.org
> Subject: Re: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
>
> Hi Lee,
>
> On Thu, Sep 01, 2016 at 12:22:51PM +0100, Lee Jones wrote:
> > On Thu, 01 Sep 2016, Wenyou Yang wrote:
> >
> > > Since the act8945a-charger is regarded as a sub-device and it using
> > > "interrupts" property, update the examples section.
> > >
> > > Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
> > > ---
> > >
> > > Changes in v9: None
> > > Changes in v8: None
> > > Changes in v7: None
> > > Changes in v6: None
> > > Changes in v4: None
> > >
> > > Documentation/devicetree/bindings/mfd/act8945a.txt | 22
> > > +++++++++++++++-------
> > > 1 file changed, 15 insertions(+), 7 deletions(-)
> >
> > This is a functional change. I'll require a DT Ack.
>
> Wenyou Yang forgot to take over Rob's Acked-By from the previous
> version: https://patchwork.kernel.org/patch/9298871/
Yes, sorry. I forgot.
Best Regards,
Wenyou Yang
^ permalink raw reply [flat|nested] 29+ messages in thread
* RE: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
@ 2016-09-01 12:52 ` Wenyou.Yang-UWL1GkI3JZL3oGB3hsPCZA
0 siblings, 0 replies; 29+ messages in thread
From: Wenyou.Yang-UWL1GkI3JZL3oGB3hsPCZA @ 2016-09-01 12:52 UTC (permalink / raw)
To: sre-DgEjT+Ai2ygdnm+yROfE0A, lee.jones-QSEj5FYQhm4dnm+yROfE0A
Cc: dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w, dwmw2-wEGCiKHe2LqWVfeAwA7xHQ,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8,
mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
galak-sgV2jX0FEOL9JmXXK+q4OQ,
nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w,
alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-pm-u79uwXL29TY76Z2rM5mHXA
> -----Original Message-----
> From: Sebastian Reichel [mailto:sre@kernel.org]
> Sent: 2016年9月1日 20:48
> To: Lee Jones <lee.jones@linaro.org>
> Cc: Wenyou Yang - A41535 <Wenyou.Yang@microchip.com>; Dmitry Eremin-
> Solenikov <dbaryshkov@gmail.com>; David Woodhouse
> <dwmw2@infradead.org>; Rob Herring <robh+dt@kernel.org>; Pawel Moll
> <pawel.moll@arm.com>; Mark Rutland <mark.rutland@arm.com>; Ian Campbell
> <ijc+devicetree@hellion.org.uk>; Kumar Gala <galak@codeaurora.org>; Nicolas
> Ferre <nicolas.ferre@atmel.com>; Alexandre Belloni <alexandre.belloni@free-
> electrons.com>; linux-kernel@vger.kernel.org; Wenyou Yang - A41535
> <Wenyou.Yang@microchip.com>; devicetree@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-pm@vger.kernel.org
> Subject: Re: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
>
> Hi Lee,
>
> On Thu, Sep 01, 2016 at 12:22:51PM +0100, Lee Jones wrote:
> > On Thu, 01 Sep 2016, Wenyou Yang wrote:
> >
> > > Since the act8945a-charger is regarded as a sub-device and it using
> > > "interrupts" property, update the examples section.
> > >
> > > Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
> > > ---
> > >
> > > Changes in v9: None
> > > Changes in v8: None
> > > Changes in v7: None
> > > Changes in v6: None
> > > Changes in v4: None
> > >
> > > Documentation/devicetree/bindings/mfd/act8945a.txt | 22
> > > +++++++++++++++-------
> > > 1 file changed, 15 insertions(+), 7 deletions(-)
> >
> > This is a functional change. I'll require a DT Ack.
>
> Wenyou Yang forgot to take over Rob's Acked-By from the previous
> version: https://patchwork.kernel.org/patch/9298871/
Yes, sorry. I forgot.
Best Regards,
Wenyou Yang
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
@ 2016-09-01 12:52 ` Wenyou.Yang-UWL1GkI3JZL3oGB3hsPCZA
0 siblings, 0 replies; 29+ messages in thread
From: Wenyou.Yang at microchip.com @ 2016-09-01 12:52 UTC (permalink / raw)
To: linux-arm-kernel
> -----Original Message-----
> From: Sebastian Reichel [mailto:sre at kernel.org]
> Sent: 2016?9?1? 20:48
> To: Lee Jones <lee.jones@linaro.org>
> Cc: Wenyou Yang - A41535 <Wenyou.Yang@microchip.com>; Dmitry Eremin-
> Solenikov <dbaryshkov@gmail.com>; David Woodhouse
> <dwmw2@infradead.org>; Rob Herring <robh+dt@kernel.org>; Pawel Moll
> <pawel.moll@arm.com>; Mark Rutland <mark.rutland@arm.com>; Ian Campbell
> <ijc+devicetree@hellion.org.uk>; Kumar Gala <galak@codeaurora.org>; Nicolas
> Ferre <nicolas.ferre@atmel.com>; Alexandre Belloni <alexandre.belloni@free-
> electrons.com>; linux-kernel at vger.kernel.org; Wenyou Yang - A41535
> <Wenyou.Yang@microchip.com>; devicetree at vger.kernel.org; linux-arm-
> kernel at lists.infradead.org; linux-pm at vger.kernel.org
> Subject: Re: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
>
> Hi Lee,
>
> On Thu, Sep 01, 2016 at 12:22:51PM +0100, Lee Jones wrote:
> > On Thu, 01 Sep 2016, Wenyou Yang wrote:
> >
> > > Since the act8945a-charger is regarded as a sub-device and it using
> > > "interrupts" property, update the examples section.
> > >
> > > Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
> > > ---
> > >
> > > Changes in v9: None
> > > Changes in v8: None
> > > Changes in v7: None
> > > Changes in v6: None
> > > Changes in v4: None
> > >
> > > Documentation/devicetree/bindings/mfd/act8945a.txt | 22
> > > +++++++++++++++-------
> > > 1 file changed, 15 insertions(+), 7 deletions(-)
> >
> > This is a functional change. I'll require a DT Ack.
>
> Wenyou Yang forgot to take over Rob's Acked-By from the previous
> version: https://patchwork.kernel.org/patch/9298871/
Yes, sorry. I forgot.
Best Regards,
Wenyou Yang
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
2016-09-01 12:52 ` Wenyou.Yang-UWL1GkI3JZL3oGB3hsPCZA
@ 2016-09-01 13:56 ` Lee Jones
-1 siblings, 0 replies; 29+ messages in thread
From: Lee Jones @ 2016-09-01 13:56 UTC (permalink / raw)
To: Wenyou.Yang
Cc: sre, dbaryshkov, dwmw2, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak, nicolas.ferre, alexandre.belloni,
linux-kernel, devicetree, linux-arm-kernel, linux-pm
On Thu, 01 Sep 2016, Wenyou.Yang@microchip.com wrote:
>
>
> > -----Original Message-----
> > From: Sebastian Reichel [mailto:sre@kernel.org]
> > Sent: 2016年9月1日 20:48
> > To: Lee Jones <lee.jones@linaro.org>
> > Cc: Wenyou Yang - A41535 <Wenyou.Yang@microchip.com>; Dmitry Eremin-
> > Solenikov <dbaryshkov@gmail.com>; David Woodhouse
> > <dwmw2@infradead.org>; Rob Herring <robh+dt@kernel.org>; Pawel Moll
> > <pawel.moll@arm.com>; Mark Rutland <mark.rutland@arm.com>; Ian Campbell
> > <ijc+devicetree@hellion.org.uk>; Kumar Gala <galak@codeaurora.org>; Nicolas
> > Ferre <nicolas.ferre@atmel.com>; Alexandre Belloni <alexandre.belloni@free-
> > electrons.com>; linux-kernel@vger.kernel.org; Wenyou Yang - A41535
> > <Wenyou.Yang@microchip.com>; devicetree@vger.kernel.org; linux-arm-
> > kernel@lists.infradead.org; linux-pm@vger.kernel.org
> > Subject: Re: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
> >
> > Hi Lee,
> >
> > On Thu, Sep 01, 2016 at 12:22:51PM +0100, Lee Jones wrote:
> > > On Thu, 01 Sep 2016, Wenyou Yang wrote:
> > >
> > > > Since the act8945a-charger is regarded as a sub-device and it using
> > > > "interrupts" property, update the examples section.
> > > >
> > > > Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
> > > > ---
> > > >
> > > > Changes in v9: None
> > > > Changes in v8: None
> > > > Changes in v7: None
> > > > Changes in v6: None
> > > > Changes in v4: None
> > > >
> > > > Documentation/devicetree/bindings/mfd/act8945a.txt | 22
> > > > +++++++++++++++-------
> > > > 1 file changed, 15 insertions(+), 7 deletions(-)
> > >
> > > This is a functional change. I'll require a DT Ack.
> >
> > Wenyou Yang forgot to take over Rob's Acked-By from the previous
> > version: https://patchwork.kernel.org/patch/9298871/
>
> Yes, sorry. I forgot.
Very well.
Applied, thanks.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
@ 2016-09-01 13:56 ` Lee Jones
0 siblings, 0 replies; 29+ messages in thread
From: Lee Jones @ 2016-09-01 13:56 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 01 Sep 2016, Wenyou.Yang at microchip.com wrote:
>
>
> > -----Original Message-----
> > From: Sebastian Reichel [mailto:sre at kernel.org]
> > Sent: 2016?9?1? 20:48
> > To: Lee Jones <lee.jones@linaro.org>
> > Cc: Wenyou Yang - A41535 <Wenyou.Yang@microchip.com>; Dmitry Eremin-
> > Solenikov <dbaryshkov@gmail.com>; David Woodhouse
> > <dwmw2@infradead.org>; Rob Herring <robh+dt@kernel.org>; Pawel Moll
> > <pawel.moll@arm.com>; Mark Rutland <mark.rutland@arm.com>; Ian Campbell
> > <ijc+devicetree@hellion.org.uk>; Kumar Gala <galak@codeaurora.org>; Nicolas
> > Ferre <nicolas.ferre@atmel.com>; Alexandre Belloni <alexandre.belloni@free-
> > electrons.com>; linux-kernel at vger.kernel.org; Wenyou Yang - A41535
> > <Wenyou.Yang@microchip.com>; devicetree at vger.kernel.org; linux-arm-
> > kernel at lists.infradead.org; linux-pm at vger.kernel.org
> > Subject: Re: [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example
> >
> > Hi Lee,
> >
> > On Thu, Sep 01, 2016 at 12:22:51PM +0100, Lee Jones wrote:
> > > On Thu, 01 Sep 2016, Wenyou Yang wrote:
> > >
> > > > Since the act8945a-charger is regarded as a sub-device and it using
> > > > "interrupts" property, update the examples section.
> > > >
> > > > Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
> > > > ---
> > > >
> > > > Changes in v9: None
> > > > Changes in v8: None
> > > > Changes in v7: None
> > > > Changes in v6: None
> > > > Changes in v4: None
> > > >
> > > > Documentation/devicetree/bindings/mfd/act8945a.txt | 22
> > > > +++++++++++++++-------
> > > > 1 file changed, 15 insertions(+), 7 deletions(-)
> > >
> > > This is a functional change. I'll require a DT Ack.
> >
> > Wenyou Yang forgot to take over Rob's Acked-By from the previous
> > version: https://patchwork.kernel.org/patch/9298871/
>
> Yes, sorry. I forgot.
Very well.
Applied, thanks.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 29+ messages in thread
end of thread, other threads:[~2016-09-01 13:56 UTC | newest]
Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-01 9:29 [PATCH v9 0/4] power: act8945a_charger: Improvements Wenyou Yang
2016-09-01 9:29 ` Wenyou Yang
2016-09-01 9:29 ` Wenyou Yang
2016-09-01 9:29 ` [PATCH v9 1/4] power: act8945a_charger: Add capacity level property Wenyou Yang
2016-09-01 9:29 ` Wenyou Yang
2016-09-01 9:29 ` Wenyou Yang
2016-09-01 12:43 ` Sebastian Reichel
2016-09-01 12:43 ` Sebastian Reichel
2016-09-01 9:29 ` [PATCH v9 2/4] power: act8945a_charger: Add max current property Wenyou Yang
2016-09-01 9:29 ` Wenyou Yang
2016-09-01 9:29 ` Wenyou Yang
2016-09-01 12:44 ` Sebastian Reichel
2016-09-01 12:44 ` Sebastian Reichel
2016-09-01 9:30 ` [PATCH v9 3/4] doc: bindings: mfd: act8945a: Update the example Wenyou Yang
2016-09-01 9:30 ` Wenyou Yang
2016-09-01 9:30 ` Wenyou Yang
2016-09-01 11:22 ` Lee Jones
2016-09-01 11:22 ` Lee Jones
2016-09-01 11:22 ` Lee Jones
2016-09-01 12:47 ` Sebastian Reichel
2016-09-01 12:47 ` Sebastian Reichel
2016-09-01 12:52 ` Wenyou.Yang
2016-09-01 12:52 ` Wenyou.Yang at microchip.com
2016-09-01 12:52 ` Wenyou.Yang-UWL1GkI3JZL3oGB3hsPCZA
2016-09-01 13:56 ` Lee Jones
2016-09-01 13:56 ` Lee Jones
2016-09-01 9:30 ` [PATCH v9 4/4] ARM: at91/dt: sama5d2_xplained: Add act8945a-charger node Wenyou Yang
2016-09-01 9:30 ` Wenyou Yang
2016-09-01 9:30 ` Wenyou Yang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.