Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1491600 > unrolled thread
| Started by | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> |
|---|---|
| First post | 2016-09-27 01:40 +0200 |
| Last post | 2016-09-27 16:00 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 1/3] mfd: max77693: Add defines for charger current control Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> - 2016-09-27 01:40 +0200
Re: [PATCH 1/3] mfd: max77693: Add defines for charger current control Krzysztof Kozlowski <krzk@kernel.org> - 2016-09-27 10:10 +0200
Re: [PATCH 1/3] mfd: max77693: Add defines for charger current control Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> - 2016-09-27 16:00 +0200
| From | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> |
|---|---|
| Date | 2016-09-27 01:40 +0200 |
| Subject | [PATCH 1/3] mfd: max77693: Add defines for charger current control |
| Message-ID | <slNF7-1NX-1@gated-at.bofh.it> |
This prepares for an updated regulator and charger driver. The defines
are needed to set the maximum input current and the fast charge
current.
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
---
include/linux/mfd/max77693-private.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h
index 3c7a63b..ca18344 100644
--- a/include/linux/mfd/max77693-private.h
+++ b/include/linux/mfd/max77693-private.h
@@ -222,6 +222,9 @@ enum max77693_charger_battery_state {
#define CHG_CNFG_00_CHG_MASK 0x1
#define CHG_CNFG_00_BUCK_MASK 0x4
+/* MAX77693 CHG_CNFG_02 register */
+#define CHG_CNFG_02_CC_MASK 0x3F
+
/* MAX77693_CHG_REG_CHG_CNFG_01 register */
#define CHG_CNFG_01_FCHGTIME_SHIFT 0
#define CHG_CNFG_01_CHGRSTRT_SHIFT 4
@@ -258,6 +261,10 @@ enum max77693_charger_battery_state {
/* MAX77693 CHG_CNFG_09 Register */
#define CHG_CNFG_09_CHGIN_ILIM_MASK 0x7F
+#define CHG_CNFG_09_CHGIN_ILIM_500_MAX 500000
+#define CHG_CNFG_09_CHGIN_ILIM_500_MIN 470000
+#define CHG_CNFG_09_CHGIN_ILIM_0_MAX 60000
+#define CHG_CNFG_09_CHGIN_ILIM_0_MIN 0
/* MAX77693 CHG_CTRL Register */
#define SAFEOUT_CTRL_SAFEOUT1_MASK 0x3
--
2.8.0.rc3
[toc] | [next] | [standalone]
| From | Krzysztof Kozlowski <krzk@kernel.org> |
|---|---|
| Date | 2016-09-27 10:10 +0200 |
| Subject | Re: [PATCH 1/3] mfd: max77693: Add defines for charger current control |
| Message-ID | <slVCF-74o-21@gated-at.bofh.it> |
| In reply to | #1491600 |
On Tue, Sep 27, 2016 at 01:31:08AM +0200, Wolfgang Wiedmeyer wrote:
> This prepares for an updated regulator and charger driver. The defines
> are needed to set the maximum input current and the fast charge
> current.
>
> Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
This shouldn't be separate patch, because:
1. You are touching later power and regulator so this patch should be
applied to one and then pulled by other... a lot of unneeded work.
2. It is difficult to find which new code is needed for which driver.
Simpler approach might work - when changing the regulator or psy driver,
just change the header as needed. Unless there are conflicts and both of
them need the same?
Best regards,
Krzysztof
> ---
> include/linux/mfd/max77693-private.h | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h
> index 3c7a63b..ca18344 100644
> --- a/include/linux/mfd/max77693-private.h
> +++ b/include/linux/mfd/max77693-private.h
> @@ -222,6 +222,9 @@ enum max77693_charger_battery_state {
> #define CHG_CNFG_00_CHG_MASK 0x1
> #define CHG_CNFG_00_BUCK_MASK 0x4
>
> +/* MAX77693 CHG_CNFG_02 register */
> +#define CHG_CNFG_02_CC_MASK 0x3F
> +
> /* MAX77693_CHG_REG_CHG_CNFG_01 register */
> #define CHG_CNFG_01_FCHGTIME_SHIFT 0
> #define CHG_CNFG_01_CHGRSTRT_SHIFT 4
> @@ -258,6 +261,10 @@ enum max77693_charger_battery_state {
>
> /* MAX77693 CHG_CNFG_09 Register */
> #define CHG_CNFG_09_CHGIN_ILIM_MASK 0x7F
> +#define CHG_CNFG_09_CHGIN_ILIM_500_MAX 500000
> +#define CHG_CNFG_09_CHGIN_ILIM_500_MIN 470000
> +#define CHG_CNFG_09_CHGIN_ILIM_0_MAX 60000
> +#define CHG_CNFG_09_CHGIN_ILIM_0_MIN 0
>
> /* MAX77693 CHG_CTRL Register */
> #define SAFEOUT_CTRL_SAFEOUT1_MASK 0x3
> --
> 2.8.0.rc3
>
[toc] | [prev] | [next] | [standalone]
| From | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> |
|---|---|
| Date | 2016-09-27 16:00 +0200 |
| Message-ID | <sm15n-1KC-11@gated-at.bofh.it> |
| In reply to | #1491746 |
[Multipart message — attachments visible in raw view] — view raw
Krzysztof Kozlowski writes:
> On Tue, Sep 27, 2016 at 01:31:08AM +0200, Wolfgang Wiedmeyer wrote:
>> This prepares for an updated regulator and charger driver. The defines
>> are needed to set the maximum input current and the fast charge
>> current.
>>
>> Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
>
> This shouldn't be separate patch, because:
> 1. You are touching later power and regulator so this patch should be
> applied to one and then pulled by other... a lot of unneeded work.
> 2. It is difficult to find which new code is needed for which driver.
>
> Simpler approach might work - when changing the regulator or psy driver,
> just change the header as needed. Unless there are conflicts and both of
> them need the same?
No, no conflicts. I will change the header as needed and won't do a
separate patch.
Thanks,
Wolfgang
> Best regards,
> Krzysztof
>
>> ---
>> include/linux/mfd/max77693-private.h | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h
>> index 3c7a63b..ca18344 100644
>> --- a/include/linux/mfd/max77693-private.h
>> +++ b/include/linux/mfd/max77693-private.h
>> @@ -222,6 +222,9 @@ enum max77693_charger_battery_state {
>> #define CHG_CNFG_00_CHG_MASK 0x1
>> #define CHG_CNFG_00_BUCK_MASK 0x4
>>
>> +/* MAX77693 CHG_CNFG_02 register */
>> +#define CHG_CNFG_02_CC_MASK 0x3F
>> +
>> /* MAX77693_CHG_REG_CHG_CNFG_01 register */
>> #define CHG_CNFG_01_FCHGTIME_SHIFT 0
>> #define CHG_CNFG_01_CHGRSTRT_SHIFT 4
>> @@ -258,6 +261,10 @@ enum max77693_charger_battery_state {
>>
>> /* MAX77693 CHG_CNFG_09 Register */
>> #define CHG_CNFG_09_CHGIN_ILIM_MASK 0x7F
>> +#define CHG_CNFG_09_CHGIN_ILIM_500_MAX 500000
>> +#define CHG_CNFG_09_CHGIN_ILIM_500_MIN 470000
>> +#define CHG_CNFG_09_CHGIN_ILIM_0_MAX 60000
>> +#define CHG_CNFG_09_CHGIN_ILIM_0_MIN 0
>>
>> /* MAX77693 CHG_CTRL Register */
>> #define SAFEOUT_CTRL_SAFEOUT1_MASK 0x3
>> --
>> 2.8.0.rc3
>>
--
Website: https://fossencdi.org
OpenPGP: 0F30 D1A0 2F73 F70A 6FEE 048E 5816 A24C 1075 7FC4
Key download: https://wiedmeyer.de/keys/ww.asc
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web