All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] Add support for the TI BQ25792 battery charger
@ 2026-03-03 15:32 Alexey Charkov
  2026-03-03 15:32 ` [PATCH 01/11] dt-bindings: mfd: ti,bq25703a: Expand to include BQ25792 Alexey Charkov
                   ` (10 more replies)
  0 siblings, 11 replies; 21+ messages in thread
From: Alexey Charkov @ 2026-03-03 15:32 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Chris Morgan, Liam Girdwood, Mark Brown, Sebastian Reichel
  Cc: devicetree, linux-kernel, Sebastian Reichel, linux-pm,
	Alexey Charkov, stable

This adds support for the TI BQ25792 battery charger, which is similar in
overall logic to the BQ25703A, but has a different register layout and
slightly different lower-level programming logic.

The series is organized as follows:
- Patch 1 adds the new variant to the existing DT binding, including the
  changes in electrical characteristics
- Patches 2-4 are minor cleanups to the existing BQ25703A OTG regulator
  driver, slimming down the code and making it more reusable for the new
  BQ25792 variant
- Patch 5 is a logical fix to the BQ25703A clamping logic for VSYSMIN
  (this is a standalone fix which can be applied independently and may be
  backported to stable)
- Patches 6-8 are slight refactoring of the existing BQ25703A charger
  driver to make it more reusable for the new BQ25792 variant
- Patch 9 adds platform data to distinguish between the two variants in
  the parent MFD driver, and binds it to the new compatible string
- Patches 10-11 add variant-specific code to support the new BQ25792
  variant in the regulator part and the charger part respectively,
  selected by the platform data added in patch 9

Signed-off-by: Alexey Charkov <alchark@flipper.net>
---
Alexey Charkov (11):
      dt-bindings: mfd: ti,bq25703a: Expand to include BQ25792
      regulator: bq257xx: Remove reference to the parent MFD's dev
      regulator: bq257xx: Drop the regulator_dev from the driver data
      regulator: bq257xx: Make OTG enable GPIO really optional
      power: supply: bq257xx: Fix VSYSMIN clamping logic
      power: supply: bq257xx: Make the default current limit a per-chip attribute
      power: supply: bq257xx: Consistently use indirect get/set helpers
      power: supply: bq257xx: Add fields for 'charging' and 'overvoltage' states
      mfd: bq257xx: Add BQ25792 support
      regulator: bq257xx: Add support for BQ25792
      power: supply: bq257xx: Add support for BQ25792

 .../devicetree/bindings/mfd/ti,bq25703a.yaml       |  79 ++-
 drivers/mfd/bq257xx.c                              |  60 ++-
 drivers/power/supply/bq257xx_charger.c             | 534 ++++++++++++++++++++-
 drivers/regulator/bq257xx-regulator.c              | 123 ++++-
 include/linux/mfd/bq257xx.h                        | 415 ++++++++++++++++
 5 files changed, 1163 insertions(+), 48 deletions(-)
---
base-commit: d517cb8cea012f43b069617fc8179b45404f8018
change-id: 20260303-bq25792-0132ac86846d

Best regards,
-- 
Alexey Charkov <alchark@flipper.net>


^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: [PATCH 09/11] mfd: bq257xx: Add BQ25792 support
@ 2026-03-06 16:13 kernel test robot
  0 siblings, 0 replies; 21+ messages in thread
From: kernel test robot @ 2026-03-06 16:13 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20260303-bq25792-v1-9-e6e5e0033458@flipper.net>
References: <20260303-bq25792-v1-9-e6e5e0033458@flipper.net>
TO: Alexey Charkov <alchark@flipper.net>
TO: Lee Jones <lee@kernel.org>
TO: Rob Herring <robh@kernel.org>
TO: Krzysztof Kozlowski <krzk@kernel.org>
TO: Conor Dooley <conor+dt@kernel.org>
TO: Chris Morgan <macromorgan@hotmail.com>
TO: Liam Girdwood <lgirdwood@gmail.com>
TO: Mark Brown <broonie@kernel.org>
TO: Sebastian Reichel <sre@kernel.org>
CC: devicetree@vger.kernel.org
CC: linux-kernel@vger.kernel.org
CC: linux-pm@vger.kernel.org
CC: Alexey Charkov <alchark@flipper.net>

Hi Alexey,

kernel test robot noticed the following build warnings:

[auto build test WARNING on d517cb8cea012f43b069617fc8179b45404f8018]

url:    https://github.com/intel-lab-lkp/linux/commits/Alexey-Charkov/dt-bindings-mfd-ti-bq25703a-Expand-to-include-BQ25792/20260303-234353
base:   d517cb8cea012f43b069617fc8179b45404f8018
patch link:    https://lore.kernel.org/r/20260303-bq25792-v1-9-e6e5e0033458%40flipper.net
patch subject: [PATCH 09/11] mfd: bq257xx: Add BQ25792 support
:::::: branch date: 3 days ago
:::::: commit date: 3 days ago
config: alpha-randconfig-r071-20260306 (https://download.01.org/0day-ci/archive/20260307/202603070045.59SILa9p-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 8.5.0
smatch: v0.5.0-9004-gb810ac53

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202603070045.59SILa9p-lkp@intel.com/

New smatch warnings:
drivers/mfd/bq257xx.c:94 bq257xx_probe() warn: sizeof(NUMBER)?

Old smatch warnings:
drivers/mfd/bq257xx.c:95 bq257xx_probe() warn: sizeof(NUMBER)?

vim +94 drivers/mfd/bq257xx.c

3b1bbfb5fce3ca9 Chris Morgan   2025-09-04   89  
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04   90  static int bq257xx_probe(struct i2c_client *client)
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04   91  {
c51ca581550d4a4 Alexey Charkov 2026-03-03   92  	const struct bq257xx_match_data *md = device_get_match_data(&client->dev);
c51ca581550d4a4 Alexey Charkov 2026-03-03   93  	const struct mfd_cell cells[] = {
c51ca581550d4a4 Alexey Charkov 2026-03-03  @94  		MFD_CELL_BASIC("bq257xx-regulator", NULL, &md->plat, sizeof(md->plat), 0),
c51ca581550d4a4 Alexey Charkov 2026-03-03   95  		MFD_CELL_BASIC("bq257xx-charger", NULL, &md->plat, sizeof(md->plat), 0),
c51ca581550d4a4 Alexey Charkov 2026-03-03   96  	};
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04   97  	struct bq257xx_device *ddata;
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04   98  	int ret;
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04   99  
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04  100  	ddata = devm_kzalloc(&client->dev, sizeof(*ddata), GFP_KERNEL);
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04  101  	if (!ddata)
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04  102  		return -ENOMEM;
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04  103  
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04  104  	ddata->client = client;
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04  105  
c51ca581550d4a4 Alexey Charkov 2026-03-03  106  	ddata->regmap = devm_regmap_init_i2c(client, md->regmap_config);
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04  107  	if (IS_ERR(ddata->regmap)) {
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04  108  		return dev_err_probe(&client->dev, PTR_ERR(ddata->regmap),
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04  109  				     "Failed to allocate register map\n");
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04  110  	}
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04  111  
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04  112  	i2c_set_clientdata(client, ddata);
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04  113  
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04  114  	ret = devm_mfd_add_devices(&client->dev, PLATFORM_DEVID_AUTO,
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04  115  				   cells, ARRAY_SIZE(cells), NULL, 0, NULL);
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04  116  	if (ret)
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04  117  		return dev_err_probe(&client->dev, ret,
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04  118  				     "Failed to register child devices\n");
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04  119  
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04  120  	return ret;
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04  121  }
3b1bbfb5fce3ca9 Chris Morgan   2025-09-04  122  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2026-03-09  7:39 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-03 15:32 [PATCH 00/11] Add support for the TI BQ25792 battery charger Alexey Charkov
2026-03-03 15:32 ` [PATCH 01/11] dt-bindings: mfd: ti,bq25703a: Expand to include BQ25792 Alexey Charkov
2026-03-03 16:26   ` Rob Herring (Arm)
2026-03-04  9:34     ` Alexey Charkov
2026-03-04  8:32   ` Krzysztof Kozlowski
2026-03-04  8:50     ` Alexey Charkov
2026-03-04  8:33   ` Krzysztof Kozlowski
2026-03-04  8:53     ` Alexey Charkov
2026-03-03 15:32 ` [PATCH 02/11] regulator: bq257xx: Remove reference to the parent MFD's dev Alexey Charkov
2026-03-03 15:32 ` [PATCH 03/11] regulator: bq257xx: Drop the regulator_dev from the driver data Alexey Charkov
2026-03-03 15:32 ` [PATCH 04/11] regulator: bq257xx: Make OTG enable GPIO really optional Alexey Charkov
2026-03-03 15:32 ` [PATCH 05/11] power: supply: bq257xx: Fix VSYSMIN clamping logic Alexey Charkov
2026-03-03 15:32 ` [PATCH 06/11] power: supply: bq257xx: Make the default current limit a per-chip attribute Alexey Charkov
2026-03-03 15:32 ` [PATCH 07/11] power: supply: bq257xx: Consistently use indirect get/set helpers Alexey Charkov
2026-03-03 15:32 ` [PATCH 08/11] power: supply: bq257xx: Add fields for 'charging' and 'overvoltage' states Alexey Charkov
2026-03-03 15:32 ` [PATCH 09/11] mfd: bq257xx: Add BQ25792 support Alexey Charkov
2026-03-06 14:15   ` Lee Jones
2026-03-09  7:39     ` Alexey Charkov
2026-03-03 15:32 ` [PATCH 10/11] regulator: bq257xx: Add support for BQ25792 Alexey Charkov
2026-03-03 15:32 ` [PATCH 11/11] power: supply: " Alexey Charkov
  -- strict thread matches above, loose matches on Subject: below --
2026-03-06 16:13 [PATCH 09/11] mfd: bq257xx: Add BQ25792 support kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.