Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3238051imm; Sun, 16 Sep 2018 13:05:41 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYWAX01Wh+Rja0mr+4sxlmq8M/G2BgkwoqORDSNOHwOSTImtgquAlrYjGg7l3V8l838b24t X-Received: by 2002:a17:902:4a0c:: with SMTP id w12-v6mr21904923pld.289.1537128341528; Sun, 16 Sep 2018 13:05:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537128341; cv=none; d=google.com; s=arc-20160816; b=a0fIICbHGN1GxKYw7F6toALtsRtUPGHex2pw6r0y2bRig2rtKlApGC1r7rNho+yDKp I53IBBVTK65FJ6OS8hFmYzup9H6OVBiEbmicKHd1EptVGUzbfqJp03CzuYlwJkUDBuM5 RG2lndpCL/KxHKcjaOw0bJx0N2S6j4XO9hmMaRPqb8mT93/ayxGLzojmZJ1bo0m3ki49 YlIEIkDPB0QnE2nNcFzgZ/Lceib2vOfE+RYVL+Fi+ehiyO9X46wU9CXoi2KFlu929rAR i2kelwPVR13bDpVv9mBoB4CDg0pNG/MotQRNuPqDqtNRUVVqT9g/WoUU5L+7m5IQC1js NW8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=wHlXLQIm/2FwD8cP9eT/EwcDXKMqkKUFjpX2i0GQNcg=; b=CPv53nArzWt8Fw0qW2/1Ziac0GHm0qLorba4RQ2K+mTCvD+/oQeeH0D+bKIHUHDn1k vXAhlHeqK4BPpdY32YBjVcpeWmLzp0OK/HLRIPvnikB1m1ATRrgP3PBJi9reEBozKkGt nK1l+TnkB3QVe2zMk8LiFxNN/3xavxTCA/T67s367I79l1v0i93av3L51rJd8ITmFjB4 B2SsZpHCIn1lxenKGZXHJyP4baQXEo+YWnGQk6vAqb1ipWFPz1+GcWV6TVeVH+Y35/fU SJXkGt7nsWL7izC+zExqOVAT5CrsXmQR/NkMkX0k0+cArRTmjDDGsyJDAyF3I+YQvmct HEGQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id go1si14081713plb.266.2018.09.16.13.05.26; Sun, 16 Sep 2018 13:05:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728727AbeIQB1g (ORCPT + 99 others); Sun, 16 Sep 2018 21:27:36 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:47066 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728549AbeIQB0n (ORCPT ); Sun, 16 Sep 2018 21:26:43 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id 863F527DAE8 Received: by earth.universe (Postfix, from userid 1000) id 5B58B3C0C4A; Sun, 16 Sep 2018 13:35:23 +0200 (CEST) Date: Sun, 16 Sep 2018 13:35:23 +0200 From: Sebastian Reichel To: Liu Xiang , afd@ti.com Cc: pali.rohar@gmail.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, liuxiang_1999@126.com Subject: Re: [PATCH] power: supply: bq27xxx: Add support for BQ27411 Message-ID: <20180916113523.fq4n7nsasigy3wyg@earth.universe> References: <1532266436-20182-1-git-send-email-liu.xiang6@zte.com.cn> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yik6uv2as35w4qcj" Content-Disposition: inline In-Reply-To: <1532266436-20182-1-git-send-email-liu.xiang6@zte.com.cn> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --yik6uv2as35w4qcj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Sun, Jul 22, 2018 at 09:33:56PM +0800, Liu Xiang wrote: > According to the datasheet, bq27411 is similar to bq27421. >=20 > Signed-off-by: Liu Xiang > --- Looks good to me. Do you plan to test/review this Andrew, or should I proceed with merging this patch? -- Sebastian > Documentation/devicetree/bindings/power/supply/bq27xxx.txt | 1 + > drivers/power/supply/bq27xxx_battery.c | 9 +++++++++ > drivers/power/supply/bq27xxx_battery_i2c.c | 2 ++ > include/linux/power/bq27xxx_battery.h | 1 + > 4 files changed, 13 insertions(+) >=20 > diff --git a/Documentation/devicetree/bindings/power/supply/bq27xxx.txt b= /Documentation/devicetree/bindings/power/supply/bq27xxx.txt > index 37994fd..4fa8e08 100644 > --- a/Documentation/devicetree/bindings/power/supply/bq27xxx.txt > +++ b/Documentation/devicetree/bindings/power/supply/bq27xxx.txt > @@ -23,6 +23,7 @@ Required properties: > * "ti,bq27546" - BQ27546 > * "ti,bq27742" - BQ27742 > * "ti,bq27545" - BQ27545 > + * "ti,bq27411" - BQ27411 > * "ti,bq27421" - BQ27421 > * "ti,bq27425" - BQ27425 > * "ti,bq27426" - BQ27426 > diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/suppl= y/bq27xxx_battery.c > index f022e1b..6dbbe95 100644 > --- a/drivers/power/supply/bq27xxx_battery.c > +++ b/drivers/power/supply/bq27xxx_battery.c > @@ -432,6 +432,7 @@ enum bq27xxx_reg_index { > [BQ27XXX_REG_AP] =3D 0x18, > BQ27XXX_DM_REG_ROWS, > }; > +#define bq27411_regs bq27421_regs > #define bq27425_regs bq27421_regs > #define bq27426_regs bq27421_regs > #define bq27441_regs bq27421_regs > @@ -665,6 +666,7 @@ enum bq27xxx_reg_index { > POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN, > POWER_SUPPLY_PROP_MANUFACTURER, > }; > +#define bq27411_props bq27421_props > #define bq27425_props bq27421_props > #define bq27426_props bq27421_props > #define bq27441_props bq27421_props > @@ -725,6 +727,12 @@ enum bq27xxx_dm_reg_id { > #define bq27545_dm_regs 0 > #endif > =20 > +static struct bq27xxx_dm_reg bq27411_dm_regs[] =3D { > + [BQ27XXX_DM_DESIGN_CAPACITY] =3D { 82, 10, 2, 0, 32767 }, > + [BQ27XXX_DM_DESIGN_ENERGY] =3D { 82, 12, 2, 0, 32767 }, > + [BQ27XXX_DM_TERMINATE_VOLTAGE] =3D { 82, 16, 2, 2800, 3700 }, > +}; > + > static struct bq27xxx_dm_reg bq27421_dm_regs[] =3D { > [BQ27XXX_DM_DESIGN_CAPACITY] =3D { 82, 10, 2, 0, 8000 }, > [BQ27XXX_DM_DESIGN_ENERGY] =3D { 82, 12, 2, 0, 32767 }, > @@ -802,6 +810,7 @@ enum bq27xxx_dm_reg_id { > [BQ27546] =3D BQ27XXX_DATA(bq27546, 0 , BQ27XXX_O_OTDC), > [BQ27742] =3D BQ27XXX_DATA(bq27742, 0 , BQ27XXX_O_OTDC), > [BQ27545] =3D BQ27XXX_DATA(bq27545, 0x04143672, BQ27XXX_O_OTDC), > + [BQ27411] =3D BQ27XXX_DATA(bq27411, 0x80008000, BQ27XXX_O_UTOT | BQ= 27XXX_O_CFGUP | BQ27XXX_O_RAM), > [BQ27421] =3D BQ27XXX_DATA(bq27421, 0x80008000, BQ27XXX_O_UTOT | BQ= 27XXX_O_CFGUP | BQ27XXX_O_RAM), > [BQ27425] =3D BQ27XXX_DATA(bq27425, 0x04143672, BQ27XXX_O_UTOT | BQ= 27XXX_O_CFGUP), > [BQ27426] =3D BQ27XXX_DATA(bq27426, 0x80008000, BQ27XXX_O_UTOT | BQ= 27XXX_O_CFGUP | BQ27XXX_O_RAM), > diff --git a/drivers/power/supply/bq27xxx_battery_i2c.c b/drivers/power/s= upply/bq27xxx_battery_i2c.c > index 4006912..2677c38 100644 > --- a/drivers/power/supply/bq27xxx_battery_i2c.c > +++ b/drivers/power/supply/bq27xxx_battery_i2c.c > @@ -247,6 +247,7 @@ static int bq27xxx_battery_i2c_remove(struct i2c_clie= nt *client) > { "bq27546", BQ27546 }, > { "bq27742", BQ27742 }, > { "bq27545", BQ27545 }, > + { "bq27411", BQ27411 }, > { "bq27421", BQ27421 }, > { "bq27425", BQ27425 }, > { "bq27426", BQ27426 }, > @@ -279,6 +280,7 @@ static int bq27xxx_battery_i2c_remove(struct i2c_clie= nt *client) > { .compatible =3D "ti,bq27546" }, > { .compatible =3D "ti,bq27742" }, > { .compatible =3D "ti,bq27545" }, > + { .compatible =3D "ti,bq27411" }, > { .compatible =3D "ti,bq27421" }, > { .compatible =3D "ti,bq27425" }, > { .compatible =3D "ti,bq27426" }, > diff --git a/include/linux/power/bq27xxx_battery.h b/include/linux/power/= bq27xxx_battery.h > index d6355f4..507c5e2 100644 > --- a/include/linux/power/bq27xxx_battery.h > +++ b/include/linux/power/bq27xxx_battery.h > @@ -24,6 +24,7 @@ enum bq27xxx_chip { > BQ27546, > BQ27742, > BQ27545, /* bq27545 */ > + BQ27411, > BQ27421, /* bq27421, bq27441, bq27621 */ > BQ27425, > BQ27426, > --=20 > 1.9.1 >=20 --yik6uv2as35w4qcj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAlueP/sACgkQ2O7X88g7 +poJPRAAm5T5jutsFWPF4ILbtnWmPX0hQxKaqZUuBn+0ig2UoeFa1OmP7y4bkKQm I0fQnVNw5LC/WGqC/gtH3p93sNbnHUSY5zELMKs+W0jfIsx4AIhkB4T3vtBG3+77 p6VDUozo9LeYCIQiiLaYeYRaFHlbfeev1K/gCuPw9/LsBVA1QdHU+yX5azTKcnac rnMmqC1AkU3w9LSmnWiMFtfbXSw+/1/uNZSjeFTuYLq/G4nZPMHkq1DwvQQnbiVx 1qjChgGdUEPF5ak1VxcgVEXMvd2g/Z6QKOU2GrbteIq1TQCx4pVr0ACPfPHRVVjp ju12cnkbNkjq7dPU36rTctcPf5g6NuyPAWRrM49To0YjXCw5xvzW4ydrzbMMC+jC YYEYzXdkNLdm/sk/hG6IoJp/rwjYhg3OISCdznd0hbNRgZs2DKcvJqdSRtuoNhbj sfN7RzGV3AH+G6S+Usb0ZuvZ10+u8YdQQgcCHapqSrEcp60ExWqkdYtg1rAScOaB tC31qLNX39+Ux7W/NFtoP5WioDQD8TDUNQwlOgttVEn6lR/FBOETQdSUvimfPJMm 9LIeaRhErUSzIJfVUAxTdLaAsyDuFRW0HF45XG+E9Wy2efdW32JADTMYkIM1XXW8 E3Z2XxoH5FWFzsB8PE7Y2beFTr4jK6E+mmHODFuxDieo5xAIaHE= =RyYx -----END PGP SIGNATURE----- --yik6uv2as35w4qcj--