Re: [PATCH v3 14/15] charger: max14577: Configure battery-dependent settings from DTS

2014-02-20 Thread Krzysztof Kozlowski
On Thu, 2014-02-20 at 12:00 +0530, Jenny Tc wrote: > On Mon, Feb 17, 2014 at 10:05:49AM +0100, Krzysztof Kozlowski wrote: > > +static inline int max14577_init_eoc(struct max14577_charger *chg, > > + unsigned int uamp) > > +{ > > + unsigned int current_bits = 0xf; > > + u8 reg_data; >

Re: [PATCH v3 14/15] charger: max14577: Configure battery-dependent settings from DTS

2014-02-20 Thread Krzysztof Kozlowski
On Thu, 2014-02-20 at 12:00 +0530, Jenny Tc wrote: On Mon, Feb 17, 2014 at 10:05:49AM +0100, Krzysztof Kozlowski wrote: +static inline int max14577_init_eoc(struct max14577_charger *chg, + unsigned int uamp) +{ + unsigned int current_bits = 0xf; + u8 reg_data; + +

Re: [PATCH v3 14/15] charger: max14577: Configure battery-dependent settings from DTS

2014-02-19 Thread Jenny Tc
On Mon, Feb 17, 2014 at 10:05:49AM +0100, Krzysztof Kozlowski wrote: > +static inline int max14577_init_eoc(struct max14577_charger *chg, > + unsigned int uamp) > +{ > + unsigned int current_bits = 0xf; > + u8 reg_data; > + > + switch (chg->maxim_core->dev_type) { > +

Re: [PATCH v3 14/15] charger: max14577: Configure battery-dependent settings from DTS

2014-02-19 Thread Jenny Tc
On Mon, Feb 17, 2014 at 10:05:49AM +0100, Krzysztof Kozlowski wrote: +static inline int max14577_init_eoc(struct max14577_charger *chg, + unsigned int uamp) +{ + unsigned int current_bits = 0xf; + u8 reg_data; + + switch (chg-maxim_core-dev_type) { + case

Re: [PATCH v3 14/15] charger: max14577: Configure battery-dependent settings from DTS

2014-02-17 Thread Lee Jones
> > > diff --git a/include/linux/mfd/max14577-private.h > > > b/include/linux/mfd/max14577-private.h > > > index a8cd7de3526a..fc69d7beb1aa 100644 > > > --- a/include/linux/mfd/max14577-private.h > > > +++ b/include/linux/mfd/max14577-private.h > > > @@ -269,6 +269,20 @@ enum

Re: [PATCH v3 14/15] charger: max14577: Configure battery-dependent settings from DTS

2014-02-17 Thread Krzysztof Kozlowski
On Mon, 2014-02-17 at 10:07 +, Lee Jones wrote: > > diff --git a/include/linux/mfd/max14577-private.h > > b/include/linux/mfd/max14577-private.h > > index a8cd7de3526a..fc69d7beb1aa 100644 > > --- a/include/linux/mfd/max14577-private.h > > +++ b/include/linux/mfd/max14577-private.h > > @@

Re: [PATCH v3 14/15] charger: max14577: Configure battery-dependent settings from DTS

2014-02-17 Thread Lee Jones
> diff --git a/include/linux/mfd/max14577-private.h > b/include/linux/mfd/max14577-private.h > index a8cd7de3526a..fc69d7beb1aa 100644 > --- a/include/linux/mfd/max14577-private.h > +++ b/include/linux/mfd/max14577-private.h > @@ -269,6 +269,20 @@ enum maxim_muic_charger_type { > #define

[PATCH v3 14/15] charger: max14577: Configure battery-dependent settings from DTS

2014-02-17 Thread Krzysztof Kozlowski
Remove hard-coded values for: - Fast Charge current, - End Of Charge current, - Fast Charge timer, - Overvoltage Protection Threshold, - Battery Constant Voltage, and use DTS to configure them. This allows using the max14577 charger driver with different batteries. Now the charger driver

[PATCH v3 14/15] charger: max14577: Configure battery-dependent settings from DTS

2014-02-17 Thread Krzysztof Kozlowski
Remove hard-coded values for: - Fast Charge current, - End Of Charge current, - Fast Charge timer, - Overvoltage Protection Threshold, - Battery Constant Voltage, and use DTS to configure them. This allows using the max14577 charger driver with different batteries. Now the charger driver

Re: [PATCH v3 14/15] charger: max14577: Configure battery-dependent settings from DTS

2014-02-17 Thread Lee Jones
diff --git a/include/linux/mfd/max14577-private.h b/include/linux/mfd/max14577-private.h index a8cd7de3526a..fc69d7beb1aa 100644 --- a/include/linux/mfd/max14577-private.h +++ b/include/linux/mfd/max14577-private.h @@ -269,6 +269,20 @@ enum maxim_muic_charger_type { #define

Re: [PATCH v3 14/15] charger: max14577: Configure battery-dependent settings from DTS

2014-02-17 Thread Krzysztof Kozlowski
On Mon, 2014-02-17 at 10:07 +, Lee Jones wrote: diff --git a/include/linux/mfd/max14577-private.h b/include/linux/mfd/max14577-private.h index a8cd7de3526a..fc69d7beb1aa 100644 --- a/include/linux/mfd/max14577-private.h +++ b/include/linux/mfd/max14577-private.h @@ -269,6 +269,20

Re: [PATCH v3 14/15] charger: max14577: Configure battery-dependent settings from DTS

2014-02-17 Thread Lee Jones
diff --git a/include/linux/mfd/max14577-private.h b/include/linux/mfd/max14577-private.h index a8cd7de3526a..fc69d7beb1aa 100644 --- a/include/linux/mfd/max14577-private.h +++ b/include/linux/mfd/max14577-private.h @@ -269,6 +269,20 @@ enum maxim_muic_charger_type { #define