Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On Fri, 27 Mar 2015, Beomho Seo wrote: > On 03/27/2015 04:57 PM, Lee Jones wrote: > > On Fri, 27 Mar 2015, Beomho Seo wrote: > >> On 03/26/2015 10:54 PM, Lee Jones wrote: > >>> On Thu, 26 Mar 2015, Beomho Seo wrote: > On 03/24/2015 05:38 PM, Krzysztof Kozlowski wrote: > > 2015-03-24 9:01 GMT+01:00 Beomho Seo : > >> On 03/10/2015 10:44 PM, Beomho Seo wrote: > >>> On 03/09/2015 09:13 PM, Krzysztof Kozlowski wrote: > On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote: > > On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: > >> 2015-03-09 1:35 GMT+01:00 Beomho Seo : > >>> On 03/08/2015 05:13 AM, Sebastian Reichel wrote: > On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: > > From: Beomho Seo > > > > This patch adds device driver of max77843 charger. This driver > > provide > > initialize each charging mode(e.g. fast charge, top-off mode > > and constant > > charging mode so on.). Additionally, control charging paramters > > to use > > i2c interface. > > > > Cc: Sebastian Reichel > > Signed-off-by: Beomho Seo > > Reviewed-By: Sebastian Reichel > > I can't take it as is, since it depends on the private header > file > of PATCHv1. > > -- Sebastian > > >>> > >>> This patch reviewed by Sebastian. > >>> Could you Please merge that your git tree ? > >> > >> Hi, > >> > >> ... and again we are adding a new driver for very similar chipset > >> to > >> already supported. I looked at spec and the charger's registers are > >> almost the same as for max77693. Their layout and addresses are the > >> same. I see some minor differences, probably the most important > >> would > >> be different values current (fast-charge, top-off). But still 90% > >> of > >> registers are the same... Do we really have to add new driver? > >> > >> Best regards, > >> Krzysztof > >> > > > > Hi, > > > > Thank you for your comment. As you say, both chip set are similar. > > But new driver need for support max77843. It is support different > > below > > - Provide Battery presence information. > > Another set of power supply properties could be added for that chip. > This way the get_property() function would be the same but actually > the > POWER_SUPPLY_PROP_PRESENT won't be called for max77693. > > > - Can OTG FET control. > > Where the OTG FET feature is it enabled in your driver? I couldn't > find > it. > > >>> > >>> Sorry. This driver don't control OTG FET feature. > >>> > > - Bigger Fast charge current, Top Off current Threshold selection. > > - Various and bigger OTG current limitation. > > - Bigger primary charger termination voltage setting. > > - Different maximum input current limit selection(Different step). > > Yes, I mentioned some of these differences (the Fast/top-off > differences). These are differences in values so it does not require > new > driver. There is need to develop new driver just to support different > current (3.0 A instead of 2.1 A) or voltage threshold. > > >>> > >>> They are different charging current, OTG current limitation, top off > >>> current, > >>> charging limitation value. In case OTG current limitation different > >>> not > >>> limitation value but using register bit(max77843 use[7:6] max77693 > >>> use[7] > >>> bit only). Even if this driver not support all feature, some register > >>> different with max77693(support value, use register bit). > >>> > >>> If this driver will combined with max77693 may even be beneficial for > >>> new Maxim driver. But the present, this driver is related with > >>> max77843 core driver and max77843-regulator. So I hope this driver > >>> merge first. And then will extend two driver(max77843 charger and > >>> max77693 charger). > > > > I still prefer merging common drivers into one instead of creating > > some more of them. > > However I understand your point and I am not entirely opposed against. > > Especially that you invested quite a bit of time for developing this > > and my feedback was quite late. To summarize I am fine with your > > approach. > > > > Best regards, > > Krzysztof > > > > Dear Lee Jones, > > Could you please merge that your git tree ? > >>> > >>> Sorry, I'm lost. Why am I
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On 03/27/2015 04:57 PM, Lee Jones wrote: > On Fri, 27 Mar 2015, Beomho Seo wrote: >> On 03/26/2015 10:54 PM, Lee Jones wrote: >>> On Thu, 26 Mar 2015, Beomho Seo wrote: On 03/24/2015 05:38 PM, Krzysztof Kozlowski wrote: > 2015-03-24 9:01 GMT+01:00 Beomho Seo : >> On 03/10/2015 10:44 PM, Beomho Seo wrote: >>> On 03/09/2015 09:13 PM, Krzysztof Kozlowski wrote: On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote: > On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: >> 2015-03-09 1:35 GMT+01:00 Beomho Seo : >>> On 03/08/2015 05:13 AM, Sebastian Reichel wrote: On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: > From: Beomho Seo > > This patch adds device driver of max77843 charger. This driver > provide > initialize each charging mode(e.g. fast charge, top-off mode and > constant > charging mode so on.). Additionally, control charging paramters > to use > i2c interface. > > Cc: Sebastian Reichel > Signed-off-by: Beomho Seo Reviewed-By: Sebastian Reichel I can't take it as is, since it depends on the private header file of PATCHv1. -- Sebastian >>> >>> This patch reviewed by Sebastian. >>> Could you Please merge that your git tree ? >> >> Hi, >> >> ... and again we are adding a new driver for very similar chipset to >> already supported. I looked at spec and the charger's registers are >> almost the same as for max77693. Their layout and addresses are the >> same. I see some minor differences, probably the most important would >> be different values current (fast-charge, top-off). But still 90% of >> registers are the same... Do we really have to add new driver? >> >> Best regards, >> Krzysztof >> > > Hi, > > Thank you for your comment. As you say, both chip set are similar. > But new driver need for support max77843. It is support different > below > - Provide Battery presence information. Another set of power supply properties could be added for that chip. This way the get_property() function would be the same but actually the POWER_SUPPLY_PROP_PRESENT won't be called for max77693. > - Can OTG FET control. Where the OTG FET feature is it enabled in your driver? I couldn't find it. >>> >>> Sorry. This driver don't control OTG FET feature. >>> > - Bigger Fast charge current, Top Off current Threshold selection. > - Various and bigger OTG current limitation. > - Bigger primary charger termination voltage setting. > - Different maximum input current limit selection(Different step). Yes, I mentioned some of these differences (the Fast/top-off differences). These are differences in values so it does not require new driver. There is need to develop new driver just to support different current (3.0 A instead of 2.1 A) or voltage threshold. >>> >>> They are different charging current, OTG current limitation, top off >>> current, >>> charging limitation value. In case OTG current limitation different not >>> limitation value but using register bit(max77843 use[7:6] max77693 >>> use[7] >>> bit only). Even if this driver not support all feature, some register >>> different with max77693(support value, use register bit). >>> >>> If this driver will combined with max77693 may even be beneficial for >>> new Maxim driver. But the present, this driver is related with >>> max77843 core driver and max77843-regulator. So I hope this driver >>> merge first. And then will extend two driver(max77843 charger and >>> max77693 charger). > > I still prefer merging common drivers into one instead of creating > some more of them. > However I understand your point and I am not entirely opposed against. > Especially that you invested quite a bit of time for developing this > and my feedback was quite late. To summarize I am fine with your > approach. > > Best regards, > Krzysztof > Dear Lee Jones, Could you please merge that your git tree ? >>> >>> Sorry, I'm lost. Why am I taking this though the MFD tree? What >>> patches are left? Where are they going? Am I taking any other >>> patches? >>> >> >> Max77843 charger driver is max77843 mfd core dependency. > > What kind of dependancy? Runtime or build? Where is the patch that > it depends on? Is it in -next for in Mainline already? > Build. Max77843 charger driver
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On Fri, 27 Mar 2015, Beomho Seo wrote: > On 03/26/2015 10:54 PM, Lee Jones wrote: > > On Thu, 26 Mar 2015, Beomho Seo wrote: > >> On 03/24/2015 05:38 PM, Krzysztof Kozlowski wrote: > >>> 2015-03-24 9:01 GMT+01:00 Beomho Seo : > On 03/10/2015 10:44 PM, Beomho Seo wrote: > > On 03/09/2015 09:13 PM, Krzysztof Kozlowski wrote: > >> On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote: > >>> On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: > 2015-03-09 1:35 GMT+01:00 Beomho Seo : > > On 03/08/2015 05:13 AM, Sebastian Reichel wrote: > >> On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: > >>> From: Beomho Seo > >>> > >>> This patch adds device driver of max77843 charger. This driver > >>> provide > >>> initialize each charging mode(e.g. fast charge, top-off mode and > >>> constant > >>> charging mode so on.). Additionally, control charging paramters > >>> to use > >>> i2c interface. > >>> > >>> Cc: Sebastian Reichel > >>> Signed-off-by: Beomho Seo > >> > >> Reviewed-By: Sebastian Reichel > >> > >> I can't take it as is, since it depends on the private header file > >> of PATCHv1. > >> > >> -- Sebastian > >> > > > > This patch reviewed by Sebastian. > > Could you Please merge that your git tree ? > > Hi, > > ... and again we are adding a new driver for very similar chipset to > already supported. I looked at spec and the charger's registers are > almost the same as for max77693. Their layout and addresses are the > same. I see some minor differences, probably the most important would > be different values current (fast-charge, top-off). But still 90% of > registers are the same... Do we really have to add new driver? > > Best regards, > Krzysztof > > >>> > >>> Hi, > >>> > >>> Thank you for your comment. As you say, both chip set are similar. > >>> But new driver need for support max77843. It is support different > >>> below > >>> - Provide Battery presence information. > >> > >> Another set of power supply properties could be added for that chip. > >> This way the get_property() function would be the same but actually the > >> POWER_SUPPLY_PROP_PRESENT won't be called for max77693. > >> > >>> - Can OTG FET control. > >> > >> Where the OTG FET feature is it enabled in your driver? I couldn't find > >> it. > >> > > > > Sorry. This driver don't control OTG FET feature. > > > >>> - Bigger Fast charge current, Top Off current Threshold selection. > >>> - Various and bigger OTG current limitation. > >>> - Bigger primary charger termination voltage setting. > >>> - Different maximum input current limit selection(Different step). > >> > >> Yes, I mentioned some of these differences (the Fast/top-off > >> differences). These are differences in values so it does not require > >> new > >> driver. There is need to develop new driver just to support different > >> current (3.0 A instead of 2.1 A) or voltage threshold. > >> > > > > They are different charging current, OTG current limitation, top off > > current, > > charging limitation value. In case OTG current limitation different not > > limitation value but using register bit(max77843 use[7:6] max77693 > > use[7] > > bit only). Even if this driver not support all feature, some register > > different with max77693(support value, use register bit). > > > > If this driver will combined with max77693 may even be beneficial for > > new Maxim driver. But the present, this driver is related with > > max77843 core driver and max77843-regulator. So I hope this driver > > merge first. And then will extend two driver(max77843 charger and > > max77693 charger). > >>> > >>> I still prefer merging common drivers into one instead of creating > >>> some more of them. > >>> However I understand your point and I am not entirely opposed against. > >>> Especially that you invested quite a bit of time for developing this > >>> and my feedback was quite late. To summarize I am fine with your > >>> approach. > >>> > >>> Best regards, > >>> Krzysztof > >>> > >> > >> Dear Lee Jones, > >> > >> Could you please merge that your git tree ? > > > > Sorry, I'm lost. Why am I taking this though the MFD tree? What > > patches are left? Where are they going? Am I taking any other > > patches? > > > > Max77843 charger driver is max77843 mfd core dependency. What kind of dependancy? Runtime or build? Where is the patch that it depends on? Is it in -next for in Mainline already? > If you think this patch will suitable for battery tree(or other tree), > I would
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On Fri, 27 Mar 2015, Beomho Seo wrote: On 03/26/2015 10:54 PM, Lee Jones wrote: On Thu, 26 Mar 2015, Beomho Seo wrote: On 03/24/2015 05:38 PM, Krzysztof Kozlowski wrote: 2015-03-24 9:01 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/10/2015 10:44 PM, Beomho Seo wrote: On 03/09/2015 09:13 PM, Krzysztof Kozlowski wrote: On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote: On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: 2015-03-09 1:35 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/08/2015 05:13 AM, Sebastian Reichel wrote: On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: From: Beomho Seo beomho@samsung.com This patch adds device driver of max77843 charger. This driver provide initialize each charging mode(e.g. fast charge, top-off mode and constant charging mode so on.). Additionally, control charging paramters to use i2c interface. Cc: Sebastian Reichel s...@kernel.org Signed-off-by: Beomho Seo beomho@samsung.com Reviewed-By: Sebastian Reichel s...@kernel.org I can't take it as is, since it depends on the private header file of PATCHv1. -- Sebastian This patch reviewed by Sebastian. Could you Please merge that your git tree ? Hi, ... and again we are adding a new driver for very similar chipset to already supported. I looked at spec and the charger's registers are almost the same as for max77693. Their layout and addresses are the same. I see some minor differences, probably the most important would be different values current (fast-charge, top-off). But still 90% of registers are the same... Do we really have to add new driver? Best regards, Krzysztof Hi, Thank you for your comment. As you say, both chip set are similar. But new driver need for support max77843. It is support different below - Provide Battery presence information. Another set of power supply properties could be added for that chip. This way the get_property() function would be the same but actually the POWER_SUPPLY_PROP_PRESENT won't be called for max77693. - Can OTG FET control. Where the OTG FET feature is it enabled in your driver? I couldn't find it. Sorry. This driver don't control OTG FET feature. - Bigger Fast charge current, Top Off current Threshold selection. - Various and bigger OTG current limitation. - Bigger primary charger termination voltage setting. - Different maximum input current limit selection(Different step). Yes, I mentioned some of these differences (the Fast/top-off differences). These are differences in values so it does not require new driver. There is need to develop new driver just to support different current (3.0 A instead of 2.1 A) or voltage threshold. They are different charging current, OTG current limitation, top off current, charging limitation value. In case OTG current limitation different not limitation value but using register bit(max77843 use[7:6] max77693 use[7] bit only). Even if this driver not support all feature, some register different with max77693(support value, use register bit). If this driver will combined with max77693 may even be beneficial for new Maxim driver. But the present, this driver is related with max77843 core driver and max77843-regulator. So I hope this driver merge first. And then will extend two driver(max77843 charger and max77693 charger). I still prefer merging common drivers into one instead of creating some more of them. However I understand your point and I am not entirely opposed against. Especially that you invested quite a bit of time for developing this and my feedback was quite late. To summarize I am fine with your approach. Best regards, Krzysztof Dear Lee Jones, Could you please merge that your git tree ? Sorry, I'm lost. Why am I taking this though the MFD tree? What patches are left? Where are they going? Am I taking any other patches? Max77843 charger driver is max77843 mfd core dependency. What kind of dependancy? Runtime or build? Where is the patch that it depends on? Is it in -next for in Mainline already? If you think this patch will suitable for battery tree(or other tree), I would like request for merge battery tree. If this patch has no build dependencies on patches which are in -next, but not in Mainline then it will have to go in via the same tree that the dependencies were applied to. If the dependencies are already in Mainline, or they are not build-deps, then it should go in via the correct tree, which I believe is Sebastian's tree. Also, I will send again this patch and device tree binding document. Either way you should do that. Mark them as RESEND instead of PATCH and apply all of the Acks you have accumulated so far. -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter |
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On Fri, 27 Mar 2015, Beomho Seo wrote: On 03/27/2015 04:57 PM, Lee Jones wrote: On Fri, 27 Mar 2015, Beomho Seo wrote: On 03/26/2015 10:54 PM, Lee Jones wrote: On Thu, 26 Mar 2015, Beomho Seo wrote: On 03/24/2015 05:38 PM, Krzysztof Kozlowski wrote: 2015-03-24 9:01 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/10/2015 10:44 PM, Beomho Seo wrote: On 03/09/2015 09:13 PM, Krzysztof Kozlowski wrote: On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote: On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: 2015-03-09 1:35 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/08/2015 05:13 AM, Sebastian Reichel wrote: On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: From: Beomho Seo beomho@samsung.com This patch adds device driver of max77843 charger. This driver provide initialize each charging mode(e.g. fast charge, top-off mode and constant charging mode so on.). Additionally, control charging paramters to use i2c interface. Cc: Sebastian Reichel s...@kernel.org Signed-off-by: Beomho Seo beomho@samsung.com Reviewed-By: Sebastian Reichel s...@kernel.org I can't take it as is, since it depends on the private header file of PATCHv1. -- Sebastian This patch reviewed by Sebastian. Could you Please merge that your git tree ? Hi, ... and again we are adding a new driver for very similar chipset to already supported. I looked at spec and the charger's registers are almost the same as for max77693. Their layout and addresses are the same. I see some minor differences, probably the most important would be different values current (fast-charge, top-off). But still 90% of registers are the same... Do we really have to add new driver? Best regards, Krzysztof Hi, Thank you for your comment. As you say, both chip set are similar. But new driver need for support max77843. It is support different below - Provide Battery presence information. Another set of power supply properties could be added for that chip. This way the get_property() function would be the same but actually the POWER_SUPPLY_PROP_PRESENT won't be called for max77693. - Can OTG FET control. Where the OTG FET feature is it enabled in your driver? I couldn't find it. Sorry. This driver don't control OTG FET feature. - Bigger Fast charge current, Top Off current Threshold selection. - Various and bigger OTG current limitation. - Bigger primary charger termination voltage setting. - Different maximum input current limit selection(Different step). Yes, I mentioned some of these differences (the Fast/top-off differences). These are differences in values so it does not require new driver. There is need to develop new driver just to support different current (3.0 A instead of 2.1 A) or voltage threshold. They are different charging current, OTG current limitation, top off current, charging limitation value. In case OTG current limitation different not limitation value but using register bit(max77843 use[7:6] max77693 use[7] bit only). Even if this driver not support all feature, some register different with max77693(support value, use register bit). If this driver will combined with max77693 may even be beneficial for new Maxim driver. But the present, this driver is related with max77843 core driver and max77843-regulator. So I hope this driver merge first. And then will extend two driver(max77843 charger and max77693 charger). I still prefer merging common drivers into one instead of creating some more of them. However I understand your point and I am not entirely opposed against. Especially that you invested quite a bit of time for developing this and my feedback was quite late. To summarize I am fine with your approach. Best regards, Krzysztof Dear Lee Jones, Could you please merge that your git tree ? Sorry, I'm lost. Why am I taking this though the MFD tree? What patches are left? Where are they going? Am I taking any other patches? Max77843 charger driver is max77843 mfd core dependency. What kind of dependancy? Runtime or build? Where is the patch that it depends on? Is it in -next for in Mainline already? Build. Max77843 charger driver use max77843-private.h. It is in for-mfd-next branch. c7f585f mfd: max77843: Add max77843 MFD driver core driver If that's the case, then yes, I can take this patch through the MFD tree with the correct Acks applied. -- 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 linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On 03/27/2015 04:57 PM, Lee Jones wrote: On Fri, 27 Mar 2015, Beomho Seo wrote: On 03/26/2015 10:54 PM, Lee Jones wrote: On Thu, 26 Mar 2015, Beomho Seo wrote: On 03/24/2015 05:38 PM, Krzysztof Kozlowski wrote: 2015-03-24 9:01 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/10/2015 10:44 PM, Beomho Seo wrote: On 03/09/2015 09:13 PM, Krzysztof Kozlowski wrote: On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote: On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: 2015-03-09 1:35 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/08/2015 05:13 AM, Sebastian Reichel wrote: On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: From: Beomho Seo beomho@samsung.com This patch adds device driver of max77843 charger. This driver provide initialize each charging mode(e.g. fast charge, top-off mode and constant charging mode so on.). Additionally, control charging paramters to use i2c interface. Cc: Sebastian Reichel s...@kernel.org Signed-off-by: Beomho Seo beomho@samsung.com Reviewed-By: Sebastian Reichel s...@kernel.org I can't take it as is, since it depends on the private header file of PATCHv1. -- Sebastian This patch reviewed by Sebastian. Could you Please merge that your git tree ? Hi, ... and again we are adding a new driver for very similar chipset to already supported. I looked at spec and the charger's registers are almost the same as for max77693. Their layout and addresses are the same. I see some minor differences, probably the most important would be different values current (fast-charge, top-off). But still 90% of registers are the same... Do we really have to add new driver? Best regards, Krzysztof Hi, Thank you for your comment. As you say, both chip set are similar. But new driver need for support max77843. It is support different below - Provide Battery presence information. Another set of power supply properties could be added for that chip. This way the get_property() function would be the same but actually the POWER_SUPPLY_PROP_PRESENT won't be called for max77693. - Can OTG FET control. Where the OTG FET feature is it enabled in your driver? I couldn't find it. Sorry. This driver don't control OTG FET feature. - Bigger Fast charge current, Top Off current Threshold selection. - Various and bigger OTG current limitation. - Bigger primary charger termination voltage setting. - Different maximum input current limit selection(Different step). Yes, I mentioned some of these differences (the Fast/top-off differences). These are differences in values so it does not require new driver. There is need to develop new driver just to support different current (3.0 A instead of 2.1 A) or voltage threshold. They are different charging current, OTG current limitation, top off current, charging limitation value. In case OTG current limitation different not limitation value but using register bit(max77843 use[7:6] max77693 use[7] bit only). Even if this driver not support all feature, some register different with max77693(support value, use register bit). If this driver will combined with max77693 may even be beneficial for new Maxim driver. But the present, this driver is related with max77843 core driver and max77843-regulator. So I hope this driver merge first. And then will extend two driver(max77843 charger and max77693 charger). I still prefer merging common drivers into one instead of creating some more of them. However I understand your point and I am not entirely opposed against. Especially that you invested quite a bit of time for developing this and my feedback was quite late. To summarize I am fine with your approach. Best regards, Krzysztof Dear Lee Jones, Could you please merge that your git tree ? Sorry, I'm lost. Why am I taking this though the MFD tree? What patches are left? Where are they going? Am I taking any other patches? Max77843 charger driver is max77843 mfd core dependency. What kind of dependancy? Runtime or build? Where is the patch that it depends on? Is it in -next for in Mainline already? Build. Max77843 charger driver use max77843-private.h. It is in for-mfd-next branch. c7f585f mfd: max77843: Add max77843 MFD driver core driver If you think this patch will suitable for battery tree(or other tree), I would like request for merge battery tree. If this patch has no build dependencies on patches which are in -next, but not in Mainline then it will have to go in via the same tree that the dependencies were applied to. If the dependencies are already in Mainline, or they are not build-deps, then it should go in via the correct tree, which I believe is Sebastian's tree. Also, I will send again this patch and device tree binding document. Either way you should do that. Mark them as RESEND instead of PATCH and apply all of the Acks you have accumulated so far. I will send new version because binding document
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On 03/26/2015 10:54 PM, Lee Jones wrote: > On Thu, 26 Mar 2015, Beomho Seo wrote: >> On 03/24/2015 05:38 PM, Krzysztof Kozlowski wrote: >>> 2015-03-24 9:01 GMT+01:00 Beomho Seo : On 03/10/2015 10:44 PM, Beomho Seo wrote: > On 03/09/2015 09:13 PM, Krzysztof Kozlowski wrote: >> On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote: >>> On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: 2015-03-09 1:35 GMT+01:00 Beomho Seo : > On 03/08/2015 05:13 AM, Sebastian Reichel wrote: >> On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: >>> From: Beomho Seo >>> >>> This patch adds device driver of max77843 charger. This driver >>> provide >>> initialize each charging mode(e.g. fast charge, top-off mode and >>> constant >>> charging mode so on.). Additionally, control charging paramters to >>> use >>> i2c interface. >>> >>> Cc: Sebastian Reichel >>> Signed-off-by: Beomho Seo >> >> Reviewed-By: Sebastian Reichel >> >> I can't take it as is, since it depends on the private header file >> of PATCHv1. >> >> -- Sebastian >> > > This patch reviewed by Sebastian. > Could you Please merge that your git tree ? Hi, ... and again we are adding a new driver for very similar chipset to already supported. I looked at spec and the charger's registers are almost the same as for max77693. Their layout and addresses are the same. I see some minor differences, probably the most important would be different values current (fast-charge, top-off). But still 90% of registers are the same... Do we really have to add new driver? Best regards, Krzysztof >>> >>> Hi, >>> >>> Thank you for your comment. As you say, both chip set are similar. >>> But new driver need for support max77843. It is support different below >>> - Provide Battery presence information. >> >> Another set of power supply properties could be added for that chip. >> This way the get_property() function would be the same but actually the >> POWER_SUPPLY_PROP_PRESENT won't be called for max77693. >> >>> - Can OTG FET control. >> >> Where the OTG FET feature is it enabled in your driver? I couldn't find >> it. >> > > Sorry. This driver don't control OTG FET feature. > >>> - Bigger Fast charge current, Top Off current Threshold selection. >>> - Various and bigger OTG current limitation. >>> - Bigger primary charger termination voltage setting. >>> - Different maximum input current limit selection(Different step). >> >> Yes, I mentioned some of these differences (the Fast/top-off >> differences). These are differences in values so it does not require new >> driver. There is need to develop new driver just to support different >> current (3.0 A instead of 2.1 A) or voltage threshold. >> > > They are different charging current, OTG current limitation, top off > current, > charging limitation value. In case OTG current limitation different not > limitation value but using register bit(max77843 use[7:6] max77693 use[7] > bit only). Even if this driver not support all feature, some register > different with max77693(support value, use register bit). > > If this driver will combined with max77693 may even be beneficial for > new Maxim driver. But the present, this driver is related with > max77843 core driver and max77843-regulator. So I hope this driver > merge first. And then will extend two driver(max77843 charger and > max77693 charger). >>> >>> I still prefer merging common drivers into one instead of creating >>> some more of them. >>> However I understand your point and I am not entirely opposed against. >>> Especially that you invested quite a bit of time for developing this >>> and my feedback was quite late. To summarize I am fine with your >>> approach. >>> >>> Best regards, >>> Krzysztof >>> >> >> Dear Lee Jones, >> >> Could you please merge that your git tree ? > > Sorry, I'm lost. Why am I taking this though the MFD tree? What > patches are left? Where are they going? Am I taking any other > patches? > Max77843 charger driver is max77843 mfd core dependency. If you think this patch will suitable for battery tree(or other tree), I would like request for merge battery tree. Also, I will send again this patch and device tree binding document. Best regards, Beomho Seo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On Thu, 26 Mar 2015, Beomho Seo wrote: > On 03/24/2015 05:38 PM, Krzysztof Kozlowski wrote: > > 2015-03-24 9:01 GMT+01:00 Beomho Seo : > >> On 03/10/2015 10:44 PM, Beomho Seo wrote: > >>> On 03/09/2015 09:13 PM, Krzysztof Kozlowski wrote: > On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote: > > On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: > >> 2015-03-09 1:35 GMT+01:00 Beomho Seo : > >>> On 03/08/2015 05:13 AM, Sebastian Reichel wrote: > On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: > > From: Beomho Seo > > > > This patch adds device driver of max77843 charger. This driver > > provide > > initialize each charging mode(e.g. fast charge, top-off mode and > > constant > > charging mode so on.). Additionally, control charging paramters to > > use > > i2c interface. > > > > Cc: Sebastian Reichel > > Signed-off-by: Beomho Seo > > Reviewed-By: Sebastian Reichel > > I can't take it as is, since it depends on the private header file > of PATCHv1. > > -- Sebastian > > >>> > >>> This patch reviewed by Sebastian. > >>> Could you Please merge that your git tree ? > >> > >> Hi, > >> > >> ... and again we are adding a new driver for very similar chipset to > >> already supported. I looked at spec and the charger's registers are > >> almost the same as for max77693. Their layout and addresses are the > >> same. I see some minor differences, probably the most important would > >> be different values current (fast-charge, top-off). But still 90% of > >> registers are the same... Do we really have to add new driver? > >> > >> Best regards, > >> Krzysztof > >> > > > > Hi, > > > > Thank you for your comment. As you say, both chip set are similar. > > But new driver need for support max77843. It is support different below > > - Provide Battery presence information. > > Another set of power supply properties could be added for that chip. > This way the get_property() function would be the same but actually the > POWER_SUPPLY_PROP_PRESENT won't be called for max77693. > > > - Can OTG FET control. > > Where the OTG FET feature is it enabled in your driver? I couldn't find > it. > > >>> > >>> Sorry. This driver don't control OTG FET feature. > >>> > > - Bigger Fast charge current, Top Off current Threshold selection. > > - Various and bigger OTG current limitation. > > - Bigger primary charger termination voltage setting. > > - Different maximum input current limit selection(Different step). > > Yes, I mentioned some of these differences (the Fast/top-off > differences). These are differences in values so it does not require new > driver. There is need to develop new driver just to support different > current (3.0 A instead of 2.1 A) or voltage threshold. > > >>> > >>> They are different charging current, OTG current limitation, top off > >>> current, > >>> charging limitation value. In case OTG current limitation different not > >>> limitation value but using register bit(max77843 use[7:6] max77693 use[7] > >>> bit only). Even if this driver not support all feature, some register > >>> different with max77693(support value, use register bit). > >>> > >>> If this driver will combined with max77693 may even be beneficial for > >>> new Maxim driver. But the present, this driver is related with > >>> max77843 core driver and max77843-regulator. So I hope this driver > >>> merge first. And then will extend two driver(max77843 charger and > >>> max77693 charger). > > > > I still prefer merging common drivers into one instead of creating > > some more of them. > > However I understand your point and I am not entirely opposed against. > > Especially that you invested quite a bit of time for developing this > > and my feedback was quite late. To summarize I am fine with your > > approach. > > > > Best regards, > > Krzysztof > > > > Dear Lee Jones, > > Could you please merge that your git tree ? Sorry, I'm lost. Why am I taking this though the MFD tree? What patches are left? Where are they going? Am I taking any other patches? -- 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 linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On 03/24/2015 05:38 PM, Krzysztof Kozlowski wrote: > 2015-03-24 9:01 GMT+01:00 Beomho Seo : >> On 03/10/2015 10:44 PM, Beomho Seo wrote: >>> On 03/09/2015 09:13 PM, Krzysztof Kozlowski wrote: On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote: > On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: >> 2015-03-09 1:35 GMT+01:00 Beomho Seo : >>> On 03/08/2015 05:13 AM, Sebastian Reichel wrote: On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: > From: Beomho Seo > > This patch adds device driver of max77843 charger. This driver provide > initialize each charging mode(e.g. fast charge, top-off mode and > constant > charging mode so on.). Additionally, control charging paramters to use > i2c interface. > > Cc: Sebastian Reichel > Signed-off-by: Beomho Seo Reviewed-By: Sebastian Reichel I can't take it as is, since it depends on the private header file of PATCHv1. -- Sebastian >>> >>> This patch reviewed by Sebastian. >>> Could you Please merge that your git tree ? >> >> Hi, >> >> ... and again we are adding a new driver for very similar chipset to >> already supported. I looked at spec and the charger's registers are >> almost the same as for max77693. Their layout and addresses are the >> same. I see some minor differences, probably the most important would >> be different values current (fast-charge, top-off). But still 90% of >> registers are the same... Do we really have to add new driver? >> >> Best regards, >> Krzysztof >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-input" in >> the body of a message to majord...@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> > > Hi, > > Thank you for your comment. As you say, both chip set are similar. > But new driver need for support max77843. It is support different below > - Provide Battery presence information. Another set of power supply properties could be added for that chip. This way the get_property() function would be the same but actually the POWER_SUPPLY_PROP_PRESENT won't be called for max77693. > - Can OTG FET control. Where the OTG FET feature is it enabled in your driver? I couldn't find it. >>> >>> Sorry. This driver don't control OTG FET feature. >>> > - Bigger Fast charge current, Top Off current Threshold selection. > - Various and bigger OTG current limitation. > - Bigger primary charger termination voltage setting. > - Different maximum input current limit selection(Different step). Yes, I mentioned some of these differences (the Fast/top-off differences). These are differences in values so it does not require new driver. There is need to develop new driver just to support different current (3.0 A instead of 2.1 A) or voltage threshold. >>> >>> They are different charging current, OTG current limitation, top off >>> current, >>> charging limitation value. In case OTG current limitation different not >>> limitation value but using register bit(max77843 use[7:6] max77693 use[7] >>> bit only). Even if this driver not support all feature, some register >>> different with max77693(support value, use register bit). >>> >>> If this driver will combined with max77693 may even be beneficial for >>> new Maxim driver. But the present, this driver is related with >>> max77843 core driver and max77843-regulator. So I hope this driver >>> merge first. And then will extend two driver(max77843 charger and max77693 >>> charger). > > I still prefer merging common drivers into one instead of creating > some more of them. > However I understand your point and I am not entirely opposed against. > Especially that you invested quite a bit of time for developing this > and my feedback was quite late. To summarize I am fine with your > approach. > > Best regards, > Krzysztof > Dear Lee Jones, Could you please merge that your git tree ? Best regards, Beomho Seo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
2015-03-25 1:39 GMT+01:00 Beomho Seo : > > Then, Can I request merge this patch ? Yes, but it is not up to me :). -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On 03/24/2015 05:38 PM, Krzysztof Kozlowski wrote: 2015-03-24 9:01 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/10/2015 10:44 PM, Beomho Seo wrote: On 03/09/2015 09:13 PM, Krzysztof Kozlowski wrote: On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote: On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: 2015-03-09 1:35 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/08/2015 05:13 AM, Sebastian Reichel wrote: On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: From: Beomho Seo beomho@samsung.com This patch adds device driver of max77843 charger. This driver provide initialize each charging mode(e.g. fast charge, top-off mode and constant charging mode so on.). Additionally, control charging paramters to use i2c interface. Cc: Sebastian Reichel s...@kernel.org Signed-off-by: Beomho Seo beomho@samsung.com Reviewed-By: Sebastian Reichel s...@kernel.org I can't take it as is, since it depends on the private header file of PATCHv1. -- Sebastian This patch reviewed by Sebastian. Could you Please merge that your git tree ? Hi, ... and again we are adding a new driver for very similar chipset to already supported. I looked at spec and the charger's registers are almost the same as for max77693. Their layout and addresses are the same. I see some minor differences, probably the most important would be different values current (fast-charge, top-off). But still 90% of registers are the same... Do we really have to add new driver? Best regards, Krzysztof -- To unsubscribe from this list: send the line unsubscribe linux-input in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Hi, Thank you for your comment. As you say, both chip set are similar. But new driver need for support max77843. It is support different below - Provide Battery presence information. Another set of power supply properties could be added for that chip. This way the get_property() function would be the same but actually the POWER_SUPPLY_PROP_PRESENT won't be called for max77693. - Can OTG FET control. Where the OTG FET feature is it enabled in your driver? I couldn't find it. Sorry. This driver don't control OTG FET feature. - Bigger Fast charge current, Top Off current Threshold selection. - Various and bigger OTG current limitation. - Bigger primary charger termination voltage setting. - Different maximum input current limit selection(Different step). Yes, I mentioned some of these differences (the Fast/top-off differences). These are differences in values so it does not require new driver. There is need to develop new driver just to support different current (3.0 A instead of 2.1 A) or voltage threshold. They are different charging current, OTG current limitation, top off current, charging limitation value. In case OTG current limitation different not limitation value but using register bit(max77843 use[7:6] max77693 use[7] bit only). Even if this driver not support all feature, some register different with max77693(support value, use register bit). If this driver will combined with max77693 may even be beneficial for new Maxim driver. But the present, this driver is related with max77843 core driver and max77843-regulator. So I hope this driver merge first. And then will extend two driver(max77843 charger and max77693 charger). I still prefer merging common drivers into one instead of creating some more of them. However I understand your point and I am not entirely opposed against. Especially that you invested quite a bit of time for developing this and my feedback was quite late. To summarize I am fine with your approach. Best regards, Krzysztof Dear Lee Jones, Could you please merge that your git tree ? Best regards, Beomho Seo -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On Thu, 26 Mar 2015, Beomho Seo wrote: On 03/24/2015 05:38 PM, Krzysztof Kozlowski wrote: 2015-03-24 9:01 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/10/2015 10:44 PM, Beomho Seo wrote: On 03/09/2015 09:13 PM, Krzysztof Kozlowski wrote: On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote: On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: 2015-03-09 1:35 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/08/2015 05:13 AM, Sebastian Reichel wrote: On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: From: Beomho Seo beomho@samsung.com This patch adds device driver of max77843 charger. This driver provide initialize each charging mode(e.g. fast charge, top-off mode and constant charging mode so on.). Additionally, control charging paramters to use i2c interface. Cc: Sebastian Reichel s...@kernel.org Signed-off-by: Beomho Seo beomho@samsung.com Reviewed-By: Sebastian Reichel s...@kernel.org I can't take it as is, since it depends on the private header file of PATCHv1. -- Sebastian This patch reviewed by Sebastian. Could you Please merge that your git tree ? Hi, ... and again we are adding a new driver for very similar chipset to already supported. I looked at spec and the charger's registers are almost the same as for max77693. Their layout and addresses are the same. I see some minor differences, probably the most important would be different values current (fast-charge, top-off). But still 90% of registers are the same... Do we really have to add new driver? Best regards, Krzysztof Hi, Thank you for your comment. As you say, both chip set are similar. But new driver need for support max77843. It is support different below - Provide Battery presence information. Another set of power supply properties could be added for that chip. This way the get_property() function would be the same but actually the POWER_SUPPLY_PROP_PRESENT won't be called for max77693. - Can OTG FET control. Where the OTG FET feature is it enabled in your driver? I couldn't find it. Sorry. This driver don't control OTG FET feature. - Bigger Fast charge current, Top Off current Threshold selection. - Various and bigger OTG current limitation. - Bigger primary charger termination voltage setting. - Different maximum input current limit selection(Different step). Yes, I mentioned some of these differences (the Fast/top-off differences). These are differences in values so it does not require new driver. There is need to develop new driver just to support different current (3.0 A instead of 2.1 A) or voltage threshold. They are different charging current, OTG current limitation, top off current, charging limitation value. In case OTG current limitation different not limitation value but using register bit(max77843 use[7:6] max77693 use[7] bit only). Even if this driver not support all feature, some register different with max77693(support value, use register bit). If this driver will combined with max77693 may even be beneficial for new Maxim driver. But the present, this driver is related with max77843 core driver and max77843-regulator. So I hope this driver merge first. And then will extend two driver(max77843 charger and max77693 charger). I still prefer merging common drivers into one instead of creating some more of them. However I understand your point and I am not entirely opposed against. Especially that you invested quite a bit of time for developing this and my feedback was quite late. To summarize I am fine with your approach. Best regards, Krzysztof Dear Lee Jones, Could you please merge that your git tree ? Sorry, I'm lost. Why am I taking this though the MFD tree? What patches are left? Where are they going? Am I taking any other patches? -- 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 linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On 03/26/2015 10:54 PM, Lee Jones wrote: On Thu, 26 Mar 2015, Beomho Seo wrote: On 03/24/2015 05:38 PM, Krzysztof Kozlowski wrote: 2015-03-24 9:01 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/10/2015 10:44 PM, Beomho Seo wrote: On 03/09/2015 09:13 PM, Krzysztof Kozlowski wrote: On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote: On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: 2015-03-09 1:35 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/08/2015 05:13 AM, Sebastian Reichel wrote: On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: From: Beomho Seo beomho@samsung.com This patch adds device driver of max77843 charger. This driver provide initialize each charging mode(e.g. fast charge, top-off mode and constant charging mode so on.). Additionally, control charging paramters to use i2c interface. Cc: Sebastian Reichel s...@kernel.org Signed-off-by: Beomho Seo beomho@samsung.com Reviewed-By: Sebastian Reichel s...@kernel.org I can't take it as is, since it depends on the private header file of PATCHv1. -- Sebastian This patch reviewed by Sebastian. Could you Please merge that your git tree ? Hi, ... and again we are adding a new driver for very similar chipset to already supported. I looked at spec and the charger's registers are almost the same as for max77693. Their layout and addresses are the same. I see some minor differences, probably the most important would be different values current (fast-charge, top-off). But still 90% of registers are the same... Do we really have to add new driver? Best regards, Krzysztof Hi, Thank you for your comment. As you say, both chip set are similar. But new driver need for support max77843. It is support different below - Provide Battery presence information. Another set of power supply properties could be added for that chip. This way the get_property() function would be the same but actually the POWER_SUPPLY_PROP_PRESENT won't be called for max77693. - Can OTG FET control. Where the OTG FET feature is it enabled in your driver? I couldn't find it. Sorry. This driver don't control OTG FET feature. - Bigger Fast charge current, Top Off current Threshold selection. - Various and bigger OTG current limitation. - Bigger primary charger termination voltage setting. - Different maximum input current limit selection(Different step). Yes, I mentioned some of these differences (the Fast/top-off differences). These are differences in values so it does not require new driver. There is need to develop new driver just to support different current (3.0 A instead of 2.1 A) or voltage threshold. They are different charging current, OTG current limitation, top off current, charging limitation value. In case OTG current limitation different not limitation value but using register bit(max77843 use[7:6] max77693 use[7] bit only). Even if this driver not support all feature, some register different with max77693(support value, use register bit). If this driver will combined with max77693 may even be beneficial for new Maxim driver. But the present, this driver is related with max77843 core driver and max77843-regulator. So I hope this driver merge first. And then will extend two driver(max77843 charger and max77693 charger). I still prefer merging common drivers into one instead of creating some more of them. However I understand your point and I am not entirely opposed against. Especially that you invested quite a bit of time for developing this and my feedback was quite late. To summarize I am fine with your approach. Best regards, Krzysztof Dear Lee Jones, Could you please merge that your git tree ? Sorry, I'm lost. Why am I taking this though the MFD tree? What patches are left? Where are they going? Am I taking any other patches? Max77843 charger driver is max77843 mfd core dependency. If you think this patch will suitable for battery tree(or other tree), I would like request for merge battery tree. Also, I will send again this patch and device tree binding document. Best regards, Beomho Seo -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
2015-03-25 1:39 GMT+01:00 Beomho Seo beomho@samsung.com: Then, Can I request merge this patch ? Yes, but it is not up to me :). -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On 03/24/2015 05:38 PM, Krzysztof Kozlowski wrote: > 2015-03-24 9:01 GMT+01:00 Beomho Seo : >> On 03/10/2015 10:44 PM, Beomho Seo wrote: >>> On 03/09/2015 09:13 PM, Krzysztof Kozlowski wrote: On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote: > On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: >> 2015-03-09 1:35 GMT+01:00 Beomho Seo : >>> On 03/08/2015 05:13 AM, Sebastian Reichel wrote: On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: > From: Beomho Seo > > This patch adds device driver of max77843 charger. This driver provide > initialize each charging mode(e.g. fast charge, top-off mode and > constant > charging mode so on.). Additionally, control charging paramters to use > i2c interface. > > Cc: Sebastian Reichel > Signed-off-by: Beomho Seo Reviewed-By: Sebastian Reichel I can't take it as is, since it depends on the private header file of PATCHv1. -- Sebastian >>> >>> This patch reviewed by Sebastian. >>> Could you Please merge that your git tree ? >> >> Hi, >> >> ... and again we are adding a new driver for very similar chipset to >> already supported. I looked at spec and the charger's registers are >> almost the same as for max77693. Their layout and addresses are the >> same. I see some minor differences, probably the most important would >> be different values current (fast-charge, top-off). But still 90% of >> registers are the same... Do we really have to add new driver? >> >> Best regards, >> Krzysztof >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-input" in >> the body of a message to majord...@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> > > Hi, > > Thank you for your comment. As you say, both chip set are similar. > But new driver need for support max77843. It is support different below > - Provide Battery presence information. Another set of power supply properties could be added for that chip. This way the get_property() function would be the same but actually the POWER_SUPPLY_PROP_PRESENT won't be called for max77693. > - Can OTG FET control. Where the OTG FET feature is it enabled in your driver? I couldn't find it. >>> >>> Sorry. This driver don't control OTG FET feature. >>> > - Bigger Fast charge current, Top Off current Threshold selection. > - Various and bigger OTG current limitation. > - Bigger primary charger termination voltage setting. > - Different maximum input current limit selection(Different step). Yes, I mentioned some of these differences (the Fast/top-off differences). These are differences in values so it does not require new driver. There is need to develop new driver just to support different current (3.0 A instead of 2.1 A) or voltage threshold. >>> >>> They are different charging current, OTG current limitation, top off >>> current, >>> charging limitation value. In case OTG current limitation different not >>> limitation value but using register bit(max77843 use[7:6] max77693 use[7] >>> bit only). Even if this driver not support all feature, some register >>> different with max77693(support value, use register bit). >>> >>> If this driver will combined with max77693 may even be beneficial for >>> new Maxim driver. But the present, this driver is related with >>> max77843 core driver and max77843-regulator. So I hope this driver >>> merge first. And then will extend two driver(max77843 charger and max77693 >>> charger). > > I still prefer merging common drivers into one instead of creating > some more of them. > However I understand your point and I am not entirely opposed against. > Especially that you invested quite a bit of time for developing this > and my feedback was quite late. To summarize I am fine with your > approach. > > Best regards, > Krzysztof > Then, Can I request merge this patch ? Best regards, Beomho -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
2015-03-24 9:01 GMT+01:00 Beomho Seo : > On 03/10/2015 10:44 PM, Beomho Seo wrote: >> On 03/09/2015 09:13 PM, Krzysztof Kozlowski wrote: >>> On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote: On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: > 2015-03-09 1:35 GMT+01:00 Beomho Seo : >> On 03/08/2015 05:13 AM, Sebastian Reichel wrote: >>> On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: From: Beomho Seo This patch adds device driver of max77843 charger. This driver provide initialize each charging mode(e.g. fast charge, top-off mode and constant charging mode so on.). Additionally, control charging paramters to use i2c interface. Cc: Sebastian Reichel Signed-off-by: Beomho Seo >>> >>> Reviewed-By: Sebastian Reichel >>> >>> I can't take it as is, since it depends on the private header file >>> of PATCHv1. >>> >>> -- Sebastian >>> >> >> This patch reviewed by Sebastian. >> Could you Please merge that your git tree ? > > Hi, > > ... and again we are adding a new driver for very similar chipset to > already supported. I looked at spec and the charger's registers are > almost the same as for max77693. Their layout and addresses are the > same. I see some minor differences, probably the most important would > be different values current (fast-charge, top-off). But still 90% of > registers are the same... Do we really have to add new driver? > > Best regards, > Krzysztof > -- > To unsubscribe from this list: send the line "unsubscribe linux-input" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Hi, Thank you for your comment. As you say, both chip set are similar. But new driver need for support max77843. It is support different below - Provide Battery presence information. >>> >>> Another set of power supply properties could be added for that chip. >>> This way the get_property() function would be the same but actually the >>> POWER_SUPPLY_PROP_PRESENT won't be called for max77693. >>> - Can OTG FET control. >>> >>> Where the OTG FET feature is it enabled in your driver? I couldn't find >>> it. >>> >> >> Sorry. This driver don't control OTG FET feature. >> - Bigger Fast charge current, Top Off current Threshold selection. - Various and bigger OTG current limitation. - Bigger primary charger termination voltage setting. - Different maximum input current limit selection(Different step). >>> >>> Yes, I mentioned some of these differences (the Fast/top-off >>> differences). These are differences in values so it does not require new >>> driver. There is need to develop new driver just to support different >>> current (3.0 A instead of 2.1 A) or voltage threshold. >>> >> >> They are different charging current, OTG current limitation, top off current, >> charging limitation value. In case OTG current limitation different not >> limitation value but using register bit(max77843 use[7:6] max77693 use[7] >> bit only). Even if this driver not support all feature, some register >> different with max77693(support value, use register bit). >> >> If this driver will combined with max77693 may even be beneficial for >> new Maxim driver. But the present, this driver is related with >> max77843 core driver and max77843-regulator. So I hope this driver >> merge first. And then will extend two driver(max77843 charger and max77693 >> charger). I still prefer merging common drivers into one instead of creating some more of them. However I understand your point and I am not entirely opposed against. Especially that you invested quite a bit of time for developing this and my feedback was quite late. To summarize I am fine with your approach. Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On 03/10/2015 10:44 PM, Beomho Seo wrote: > On 03/09/2015 09:13 PM, Krzysztof Kozlowski wrote: >> On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote: >>> On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: 2015-03-09 1:35 GMT+01:00 Beomho Seo : > On 03/08/2015 05:13 AM, Sebastian Reichel wrote: >> On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: >>> From: Beomho Seo >>> >>> This patch adds device driver of max77843 charger. This driver provide >>> initialize each charging mode(e.g. fast charge, top-off mode and >>> constant >>> charging mode so on.). Additionally, control charging paramters to use >>> i2c interface. >>> >>> Cc: Sebastian Reichel >>> Signed-off-by: Beomho Seo >> >> Reviewed-By: Sebastian Reichel >> >> I can't take it as is, since it depends on the private header file >> of PATCHv1. >> >> -- Sebastian >> > > This patch reviewed by Sebastian. > Could you Please merge that your git tree ? Hi, ... and again we are adding a new driver for very similar chipset to already supported. I looked at spec and the charger's registers are almost the same as for max77693. Their layout and addresses are the same. I see some minor differences, probably the most important would be different values current (fast-charge, top-off). But still 90% of registers are the same... Do we really have to add new driver? Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html >>> >>> Hi, >>> >>> Thank you for your comment. As you say, both chip set are similar. >>> But new driver need for support max77843. It is support different below >>> - Provide Battery presence information. >> >> Another set of power supply properties could be added for that chip. >> This way the get_property() function would be the same but actually the >> POWER_SUPPLY_PROP_PRESENT won't be called for max77693. >> >>> - Can OTG FET control. >> >> Where the OTG FET feature is it enabled in your driver? I couldn't find >> it. >> > > Sorry. This driver don't control OTG FET feature. > >>> - Bigger Fast charge current, Top Off current Threshold selection. >>> - Various and bigger OTG current limitation. >>> - Bigger primary charger termination voltage setting. >>> - Different maximum input current limit selection(Different step). >> >> Yes, I mentioned some of these differences (the Fast/top-off >> differences). These are differences in values so it does not require new >> driver. There is need to develop new driver just to support different >> current (3.0 A instead of 2.1 A) or voltage threshold. >> > > They are different charging current, OTG current limitation, top off current, > charging limitation value. In case OTG current limitation different not > limitation value but using register bit(max77843 use[7:6] max77693 use[7] > bit only). Even if this driver not support all feature, some register > different with max77693(support value, use register bit). > > If this driver will combined with max77693 may even be beneficial for > new Maxim driver. But the present, this driver is related with > max77843 core driver and max77843-regulator. So I hope this driver > merge first. And then will extend two driver(max77843 charger and max77693 > charger). > >> So the only new feature - battery presence - can be easily added to >> existing driver. The driver can be extended for different >> current/voltage values. Such extension may even be beneficial for new >> Maxim MUIC/PMIC chipsets. >> >> >> Best regards, >> Krzysztof >> > > Best regards, > Beomho Seo Krzysztof, gentle ping? Best regards, Beomho Seo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On 03/24/2015 05:38 PM, Krzysztof Kozlowski wrote: 2015-03-24 9:01 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/10/2015 10:44 PM, Beomho Seo wrote: On 03/09/2015 09:13 PM, Krzysztof Kozlowski wrote: On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote: On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: 2015-03-09 1:35 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/08/2015 05:13 AM, Sebastian Reichel wrote: On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: From: Beomho Seo beomho@samsung.com This patch adds device driver of max77843 charger. This driver provide initialize each charging mode(e.g. fast charge, top-off mode and constant charging mode so on.). Additionally, control charging paramters to use i2c interface. Cc: Sebastian Reichel s...@kernel.org Signed-off-by: Beomho Seo beomho@samsung.com Reviewed-By: Sebastian Reichel s...@kernel.org I can't take it as is, since it depends on the private header file of PATCHv1. -- Sebastian This patch reviewed by Sebastian. Could you Please merge that your git tree ? Hi, ... and again we are adding a new driver for very similar chipset to already supported. I looked at spec and the charger's registers are almost the same as for max77693. Their layout and addresses are the same. I see some minor differences, probably the most important would be different values current (fast-charge, top-off). But still 90% of registers are the same... Do we really have to add new driver? Best regards, Krzysztof -- To unsubscribe from this list: send the line unsubscribe linux-input in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Hi, Thank you for your comment. As you say, both chip set are similar. But new driver need for support max77843. It is support different below - Provide Battery presence information. Another set of power supply properties could be added for that chip. This way the get_property() function would be the same but actually the POWER_SUPPLY_PROP_PRESENT won't be called for max77693. - Can OTG FET control. Where the OTG FET feature is it enabled in your driver? I couldn't find it. Sorry. This driver don't control OTG FET feature. - Bigger Fast charge current, Top Off current Threshold selection. - Various and bigger OTG current limitation. - Bigger primary charger termination voltage setting. - Different maximum input current limit selection(Different step). Yes, I mentioned some of these differences (the Fast/top-off differences). These are differences in values so it does not require new driver. There is need to develop new driver just to support different current (3.0 A instead of 2.1 A) or voltage threshold. They are different charging current, OTG current limitation, top off current, charging limitation value. In case OTG current limitation different not limitation value but using register bit(max77843 use[7:6] max77693 use[7] bit only). Even if this driver not support all feature, some register different with max77693(support value, use register bit). If this driver will combined with max77693 may even be beneficial for new Maxim driver. But the present, this driver is related with max77843 core driver and max77843-regulator. So I hope this driver merge first. And then will extend two driver(max77843 charger and max77693 charger). I still prefer merging common drivers into one instead of creating some more of them. However I understand your point and I am not entirely opposed against. Especially that you invested quite a bit of time for developing this and my feedback was quite late. To summarize I am fine with your approach. Best regards, Krzysztof Then, Can I request merge this patch ? Best regards, Beomho -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
2015-03-24 9:01 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/10/2015 10:44 PM, Beomho Seo wrote: On 03/09/2015 09:13 PM, Krzysztof Kozlowski wrote: On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote: On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: 2015-03-09 1:35 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/08/2015 05:13 AM, Sebastian Reichel wrote: On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: From: Beomho Seo beomho@samsung.com This patch adds device driver of max77843 charger. This driver provide initialize each charging mode(e.g. fast charge, top-off mode and constant charging mode so on.). Additionally, control charging paramters to use i2c interface. Cc: Sebastian Reichel s...@kernel.org Signed-off-by: Beomho Seo beomho@samsung.com Reviewed-By: Sebastian Reichel s...@kernel.org I can't take it as is, since it depends on the private header file of PATCHv1. -- Sebastian This patch reviewed by Sebastian. Could you Please merge that your git tree ? Hi, ... and again we are adding a new driver for very similar chipset to already supported. I looked at spec and the charger's registers are almost the same as for max77693. Their layout and addresses are the same. I see some minor differences, probably the most important would be different values current (fast-charge, top-off). But still 90% of registers are the same... Do we really have to add new driver? Best regards, Krzysztof -- To unsubscribe from this list: send the line unsubscribe linux-input in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Hi, Thank you for your comment. As you say, both chip set are similar. But new driver need for support max77843. It is support different below - Provide Battery presence information. Another set of power supply properties could be added for that chip. This way the get_property() function would be the same but actually the POWER_SUPPLY_PROP_PRESENT won't be called for max77693. - Can OTG FET control. Where the OTG FET feature is it enabled in your driver? I couldn't find it. Sorry. This driver don't control OTG FET feature. - Bigger Fast charge current, Top Off current Threshold selection. - Various and bigger OTG current limitation. - Bigger primary charger termination voltage setting. - Different maximum input current limit selection(Different step). Yes, I mentioned some of these differences (the Fast/top-off differences). These are differences in values so it does not require new driver. There is need to develop new driver just to support different current (3.0 A instead of 2.1 A) or voltage threshold. They are different charging current, OTG current limitation, top off current, charging limitation value. In case OTG current limitation different not limitation value but using register bit(max77843 use[7:6] max77693 use[7] bit only). Even if this driver not support all feature, some register different with max77693(support value, use register bit). If this driver will combined with max77693 may even be beneficial for new Maxim driver. But the present, this driver is related with max77843 core driver and max77843-regulator. So I hope this driver merge first. And then will extend two driver(max77843 charger and max77693 charger). I still prefer merging common drivers into one instead of creating some more of them. However I understand your point and I am not entirely opposed against. Especially that you invested quite a bit of time for developing this and my feedback was quite late. To summarize I am fine with your approach. Best regards, Krzysztof -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On 03/10/2015 10:44 PM, Beomho Seo wrote: On 03/09/2015 09:13 PM, Krzysztof Kozlowski wrote: On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote: On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: 2015-03-09 1:35 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/08/2015 05:13 AM, Sebastian Reichel wrote: On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: From: Beomho Seo beomho@samsung.com This patch adds device driver of max77843 charger. This driver provide initialize each charging mode(e.g. fast charge, top-off mode and constant charging mode so on.). Additionally, control charging paramters to use i2c interface. Cc: Sebastian Reichel s...@kernel.org Signed-off-by: Beomho Seo beomho@samsung.com Reviewed-By: Sebastian Reichel s...@kernel.org I can't take it as is, since it depends on the private header file of PATCHv1. -- Sebastian This patch reviewed by Sebastian. Could you Please merge that your git tree ? Hi, ... and again we are adding a new driver for very similar chipset to already supported. I looked at spec and the charger's registers are almost the same as for max77693. Their layout and addresses are the same. I see some minor differences, probably the most important would be different values current (fast-charge, top-off). But still 90% of registers are the same... Do we really have to add new driver? Best regards, Krzysztof -- To unsubscribe from this list: send the line unsubscribe linux-input in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Hi, Thank you for your comment. As you say, both chip set are similar. But new driver need for support max77843. It is support different below - Provide Battery presence information. Another set of power supply properties could be added for that chip. This way the get_property() function would be the same but actually the POWER_SUPPLY_PROP_PRESENT won't be called for max77693. - Can OTG FET control. Where the OTG FET feature is it enabled in your driver? I couldn't find it. Sorry. This driver don't control OTG FET feature. - Bigger Fast charge current, Top Off current Threshold selection. - Various and bigger OTG current limitation. - Bigger primary charger termination voltage setting. - Different maximum input current limit selection(Different step). Yes, I mentioned some of these differences (the Fast/top-off differences). These are differences in values so it does not require new driver. There is need to develop new driver just to support different current (3.0 A instead of 2.1 A) or voltage threshold. They are different charging current, OTG current limitation, top off current, charging limitation value. In case OTG current limitation different not limitation value but using register bit(max77843 use[7:6] max77693 use[7] bit only). Even if this driver not support all feature, some register different with max77693(support value, use register bit). If this driver will combined with max77693 may even be beneficial for new Maxim driver. But the present, this driver is related with max77843 core driver and max77843-regulator. So I hope this driver merge first. And then will extend two driver(max77843 charger and max77693 charger). So the only new feature - battery presence - can be easily added to existing driver. The driver can be extended for different current/voltage values. Such extension may even be beneficial for new Maxim MUIC/PMIC chipsets. Best regards, Krzysztof Best regards, Beomho Seo Krzysztof, gentle ping? Best regards, Beomho Seo -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On 03/09/2015 09:13 PM, Krzysztof Kozlowski wrote: > On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote: >> On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: >>> 2015-03-09 1:35 GMT+01:00 Beomho Seo : On 03/08/2015 05:13 AM, Sebastian Reichel wrote: > On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: >> From: Beomho Seo >> >> This patch adds device driver of max77843 charger. This driver provide >> initialize each charging mode(e.g. fast charge, top-off mode and constant >> charging mode so on.). Additionally, control charging paramters to use >> i2c interface. >> >> Cc: Sebastian Reichel >> Signed-off-by: Beomho Seo > > Reviewed-By: Sebastian Reichel > > I can't take it as is, since it depends on the private header file > of PATCHv1. > > -- Sebastian > This patch reviewed by Sebastian. Could you Please merge that your git tree ? >>> >>> Hi, >>> >>> ... and again we are adding a new driver for very similar chipset to >>> already supported. I looked at spec and the charger's registers are >>> almost the same as for max77693. Their layout and addresses are the >>> same. I see some minor differences, probably the most important would >>> be different values current (fast-charge, top-off). But still 90% of >>> registers are the same... Do we really have to add new driver? >>> >>> Best regards, >>> Krzysztof >>> -- >>> To unsubscribe from this list: send the line "unsubscribe linux-input" in >>> the body of a message to majord...@vger.kernel.org >>> More majordomo info at http://vger.kernel.org/majordomo-info.html >>> >> >> Hi, >> >> Thank you for your comment. As you say, both chip set are similar. >> But new driver need for support max77843. It is support different below >> - Provide Battery presence information. > > Another set of power supply properties could be added for that chip. > This way the get_property() function would be the same but actually the > POWER_SUPPLY_PROP_PRESENT won't be called for max77693. > >> - Can OTG FET control. > > Where the OTG FET feature is it enabled in your driver? I couldn't find > it. > Sorry. This driver don't control OTG FET feature. >> - Bigger Fast charge current, Top Off current Threshold selection. >> - Various and bigger OTG current limitation. >> - Bigger primary charger termination voltage setting. >> - Different maximum input current limit selection(Different step). > > Yes, I mentioned some of these differences (the Fast/top-off > differences). These are differences in values so it does not require new > driver. There is need to develop new driver just to support different > current (3.0 A instead of 2.1 A) or voltage threshold. > They are different charging current, OTG current limitation, top off current, charging limitation value. In case OTG current limitation different not limitation value but using register bit(max77843 use[7:6] max77693 use[7] bit only). Even if this driver not support all feature, some register different with max77693(support value, use register bit). If this driver will combined with max77693 may even be beneficial for new Maxim driver. But the present, this driver is related with max77843 core driver and max77843-regulator. So I hope this driver merge first. And then will extend two driver(max77843 charger and max77693 charger). > So the only new feature - battery presence - can be easily added to > existing driver. The driver can be extended for different > current/voltage values. Such extension may even be beneficial for new > Maxim MUIC/PMIC chipsets. > > > Best regards, > Krzysztof > Best regards, Beomho Seo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On 03/09/2015 09:13 PM, Krzysztof Kozlowski wrote: On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote: On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: 2015-03-09 1:35 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/08/2015 05:13 AM, Sebastian Reichel wrote: On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: From: Beomho Seo beomho@samsung.com This patch adds device driver of max77843 charger. This driver provide initialize each charging mode(e.g. fast charge, top-off mode and constant charging mode so on.). Additionally, control charging paramters to use i2c interface. Cc: Sebastian Reichel s...@kernel.org Signed-off-by: Beomho Seo beomho@samsung.com Reviewed-By: Sebastian Reichel s...@kernel.org I can't take it as is, since it depends on the private header file of PATCHv1. -- Sebastian This patch reviewed by Sebastian. Could you Please merge that your git tree ? Hi, ... and again we are adding a new driver for very similar chipset to already supported. I looked at spec and the charger's registers are almost the same as for max77693. Their layout and addresses are the same. I see some minor differences, probably the most important would be different values current (fast-charge, top-off). But still 90% of registers are the same... Do we really have to add new driver? Best regards, Krzysztof -- To unsubscribe from this list: send the line unsubscribe linux-input in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Hi, Thank you for your comment. As you say, both chip set are similar. But new driver need for support max77843. It is support different below - Provide Battery presence information. Another set of power supply properties could be added for that chip. This way the get_property() function would be the same but actually the POWER_SUPPLY_PROP_PRESENT won't be called for max77693. - Can OTG FET control. Where the OTG FET feature is it enabled in your driver? I couldn't find it. Sorry. This driver don't control OTG FET feature. - Bigger Fast charge current, Top Off current Threshold selection. - Various and bigger OTG current limitation. - Bigger primary charger termination voltage setting. - Different maximum input current limit selection(Different step). Yes, I mentioned some of these differences (the Fast/top-off differences). These are differences in values so it does not require new driver. There is need to develop new driver just to support different current (3.0 A instead of 2.1 A) or voltage threshold. They are different charging current, OTG current limitation, top off current, charging limitation value. In case OTG current limitation different not limitation value but using register bit(max77843 use[7:6] max77693 use[7] bit only). Even if this driver not support all feature, some register different with max77693(support value, use register bit). If this driver will combined with max77693 may even be beneficial for new Maxim driver. But the present, this driver is related with max77843 core driver and max77843-regulator. So I hope this driver merge first. And then will extend two driver(max77843 charger and max77693 charger). So the only new feature - battery presence - can be easily added to existing driver. The driver can be extended for different current/voltage values. Such extension may even be beneficial for new Maxim MUIC/PMIC chipsets. Best regards, Krzysztof Best regards, Beomho Seo -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote: > On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: > > 2015-03-09 1:35 GMT+01:00 Beomho Seo : > >> On 03/08/2015 05:13 AM, Sebastian Reichel wrote: > >>> On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: > From: Beomho Seo > > This patch adds device driver of max77843 charger. This driver provide > initialize each charging mode(e.g. fast charge, top-off mode and constant > charging mode so on.). Additionally, control charging paramters to use > i2c interface. > > Cc: Sebastian Reichel > Signed-off-by: Beomho Seo > >>> > >>> Reviewed-By: Sebastian Reichel > >>> > >>> I can't take it as is, since it depends on the private header file > >>> of PATCHv1. > >>> > >>> -- Sebastian > >>> > >> > >> This patch reviewed by Sebastian. > >> Could you Please merge that your git tree ? > > > > Hi, > > > > ... and again we are adding a new driver for very similar chipset to > > already supported. I looked at spec and the charger's registers are > > almost the same as for max77693. Their layout and addresses are the > > same. I see some minor differences, probably the most important would > > be different values current (fast-charge, top-off). But still 90% of > > registers are the same... Do we really have to add new driver? > > > > Best regards, > > Krzysztof > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-input" in > > the body of a message to majord...@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > > Hi, > > Thank you for your comment. As you say, both chip set are similar. > But new driver need for support max77843. It is support different below > - Provide Battery presence information. Another set of power supply properties could be added for that chip. This way the get_property() function would be the same but actually the POWER_SUPPLY_PROP_PRESENT won't be called for max77693. > - Can OTG FET control. Where the OTG FET feature is it enabled in your driver? I couldn't find it. > - Bigger Fast charge current, Top Off current Threshold selection. > - Various and bigger OTG current limitation. > - Bigger primary charger termination voltage setting. > - Different maximum input current limit selection(Different step). Yes, I mentioned some of these differences (the Fast/top-off differences). These are differences in values so it does not require new driver. There is need to develop new driver just to support different current (3.0 A instead of 2.1 A) or voltage threshold. So the only new feature - battery presence - can be easily added to existing driver. The driver can be extended for different current/voltage values. Such extension may even be beneficial for new Maxim MUIC/PMIC chipsets. Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: > 2015-03-09 1:35 GMT+01:00 Beomho Seo : >> On 03/08/2015 05:13 AM, Sebastian Reichel wrote: >>> On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: From: Beomho Seo This patch adds device driver of max77843 charger. This driver provide initialize each charging mode(e.g. fast charge, top-off mode and constant charging mode so on.). Additionally, control charging paramters to use i2c interface. Cc: Sebastian Reichel Signed-off-by: Beomho Seo >>> >>> Reviewed-By: Sebastian Reichel >>> >>> I can't take it as is, since it depends on the private header file >>> of PATCHv1. >>> >>> -- Sebastian >>> >> >> This patch reviewed by Sebastian. >> Could you Please merge that your git tree ? > > Hi, > > ... and again we are adding a new driver for very similar chipset to > already supported. I looked at spec and the charger's registers are > almost the same as for max77693. Their layout and addresses are the > same. I see some minor differences, probably the most important would > be different values current (fast-charge, top-off). But still 90% of > registers are the same... Do we really have to add new driver? > > Best regards, > Krzysztof > -- > To unsubscribe from this list: send the line "unsubscribe linux-input" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Hi, Thank you for your comment. As you say, both chip set are similar. But new driver need for support max77843. It is support different below - Provide Battery presence information. - Can OTG FET control. - Bigger Fast charge current, Top Off current Threshold selection. - Various and bigger OTG current limitation. - Bigger primary charger termination voltage setting. - Different maximum input current limit selection(Different step). I respect your opinion but I think add new driver better. Best regards, Beomho Seo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
2015-03-09 1:35 GMT+01:00 Beomho Seo : > On 03/08/2015 05:13 AM, Sebastian Reichel wrote: >> On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: >>> From: Beomho Seo >>> >>> This patch adds device driver of max77843 charger. This driver provide >>> initialize each charging mode(e.g. fast charge, top-off mode and constant >>> charging mode so on.). Additionally, control charging paramters to use >>> i2c interface. >>> >>> Cc: Sebastian Reichel >>> Signed-off-by: Beomho Seo >> >> Reviewed-By: Sebastian Reichel >> >> I can't take it as is, since it depends on the private header file >> of PATCHv1. >> >> -- Sebastian >> > > This patch reviewed by Sebastian. > Could you Please merge that your git tree ? Hi, ... and again we are adding a new driver for very similar chipset to already supported. I looked at spec and the charger's registers are almost the same as for max77693. Their layout and addresses are the same. I see some minor differences, probably the most important would be different values current (fast-charge, top-off). But still 90% of registers are the same... Do we really have to add new driver? Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: 2015-03-09 1:35 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/08/2015 05:13 AM, Sebastian Reichel wrote: On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: From: Beomho Seo beomho@samsung.com This patch adds device driver of max77843 charger. This driver provide initialize each charging mode(e.g. fast charge, top-off mode and constant charging mode so on.). Additionally, control charging paramters to use i2c interface. Cc: Sebastian Reichel s...@kernel.org Signed-off-by: Beomho Seo beomho@samsung.com Reviewed-By: Sebastian Reichel s...@kernel.org I can't take it as is, since it depends on the private header file of PATCHv1. -- Sebastian This patch reviewed by Sebastian. Could you Please merge that your git tree ? Hi, ... and again we are adding a new driver for very similar chipset to already supported. I looked at spec and the charger's registers are almost the same as for max77693. Their layout and addresses are the same. I see some minor differences, probably the most important would be different values current (fast-charge, top-off). But still 90% of registers are the same... Do we really have to add new driver? Best regards, Krzysztof -- To unsubscribe from this list: send the line unsubscribe linux-input in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Hi, Thank you for your comment. As you say, both chip set are similar. But new driver need for support max77843. It is support different below - Provide Battery presence information. - Can OTG FET control. - Bigger Fast charge current, Top Off current Threshold selection. - Various and bigger OTG current limitation. - Bigger primary charger termination voltage setting. - Different maximum input current limit selection(Different step). I respect your opinion but I think add new driver better. Best regards, Beomho Seo -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote: On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: 2015-03-09 1:35 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/08/2015 05:13 AM, Sebastian Reichel wrote: On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: From: Beomho Seo beomho@samsung.com This patch adds device driver of max77843 charger. This driver provide initialize each charging mode(e.g. fast charge, top-off mode and constant charging mode so on.). Additionally, control charging paramters to use i2c interface. Cc: Sebastian Reichel s...@kernel.org Signed-off-by: Beomho Seo beomho@samsung.com Reviewed-By: Sebastian Reichel s...@kernel.org I can't take it as is, since it depends on the private header file of PATCHv1. -- Sebastian This patch reviewed by Sebastian. Could you Please merge that your git tree ? Hi, ... and again we are adding a new driver for very similar chipset to already supported. I looked at spec and the charger's registers are almost the same as for max77693. Their layout and addresses are the same. I see some minor differences, probably the most important would be different values current (fast-charge, top-off). But still 90% of registers are the same... Do we really have to add new driver? Best regards, Krzysztof -- To unsubscribe from this list: send the line unsubscribe linux-input in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Hi, Thank you for your comment. As you say, both chip set are similar. But new driver need for support max77843. It is support different below - Provide Battery presence information. Another set of power supply properties could be added for that chip. This way the get_property() function would be the same but actually the POWER_SUPPLY_PROP_PRESENT won't be called for max77693. - Can OTG FET control. Where the OTG FET feature is it enabled in your driver? I couldn't find it. - Bigger Fast charge current, Top Off current Threshold selection. - Various and bigger OTG current limitation. - Bigger primary charger termination voltage setting. - Different maximum input current limit selection(Different step). Yes, I mentioned some of these differences (the Fast/top-off differences). These are differences in values so it does not require new driver. There is need to develop new driver just to support different current (3.0 A instead of 2.1 A) or voltage threshold. So the only new feature - battery presence - can be easily added to existing driver. The driver can be extended for different current/voltage values. Such extension may even be beneficial for new Maxim MUIC/PMIC chipsets. Best regards, Krzysztof -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
2015-03-09 1:35 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/08/2015 05:13 AM, Sebastian Reichel wrote: On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: From: Beomho Seo beomho@samsung.com This patch adds device driver of max77843 charger. This driver provide initialize each charging mode(e.g. fast charge, top-off mode and constant charging mode so on.). Additionally, control charging paramters to use i2c interface. Cc: Sebastian Reichel s...@kernel.org Signed-off-by: Beomho Seo beomho@samsung.com Reviewed-By: Sebastian Reichel s...@kernel.org I can't take it as is, since it depends on the private header file of PATCHv1. -- Sebastian This patch reviewed by Sebastian. Could you Please merge that your git tree ? Hi, ... and again we are adding a new driver for very similar chipset to already supported. I looked at spec and the charger's registers are almost the same as for max77693. Their layout and addresses are the same. I see some minor differences, probably the most important would be different values current (fast-charge, top-off). But still 90% of registers are the same... Do we really have to add new driver? Best regards, Krzysztof -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On 03/08/2015 05:13 AM, Sebastian Reichel wrote: > On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: >> From: Beomho Seo >> >> This patch adds device driver of max77843 charger. This driver provide >> initialize each charging mode(e.g. fast charge, top-off mode and constant >> charging mode so on.). Additionally, control charging paramters to use >> i2c interface. >> >> Cc: Sebastian Reichel >> Signed-off-by: Beomho Seo > > Reviewed-By: Sebastian Reichel > > I can't take it as is, since it depends on the private header file > of PATCHv1. > > -- Sebastian > This patch reviewed by Sebastian. Could you Please merge that your git tree ? Best regards, Beomho Seo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On 03/08/2015 05:13 AM, Sebastian Reichel wrote: On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: From: Beomho Seo beomho@samsung.com This patch adds device driver of max77843 charger. This driver provide initialize each charging mode(e.g. fast charge, top-off mode and constant charging mode so on.). Additionally, control charging paramters to use i2c interface. Cc: Sebastian Reichel s...@kernel.org Signed-off-by: Beomho Seo beomho@samsung.com Reviewed-By: Sebastian Reichel s...@kernel.org I can't take it as is, since it depends on the private header file of PATCHv1. -- Sebastian This patch reviewed by Sebastian. Could you Please merge that your git tree ? Best regards, Beomho Seo -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: > From: Beomho Seo > > This patch adds device driver of max77843 charger. This driver provide > initialize each charging mode(e.g. fast charge, top-off mode and constant > charging mode so on.). Additionally, control charging paramters to use > i2c interface. > > Cc: Sebastian Reichel > Signed-off-by: Beomho Seo Reviewed-By: Sebastian Reichel I can't take it as is, since it depends on the private header file of PATCHv1. -- Sebastian signature.asc Description: Digital signature
Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: From: Beomho Seo beomho@samsung.com This patch adds device driver of max77843 charger. This driver provide initialize each charging mode(e.g. fast charge, top-off mode and constant charging mode so on.). Additionally, control charging paramters to use i2c interface. Cc: Sebastian Reichel s...@kernel.org Signed-off-by: Beomho Seo beomho@samsung.com Reviewed-By: Sebastian Reichel s...@kernel.org I can't take it as is, since it depends on the private header file of PATCHv1. -- Sebastian signature.asc Description: Digital signature
[PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
From: Beomho Seo This patch adds device driver of max77843 charger. This driver provide initialize each charging mode(e.g. fast charge, top-off mode and constant charging mode so on.). Additionally, control charging paramters to use i2c interface. Cc: Sebastian Reichel Signed-off-by: Beomho Seo --- drivers/power/Kconfig|7 + drivers/power/Makefile |1 + drivers/power/max77843_charger.c | 508 ++ 3 files changed, 516 insertions(+) create mode 100644 drivers/power/max77843_charger.c diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index 27b751b..994793d 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig @@ -337,6 +337,13 @@ config CHARGER_MAX77693 help Say Y to enable support for the Maxim MAX77693 battery charger. +config CHARGER_MAX77843 + tristate "Maxim MAX77843 battery charger driver" + depends on MFD_MAX77843 + help + Say Y to enable support for the battery charger control sysfs and + platform data of MAX77843 + config CHARGER_MAX8997 tristate "Maxim MAX8997/MAX8966 PMIC battery charger driver" depends on MFD_MAX8997 && REGULATOR_MAX8997 diff --git a/drivers/power/Makefile b/drivers/power/Makefile index 36f9e0d..ed69cea 100644 --- a/drivers/power/Makefile +++ b/drivers/power/Makefile @@ -53,6 +53,7 @@ obj-$(CONFIG_CHARGER_GPIO)+= gpio-charger.o obj-$(CONFIG_CHARGER_MANAGER) += charger-manager.o obj-$(CONFIG_CHARGER_MAX14577) += max14577_charger.o obj-$(CONFIG_CHARGER_MAX77693) += max77693_charger.o +obj-$(CONFIG_CHARGER_MAX77843) += max77843_charger.o obj-$(CONFIG_CHARGER_MAX8997) += max8997_charger.o obj-$(CONFIG_CHARGER_MAX8998) += max8998_charger.o obj-$(CONFIG_CHARGER_BQ2415X) += bq2415x_charger.o diff --git a/drivers/power/max77843_charger.c b/drivers/power/max77843_charger.c new file mode 100644 index 000..d4cce17 --- /dev/null +++ b/drivers/power/max77843_charger.c @@ -0,0 +1,508 @@ +/* + * Charger driver for Maxim MAX77843 + * + * Copyright (C) 2015 Samsung Electronics, Co., Ltd. + * Author: Beomho Seo + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include + +struct max77843_charger_info { + u32 fast_charge_uamp; + u32 top_off_uamp; + u32 input_uamp_limit; +}; + +struct max77843_charger { + struct device *dev; + struct max77843 *max77843; + struct i2c_client *client; + struct regmap *regmap; + struct power_supply psy; + + struct max77843_charger_info*info; +}; + +static int max77843_charger_get_max_current(struct max77843_charger *charger) +{ + struct regmap *regmap = charger->regmap; + int ret, val = 0; + unsigned int reg_data; + + ret = regmap_read(regmap, MAX77843_CHG_REG_CHG_CNFG_09, _data); + if (ret) { + dev_err(charger->dev, + "Failed to read max current register: %d\n", ret); + return ret; + } + + if (reg_data <= 0x03) { + val = MAX77843_CHG_INPUT_CURRENT_LIMIT_MIN; + } else if (reg_data >= 0x78) { + val = MAX77843_CHG_INPUT_CURRENT_LIMIT_MAX; + } else { + val = reg_data / 3; + if (reg_data % 3 == 0) + val *= 10; + else if (reg_data % 3 == 1) + val = val * 10 + 33000; + else + val = val * 10 + 67000; + } + + return val; +} + +static int max77843_charger_get_now_current(struct max77843_charger *charger) +{ + struct regmap *regmap = charger->regmap; + int ret, val = 0; + unsigned int reg_data; + + ret = regmap_read(regmap, MAX77843_CHG_REG_CHG_CNFG_02, _data); + if (ret) { + dev_err(charger->dev, + "Failed to read charge current register: %d\n", ret); + return ret; + } + + reg_data &= MAX77843_CHG_FAST_CHG_CURRENT_MASK; + + if (reg_data <= 0x02) + val = MAX77843_CHG_FAST_CHG_CURRENT_MIN; + else if (reg_data >= 0x3f) + val = MAX77843_CHG_FAST_CHG_CURRENT_MAX; + else + val = reg_data * MAX77843_CHG_FAST_CHG_CURRENT_STEP; + + return val; +} + +static int max77843_charger_get_online(struct max77843_charger *charger) +{ + struct regmap *regmap = charger->regmap; + int ret, val = 0; + unsigned int reg_data; + + ret = regmap_read(regmap, MAX77843_CHG_REG_CHG_INT_OK, _data); + if (ret) { + dev_err(charger->dev, + "Failed to read charger status: %d\n", ret); + return ret; + } + + if (reg_data &
[PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver
From: Beomho Seo beomho@samsung.com This patch adds device driver of max77843 charger. This driver provide initialize each charging mode(e.g. fast charge, top-off mode and constant charging mode so on.). Additionally, control charging paramters to use i2c interface. Cc: Sebastian Reichel s...@kernel.org Signed-off-by: Beomho Seo beomho@samsung.com --- drivers/power/Kconfig|7 + drivers/power/Makefile |1 + drivers/power/max77843_charger.c | 508 ++ 3 files changed, 516 insertions(+) create mode 100644 drivers/power/max77843_charger.c diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index 27b751b..994793d 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig @@ -337,6 +337,13 @@ config CHARGER_MAX77693 help Say Y to enable support for the Maxim MAX77693 battery charger. +config CHARGER_MAX77843 + tristate Maxim MAX77843 battery charger driver + depends on MFD_MAX77843 + help + Say Y to enable support for the battery charger control sysfs and + platform data of MAX77843 + config CHARGER_MAX8997 tristate Maxim MAX8997/MAX8966 PMIC battery charger driver depends on MFD_MAX8997 REGULATOR_MAX8997 diff --git a/drivers/power/Makefile b/drivers/power/Makefile index 36f9e0d..ed69cea 100644 --- a/drivers/power/Makefile +++ b/drivers/power/Makefile @@ -53,6 +53,7 @@ obj-$(CONFIG_CHARGER_GPIO)+= gpio-charger.o obj-$(CONFIG_CHARGER_MANAGER) += charger-manager.o obj-$(CONFIG_CHARGER_MAX14577) += max14577_charger.o obj-$(CONFIG_CHARGER_MAX77693) += max77693_charger.o +obj-$(CONFIG_CHARGER_MAX77843) += max77843_charger.o obj-$(CONFIG_CHARGER_MAX8997) += max8997_charger.o obj-$(CONFIG_CHARGER_MAX8998) += max8998_charger.o obj-$(CONFIG_CHARGER_BQ2415X) += bq2415x_charger.o diff --git a/drivers/power/max77843_charger.c b/drivers/power/max77843_charger.c new file mode 100644 index 000..d4cce17 --- /dev/null +++ b/drivers/power/max77843_charger.c @@ -0,0 +1,508 @@ +/* + * Charger driver for Maxim MAX77843 + * + * Copyright (C) 2015 Samsung Electronics, Co., Ltd. + * Author: Beomho Seo beomho@samsung.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include linux/module.h +#include linux/platform_device.h +#include linux/power_supply.h +#include linux/mfd/max77843-private.h + +struct max77843_charger_info { + u32 fast_charge_uamp; + u32 top_off_uamp; + u32 input_uamp_limit; +}; + +struct max77843_charger { + struct device *dev; + struct max77843 *max77843; + struct i2c_client *client; + struct regmap *regmap; + struct power_supply psy; + + struct max77843_charger_info*info; +}; + +static int max77843_charger_get_max_current(struct max77843_charger *charger) +{ + struct regmap *regmap = charger-regmap; + int ret, val = 0; + unsigned int reg_data; + + ret = regmap_read(regmap, MAX77843_CHG_REG_CHG_CNFG_09, reg_data); + if (ret) { + dev_err(charger-dev, + Failed to read max current register: %d\n, ret); + return ret; + } + + if (reg_data = 0x03) { + val = MAX77843_CHG_INPUT_CURRENT_LIMIT_MIN; + } else if (reg_data = 0x78) { + val = MAX77843_CHG_INPUT_CURRENT_LIMIT_MAX; + } else { + val = reg_data / 3; + if (reg_data % 3 == 0) + val *= 10; + else if (reg_data % 3 == 1) + val = val * 10 + 33000; + else + val = val * 10 + 67000; + } + + return val; +} + +static int max77843_charger_get_now_current(struct max77843_charger *charger) +{ + struct regmap *regmap = charger-regmap; + int ret, val = 0; + unsigned int reg_data; + + ret = regmap_read(regmap, MAX77843_CHG_REG_CHG_CNFG_02, reg_data); + if (ret) { + dev_err(charger-dev, + Failed to read charge current register: %d\n, ret); + return ret; + } + + reg_data = MAX77843_CHG_FAST_CHG_CURRENT_MASK; + + if (reg_data = 0x02) + val = MAX77843_CHG_FAST_CHG_CURRENT_MIN; + else if (reg_data = 0x3f) + val = MAX77843_CHG_FAST_CHG_CURRENT_MAX; + else + val = reg_data * MAX77843_CHG_FAST_CHG_CURRENT_STEP; + + return val; +} + +static int max77843_charger_get_online(struct max77843_charger *charger) +{ + struct regmap *regmap = charger-regmap; + int ret, val = 0; + unsigned int reg_data; + + ret = regmap_read(regmap, MAX77843_CHG_REG_CHG_INT_OK, reg_data); + if (ret) { +