diff mbox series

[1/7] dt-bindings: power: bq27xxx: add bq34z100

Message ID 20200908201319.3567-1-krzk@kernel.org
State Accepted
Commit 3e8282a3602953575f6abf420a1ccaf2c22ef8ad
Headers show
Series [1/7] dt-bindings: power: bq27xxx: add bq34z100 | expand

Commit Message

Krzysztof Kozlowski Sept. 8, 2020, 8:13 p.m. UTC
Add compatible for bq34z100 charger.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 Documentation/devicetree/bindings/power/supply/bq27xxx.yaml | 1 +
 1 file changed, 1 insertion(+)

Comments

Dan Murphy Sept. 8, 2020, 8:53 p.m. UTC | #1
Krzysztof

On 9/8/20 3:13 PM, Krzysztof Kozlowski wrote:
> BIT() is a preferred way to toggle bit-like flags: no problems with 32/64
> bit systems, less chances for mistakes.
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>   drivers/power/supply/bq27xxx_battery.c | 15 ++++++++-------
>   1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
> index 2deac3fbb036..e971af43dd45 100644
> --- a/drivers/power/supply/bq27xxx_battery.c
> +++ b/drivers/power/supply/bq27xxx_battery.c
> @@ -847,13 +847,14 @@ static struct bq27xxx_dm_reg bq27621_dm_regs[] = {
>   
>   #define bq27z561_dm_regs 0
>   #define bq28z610_dm_regs 0
> -
> -#define BQ27XXX_O_ZERO	0x00000001
> -#define BQ27XXX_O_OTDC	0x00000002 /* has OTC/OTD overtemperature flags */
> -#define BQ27XXX_O_UTOT  0x00000004 /* has OT overtemperature flag */
> -#define BQ27XXX_O_CFGUP	0x00000008
> -#define BQ27XXX_O_RAM	0x00000010
> -#define BQ27Z561_O_BITS	0x00000020
> +#define bq34z100_dm_regs 0
> +
> +#define BQ27XXX_O_ZERO		BIT(0)
> +#define BQ27XXX_O_OTDC		BIT(1) /* has OTC/OTD overtemperature flags */
> +#define BQ27XXX_O_UTOT		BIT(2) /* has OT overtemperature flag */
> +#define BQ27XXX_O_CFGUP		BIT(3)
> +#define BQ27XXX_O_RAM		BIT(4)
> +#define BQ27Z561_O_BITS		BIT(5)
>   

It seems you have added whitespaces that you submitted a patch to fix in 
3/7.

Also squash 3 and 4.

Dan
Krzysztof Kozlowski Sept. 9, 2020, 6:38 a.m. UTC | #2
On Tue, 8 Sep 2020 at 22:53, Dan Murphy <dmurphy@ti.com> wrote:
>
> Krzysztof
>
> On 9/8/20 3:13 PM, Krzysztof Kozlowski wrote:
> > BIT() is a preferred way to toggle bit-like flags: no problems with 32/64
> > bit systems, less chances for mistakes.
> >
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> > ---
> >   drivers/power/supply/bq27xxx_battery.c | 15 ++++++++-------
> >   1 file changed, 8 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
> > index 2deac3fbb036..e971af43dd45 100644
> > --- a/drivers/power/supply/bq27xxx_battery.c
> > +++ b/drivers/power/supply/bq27xxx_battery.c
> > @@ -847,13 +847,14 @@ static struct bq27xxx_dm_reg bq27621_dm_regs[] = {
> >
> >   #define bq27z561_dm_regs 0
> >   #define bq28z610_dm_regs 0
> > -
> > -#define BQ27XXX_O_ZERO       0x00000001
> > -#define BQ27XXX_O_OTDC       0x00000002 /* has OTC/OTD overtemperature flags */
> > -#define BQ27XXX_O_UTOT  0x00000004 /* has OT overtemperature flag */
> > -#define BQ27XXX_O_CFGUP      0x00000008
> > -#define BQ27XXX_O_RAM        0x00000010
> > -#define BQ27Z561_O_BITS      0x00000020
> > +#define bq34z100_dm_regs 0
> > +
> > +#define BQ27XXX_O_ZERO               BIT(0)
> > +#define BQ27XXX_O_OTDC               BIT(1) /* has OTC/OTD overtemperature flags */
> > +#define BQ27XXX_O_UTOT               BIT(2) /* has OT overtemperature flag */
> > +#define BQ27XXX_O_CFGUP              BIT(3)
> > +#define BQ27XXX_O_RAM                BIT(4)
> > +#define BQ27Z561_O_BITS              BIT(5)
> >
>
> It seems you have added whitespaces that you submitted a patch to fix in
> 3/7.

I shouldn't... 3/7 is different #define: BQ27Z561_FLAG_FC
Here it might look like not indented properly due to the patch format.
In the file, when applying, the entries are aligned correctly.

>
> Also squash 3 and 4.

Whitespace with BIT conversion? Sure, I can. These are separate places
and different types of cleanup, but no problem to squash them.

Best regards,
Krzysztof
Rob Herring Sept. 15, 2020, 5:12 p.m. UTC | #3
On Tue, 08 Sep 2020 22:13:13 +0200, Krzysztof Kozlowski wrote:
> Add compatible for bq34z100 charger.

> 

> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

> ---

>  Documentation/devicetree/bindings/power/supply/bq27xxx.yaml | 1 +

>  1 file changed, 1 insertion(+)

> 


Acked-by: Rob Herring <robh@kernel.org>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/power/supply/bq27xxx.yaml b/Documentation/devicetree/bindings/power/supply/bq27xxx.yaml
index 82f682705f44..45beefccf31a 100644
--- a/Documentation/devicetree/bindings/power/supply/bq27xxx.yaml
+++ b/Documentation/devicetree/bindings/power/supply/bq27xxx.yaml
@@ -51,6 +51,7 @@  properties:
       - ti,bq27621
       - ti,bq27z561
       - ti,bq28z610
+      - ti,bq34z100
 
   reg:
     maxItems: 1