From nobody Mon Jun 8 17:38:06 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DB99739023C for ; Wed, 27 May 2026 19:38:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779910733; cv=none; b=Xa6pSHF2BD5S0EUWUOV9UOEy1qV2rrEualhzKj3wNSvjrar7SWxVLL16T1XsbuZW36kVmxAq1cwx020Gtf1DVK1qgsjgXWcEVJDJSOsvesi4hS261+v5hy6FMAVVae5tO9RbKb/52ej1xB7vEteK0aOyYqcUYtaVnxLnv3zjTTs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779910733; c=relaxed/simple; bh=7LYeBEHTpohtxh3Vg5VjEmUQM6U/rEiLLy282DgOX1E=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=iKkizTQEwkAEvW76RKKW71YK40dKNFmJiy/2Qdu9CJZQrka+4fWqRlUD8TWc3omn5lvp76XKMmd283zsWBq09dG0CWUmJzuHWRIngLjDrXX3LpcihUQCgK+bkD1XIujgXoQ+dFl9gbij+Pj0lSOKPZWgwHp+WXJXfIO9gjxG7ic= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PMtNqZgW; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PMtNqZgW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D26A61F000E9; Wed, 27 May 2026 19:38:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779910725; bh=0tUyWdkxglrmc6ex9KIBtC+nzITzHDu72sn73/WCMdE=; h=From:To:Cc:Subject:Date; b=PMtNqZgWsz6G+el4p1p1jpPEUsn26eyxkUlTjjABe8EyljJgqw/B2FEx0jJ7ac32l AW8AAwuodCEZbnQaEZvcB+PNA3B1iVZYIbJDDdMigHxI8YPTmRqQff6gx7np2/TgIX xM6nT5Y5cSh6TvWZg6oHqwnFNTNKX4223feIeu49NJcvD6UA9YcZyq+dIYDokao4Cc H3QJj/AwQGVdCYX7pS+1ZEfZdMI4uzl7qQaDJn7vbi7CJ7BGezkwOfK5h+F3lIJs5g jFb6ESuq7aHmjMRmTNqP30/pq1nnbYqY3KnO2OBxuPCk0z01etNqICzXQMfhNHbGX/ /fCokFBRSUGLQ== From: Arnd Bergmann To: Liam Girdwood , Mark Brown Cc: Arnd Bergmann , Lee Jones , linux-kernel@vger.kernel.org Subject: [PATCH] regulator: remove used pcap regulator driver Date: Wed, 27 May 2026 21:37:44 +0200 Message-Id: <20260527193837.3436148-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann The platform was removed a few years ago, and the mfd driver is also gone now, so it is impossible to build or use it. Signed-off-by: Arnd Bergmann --- drivers/regulator/Kconfig | 7 - drivers/regulator/Makefile | 1 - drivers/regulator/pcap-regulator.c | 274 ----------------------------- 3 files changed, 282 deletions(-) delete mode 100644 drivers/regulator/pcap-regulator.c diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 2c7cdc8dca36..4271a17eb18d 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -1058,13 +1058,6 @@ config REGULATOR_PF9453 help Say y here to support the NXP PF9453 PMIC regulator driver. =20 -config REGULATOR_PCAP - tristate "Motorola PCAP2 regulator driver" - depends on EZX_PCAP - help - This driver provides support for the voltage regulators of the - PCAP2 PMIC. - config REGULATOR_PF0900 tristate "NXP PF0900/PF0901/PF09XX regulator driver" depends on I2C diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile index 98ecbbc3c6b7..134eee274dbf 100644 --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile @@ -142,7 +142,6 @@ obj-$(CONFIG_REGULATOR_PV88090) +=3D pv88090-regulator.o obj-$(CONFIG_REGULATOR_PWM) +=3D pwm-regulator.o obj-$(CONFIG_REGULATOR_TPS51632) +=3D tps51632-regulator.o obj-$(CONFIG_REGULATOR_PBIAS) +=3D pbias-regulator.o -obj-$(CONFIG_REGULATOR_PCAP) +=3D pcap-regulator.o obj-$(CONFIG_REGULATOR_RAA215300) +=3D raa215300.o obj-$(CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY) +=3D rpi-panel-att= iny-regulator.o obj-$(CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_V2) +=3D rpi-panel-v2-regu= lator.o diff --git a/drivers/regulator/pcap-regulator.c b/drivers/regulator/pcap-re= gulator.c deleted file mode 100644 index 441c9344aef7..000000000000 --- a/drivers/regulator/pcap-regulator.c +++ /dev/null @@ -1,274 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* - * PCAP2 Regulator Driver - * - * Copyright (c) 2009 Daniel Ribeiro - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -static const unsigned int V1_table[] =3D { - 2775000, 1275000, 1600000, 1725000, 1825000, 1925000, 2075000, 2275000, -}; - -static const unsigned int V2_table[] =3D { - 2500000, 2775000, -}; - -static const unsigned int V3_table[] =3D { - 1075000, 1275000, 1550000, 1725000, 1876000, 1950000, 2075000, 2275000, -}; - -static const unsigned int V4_table[] =3D { - 1275000, 1550000, 1725000, 1875000, 1950000, 2075000, 2275000, 2775000, -}; - -static const unsigned int V5_table[] =3D { - 1875000, 2275000, 2475000, 2775000, -}; - -static const unsigned int V6_table[] =3D { - 2475000, 2775000, -}; - -static const unsigned int V7_table[] =3D { - 1875000, 2775000, -}; - -#define V8_table V4_table - -static const unsigned int V9_table[] =3D { - 1575000, 1875000, 2475000, 2775000, -}; - -static const unsigned int V10_table[] =3D { - 5000000, -}; - -static const unsigned int VAUX1_table[] =3D { - 1875000, 2475000, 2775000, 3000000, -}; - -#define VAUX2_table VAUX1_table - -static const unsigned int VAUX3_table[] =3D { - 1200000, 1200000, 1200000, 1200000, 1400000, 1600000, 1800000, 2000000, - 2200000, 2400000, 2600000, 2800000, 3000000, 3200000, 3400000, 3600000, -}; - -static const unsigned int VAUX4_table[] =3D { - 1800000, 1800000, 3000000, 5000000, -}; - -static const unsigned int VSIM_table[] =3D { - 1875000, 3000000, -}; - -static const unsigned int VSIM2_table[] =3D { - 1875000, -}; - -static const unsigned int VVIB_table[] =3D { - 1300000, 1800000, 2000000, 3000000, -}; - -static const unsigned int SW1_table[] =3D { - 900000, 950000, 1000000, 1050000, 1100000, 1150000, 1200000, 1250000, - 1300000, 1350000, 1400000, 1450000, 1500000, 1600000, 1875000, 2250000, -}; - -#define SW2_table SW1_table - -struct pcap_regulator { - const u8 reg; - const u8 en; - const u8 index; - const u8 stby; - const u8 lowpwr; -}; - -#define NA 0xff - -#define VREG_INFO(_vreg, _reg, _en, _index, _stby, _lowpwr) \ - [_vreg] =3D { \ - .reg =3D _reg, \ - .en =3D _en, \ - .index =3D _index, \ - .stby =3D _stby, \ - .lowpwr =3D _lowpwr, \ - } - -static const struct pcap_regulator vreg_table[] =3D { - VREG_INFO(V1, PCAP_REG_VREG1, 1, 2, 18, 0), - VREG_INFO(V2, PCAP_REG_VREG1, 5, 6, 19, 22), - VREG_INFO(V3, PCAP_REG_VREG1, 7, 8, 20, 23), - VREG_INFO(V4, PCAP_REG_VREG1, 11, 12, 21, 24), - /* V5 STBY and LOWPWR are on PCAP_REG_VREG2 */ - VREG_INFO(V5, PCAP_REG_VREG1, 15, 16, 12, 19), - - VREG_INFO(V6, PCAP_REG_VREG2, 1, 2, 14, 20), - VREG_INFO(V7, PCAP_REG_VREG2, 3, 4, 15, 21), - VREG_INFO(V8, PCAP_REG_VREG2, 5, 6, 16, 22), - VREG_INFO(V9, PCAP_REG_VREG2, 9, 10, 17, 23), - VREG_INFO(V10, PCAP_REG_VREG2, 10, NA, 18, 24), - - VREG_INFO(VAUX1, PCAP_REG_AUXVREG, 1, 2, 22, 23), - /* VAUX2 ... VSIM2 STBY and LOWPWR are on PCAP_REG_LOWPWR */ - VREG_INFO(VAUX2, PCAP_REG_AUXVREG, 4, 5, 0, 1), - VREG_INFO(VAUX3, PCAP_REG_AUXVREG, 7, 8, 2, 3), - VREG_INFO(VAUX4, PCAP_REG_AUXVREG, 12, 13, 4, 5), - VREG_INFO(VSIM, PCAP_REG_AUXVREG, 17, 18, NA, 6), - VREG_INFO(VSIM2, PCAP_REG_AUXVREG, 16, NA, NA, 7), - VREG_INFO(VVIB, PCAP_REG_AUXVREG, 19, 20, NA, NA), - - VREG_INFO(SW1, PCAP_REG_SWCTRL, 1, 2, NA, NA), - VREG_INFO(SW2, PCAP_REG_SWCTRL, 6, 7, NA, NA), - /* SW3 STBY is on PCAP_REG_AUXVREG */ - VREG_INFO(SW3, PCAP_REG_SWCTRL, 11, 12, 24, NA), - - /* SWxS used to control SWx voltage on standby */ -/* VREG_INFO(SW1S, PCAP_REG_LOWPWR, NA, 12, NA, NA), - VREG_INFO(SW2S, PCAP_REG_LOWPWR, NA, 20, NA, NA), */ -}; - -static int pcap_regulator_set_voltage_sel(struct regulator_dev *rdev, - unsigned selector) -{ - const struct pcap_regulator *vreg =3D &vreg_table[rdev_get_id(rdev)]; - void *pcap =3D rdev_get_drvdata(rdev); - - /* the regulator doesn't support voltage switching */ - if (rdev->desc->n_voltages =3D=3D 1) - return -EINVAL; - - return ezx_pcap_set_bits(pcap, vreg->reg, - (rdev->desc->n_voltages - 1) << vreg->index, - selector << vreg->index); -} - -static int pcap_regulator_get_voltage_sel(struct regulator_dev *rdev) -{ - const struct pcap_regulator *vreg =3D &vreg_table[rdev_get_id(rdev)]; - void *pcap =3D rdev_get_drvdata(rdev); - u32 tmp; - - if (rdev->desc->n_voltages =3D=3D 1) - return 0; - - ezx_pcap_read(pcap, vreg->reg, &tmp); - tmp =3D ((tmp >> vreg->index) & (rdev->desc->n_voltages - 1)); - return tmp; -} - -static int pcap_regulator_enable(struct regulator_dev *rdev) -{ - const struct pcap_regulator *vreg =3D &vreg_table[rdev_get_id(rdev)]; - void *pcap =3D rdev_get_drvdata(rdev); - - if (vreg->en =3D=3D NA) - return -EINVAL; - - return ezx_pcap_set_bits(pcap, vreg->reg, 1 << vreg->en, 1 << vreg->en); -} - -static int pcap_regulator_disable(struct regulator_dev *rdev) -{ - const struct pcap_regulator *vreg =3D &vreg_table[rdev_get_id(rdev)]; - void *pcap =3D rdev_get_drvdata(rdev); - - if (vreg->en =3D=3D NA) - return -EINVAL; - - return ezx_pcap_set_bits(pcap, vreg->reg, 1 << vreg->en, 0); -} - -static int pcap_regulator_is_enabled(struct regulator_dev *rdev) -{ - const struct pcap_regulator *vreg =3D &vreg_table[rdev_get_id(rdev)]; - void *pcap =3D rdev_get_drvdata(rdev); - u32 tmp; - - if (vreg->en =3D=3D NA) - return -EINVAL; - - ezx_pcap_read(pcap, vreg->reg, &tmp); - return (tmp >> vreg->en) & 1; -} - -static const struct regulator_ops pcap_regulator_ops =3D { - .list_voltage =3D regulator_list_voltage_table, - .set_voltage_sel =3D pcap_regulator_set_voltage_sel, - .get_voltage_sel =3D pcap_regulator_get_voltage_sel, - .enable =3D pcap_regulator_enable, - .disable =3D pcap_regulator_disable, - .is_enabled =3D pcap_regulator_is_enabled, -}; - -#define VREG(_vreg) \ - [_vreg] =3D { \ - .name =3D #_vreg, \ - .id =3D _vreg, \ - .n_voltages =3D ARRAY_SIZE(_vreg##_table), \ - .volt_table =3D _vreg##_table, \ - .ops =3D &pcap_regulator_ops, \ - .type =3D REGULATOR_VOLTAGE, \ - .owner =3D THIS_MODULE, \ - } - -static const struct regulator_desc pcap_regulators[] =3D { - VREG(V1), VREG(V2), VREG(V3), VREG(V4), VREG(V5), VREG(V6), VREG(V7), - VREG(V8), VREG(V9), VREG(V10), VREG(VAUX1), VREG(VAUX2), VREG(VAUX3), - VREG(VAUX4), VREG(VSIM), VREG(VSIM2), VREG(VVIB), VREG(SW1), VREG(SW2), -}; - -static int pcap_regulator_probe(struct platform_device *pdev) -{ - struct regulator_dev *rdev; - void *pcap =3D dev_get_drvdata(pdev->dev.parent); - struct regulator_config config =3D { }; - - config.dev =3D &pdev->dev; - config.init_data =3D dev_get_platdata(&pdev->dev); - config.driver_data =3D pcap; - - rdev =3D devm_regulator_register(&pdev->dev, &pcap_regulators[pdev->id], - &config); - if (IS_ERR(rdev)) - return PTR_ERR(rdev); - - platform_set_drvdata(pdev, rdev); - - return 0; -} - -static struct platform_driver pcap_regulator_driver =3D { - .driver =3D { - .name =3D "pcap-regulator", - .probe_type =3D PROBE_PREFER_ASYNCHRONOUS, - }, - .probe =3D pcap_regulator_probe, -}; - -static int __init pcap_regulator_init(void) -{ - return platform_driver_register(&pcap_regulator_driver); -} - -static void __exit pcap_regulator_exit(void) -{ - platform_driver_unregister(&pcap_regulator_driver); -} - -subsys_initcall(pcap_regulator_init); -module_exit(pcap_regulator_exit); - -MODULE_AUTHOR("Daniel Ribeiro "); -MODULE_DESCRIPTION("PCAP2 Regulator Driver"); -MODULE_LICENSE("GPL"); --=20 2.39.5