From nobody Sat Nov 30 12:46:14 2024 Received: from msa.smtpout.orange.fr (smtp-66.smtpout.orange.fr [80.12.242.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B7ED18C00C for ; Mon, 9 Sep 2024 19:31:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.66 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725910271; cv=none; b=iatvlxTqQy0QMmpOQ3h/jCX3+FlvILt56E2/BQeDIfT+e6jFYkWqoeG7tWVrzb/hDO/ilgc8AKnVT7puzKLQWJsNOSARcK/xZUBQz9XcdtK1jTDMBhbEhNdNAtdttqxYlW42mvumRCZPw7chgeMcdOGW2JjzsmDfi3FgT+nd+D8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725910271; c=relaxed/simple; bh=1QL1CKNNveStwudW9s95TeycLNIw95+S1ITVaXHJm24=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=GAcvDzXlMoOZnCGUrakrA+QpM4l7/wD4ZE60psMMglQ3UDzil3MxRtENrGLZJ5ZjK6QM2GeEEDCgAKgHz5Sw8rmGo1T/Pz+PtGcAd1nPFhmz44PYf7HAzU5Sjp6CPNyi2dZCyvSfaUxah0X0mMOPvtQO+8zKJcvQosUwZwH2a60= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=Dero/V+N; arc=none smtp.client-ip=80.12.242.66 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="Dero/V+N" Received: from fedora.home ([90.11.132.44]) by smtp.orange.fr with ESMTPA id nk6BsbkpIZ40ank6Bsl9Br; Mon, 09 Sep 2024 21:31:00 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1725910260; bh=iXQbrMHrxHSsX1BIEgauoIbcXr4RNqpN6V0TKtKeNgY=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Dero/V+Nn56UiP8TXbdhd2Mid3Y4q9TTnyWnO47DHpqp2h8oLcIo4K8/qh74cD1Hr z6VtB/H2fsu2D9d9LkkccSKuOYFUJMGAYeMdUvU+lsypRrcyS3jDemg5l6V+zQ1cwN /wm4kruDwyt1L6wTgAWR2qYKkjKQp6vj66YXvTPng0SZJKYRLscCpQ6ApeLi+T7w/X EDpFfV4JNav8Cbc3hiDmUB3JhhBEW2pu75YGIpiQcsGkOB2Bwc3XIhWVhugW/uiGDk b6Lzs8Cp9LrgATwiLfVpvyU2xz0Ii9hvPeCGRd7thi+FrVsvaU1PDSbQgJwjRsUvqJ t2YPrYk5kf8aQ== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 09 Sep 2024 21:31:00 +0200 X-ME-IP: 90.11.132.44 From: Christophe JAILLET To: markuss.broks@gmail.com, Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] regulator: sm5703: Remove because it is unused and fails to build Date: Mon, 9 Sep 2024 21:30:51 +0200 Message-ID: <0f5da91a05e7343d290c88e3c583b674cf6219ac.1725910247.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.46.0 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" This file does not compile because is missing. In KConfig, it depends on MFD_SM5703. Both MFD_SM5703 and the missing include rely on another patch that never got merged. The last iteration related to this patch is [1]. So remove this dead-code and undo commit e8858ba89ca3 ("regulator: sm5703-regulator: Add regulators support for SM5703 MFD") [1]: https://lore.kernel.org/lkml/20220423085319.483524-5-markuss.broks@gma= il.com/ Signed-off-by: Christophe JAILLET --- Apparently, discussion to include the needed other patch ended 2 years ago. Could this be useful for something else with the other driver, at least should be merged and Kconfig modified. So not sure if removing is the best way to go, but at least, in the current state, it is unusable. Note: spotted while looking for opportunities to constify some struct regulator_desc. --- drivers/regulator/Kconfig | 7 -- drivers/regulator/Makefile | 1 - drivers/regulator/sm5703-regulator.c | 170 --------------------------- 3 files changed, 178 deletions(-) delete mode 100644 drivers/regulator/sm5703-regulator.c diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 4b411a09c1a6..39297f7d8177 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -1373,13 +1373,6 @@ config REGULATOR_SLG51000 The SLG51000 is seven compact and customizable low dropout regulators. =20 -config REGULATOR_SM5703 - tristate "Silicon Mitus SM5703 regulators" - depends on MFD_SM5703 - help - This driver provides support for voltage regulators of SM5703 - multi-function device. - config REGULATOR_STM32_BOOSTER tristate "STMicroelectronics STM32 BOOSTER" depends on ARCH_STM32 || COMPILE_TEST diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile index a61fa42b13c4..3d5a803dce8a 100644 --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile @@ -160,7 +160,6 @@ obj-$(CONFIG_REGULATOR_S5M8767) +=3D s5m8767.o obj-$(CONFIG_REGULATOR_SC2731) +=3D sc2731-regulator.o obj-$(CONFIG_REGULATOR_SKY81452) +=3D sky81452-regulator.o obj-$(CONFIG_REGULATOR_SLG51000) +=3D slg51000-regulator.o -obj-$(CONFIG_REGULATOR_SM5703) +=3D sm5703-regulator.o obj-$(CONFIG_REGULATOR_STM32_BOOSTER) +=3D stm32-booster.o obj-$(CONFIG_REGULATOR_STM32_VREFBUF) +=3D stm32-vrefbuf.o obj-$(CONFIG_REGULATOR_STM32_PWR) +=3D stm32-pwr.o diff --git a/drivers/regulator/sm5703-regulator.c b/drivers/regulator/sm570= 3-regulator.c deleted file mode 100644 index 702461cf075e..000000000000 --- a/drivers/regulator/sm5703-regulator.c +++ /dev/null @@ -1,170 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only - -#include -#include -#include -#include -#include -#include -#include - -enum sm5703_regulators { - SM5703_BUCK, - SM5703_LDO1, - SM5703_LDO2, - SM5703_LDO3, - SM5703_USBLDO1, - SM5703_USBLDO2, - SM5703_VBUS, - SM5703_MAX_REGULATORS, -}; - -static const int sm5703_ldo_voltagemap[] =3D { - 1500000, 1800000, 2600000, 2800000, 3000000, 3300000, -}; - -static const int sm5703_buck_voltagemap[] =3D { - 1000000, 1000000, 1000000, 1000000, - 1000000, 1000000, 1000000, 1000000, - 1000000, 1000000, 1000000, 1100000, - 1200000, 1300000, 1400000, 1500000, - 1600000, 1700000, 1800000, 1900000, - 2000000, 2100000, 2200000, 2300000, - 2400000, 2500000, 2600000, 2700000, - 2800000, 2900000, 3000000, 3000000, -}; - -#define SM5703USBLDO(_name, _id) \ - [SM5703_USBLDO ## _id] =3D { \ - .name =3D _name, \ - .of_match =3D _name, \ - .regulators_node =3D "regulators", \ - .type =3D REGULATOR_VOLTAGE, \ - .id =3D SM5703_USBLDO ## _id, \ - .ops =3D &sm5703_regulator_ops_fixed, \ - .n_voltages =3D 1, \ - .fixed_uV =3D SM5703_USBLDO_MICROVOLT, \ - .enable_reg =3D SM5703_REG_USBLDO12, \ - .enable_mask =3D SM5703_REG_EN_USBLDO ##_id, \ - .owner =3D THIS_MODULE, \ - } - -#define SM5703VBUS(_name) \ - [SM5703_VBUS] =3D { \ - .name =3D _name, \ - .of_match =3D _name, \ - .regulators_node =3D "regulators", \ - .type =3D REGULATOR_VOLTAGE, \ - .id =3D SM5703_VBUS, \ - .ops =3D &sm5703_regulator_ops_fixed, \ - .n_voltages =3D 1, \ - .fixed_uV =3D SM5703_VBUS_MICROVOLT, \ - .enable_reg =3D SM5703_REG_CNTL, \ - .enable_mask =3D SM5703_OPERATION_MODE_MASK, \ - .enable_val =3D SM5703_OPERATION_MODE_USB_OTG_MODE, \ - .disable_val =3D SM5703_OPERATION_MODE_CHARGING_ON, \ - .owner =3D THIS_MODULE, \ - } - -#define SM5703BUCK(_name) \ - [SM5703_BUCK] =3D { \ - .name =3D _name, \ - .of_match =3D _name, \ - .regulators_node =3D "regulators", \ - .type =3D REGULATOR_VOLTAGE, \ - .id =3D SM5703_BUCK, \ - .ops =3D &sm5703_regulator_ops, \ - .n_voltages =3D ARRAY_SIZE(sm5703_buck_voltagemap), \ - .volt_table =3D sm5703_buck_voltagemap, \ - .vsel_reg =3D SM5703_REG_BUCK, \ - .vsel_mask =3D SM5703_BUCK_VOLT_MASK, \ - .enable_reg =3D SM5703_REG_BUCK, \ - .enable_mask =3D SM5703_REG_EN_BUCK, \ - .owner =3D THIS_MODULE, \ - } - -#define SM5703LDO(_name, _id) \ - [SM5703_LDO ## _id] =3D { \ - .name =3D _name, \ - .of_match =3D _name, \ - .regulators_node =3D "regulators", \ - .type =3D REGULATOR_VOLTAGE, \ - .id =3D SM5703_LDO ## _id, \ - .ops =3D &sm5703_regulator_ops, \ - .n_voltages =3D ARRAY_SIZE(sm5703_ldo_voltagemap), \ - .volt_table =3D sm5703_ldo_voltagemap, \ - .vsel_reg =3D SM5703_REG_LDO ##_id, \ - .vsel_mask =3D SM5703_LDO_VOLT_MASK, \ - .enable_reg =3D SM5703_REG_LDO ##_id, \ - .enable_mask =3D SM5703_LDO_EN, \ - .owner =3D THIS_MODULE, \ - } - -static const struct regulator_ops sm5703_regulator_ops =3D { - .enable =3D regulator_enable_regmap, - .disable =3D regulator_disable_regmap, - .is_enabled =3D regulator_is_enabled_regmap, - .list_voltage =3D regulator_list_voltage_table, - .get_voltage_sel =3D regulator_get_voltage_sel_regmap, - .set_voltage_sel =3D regulator_set_voltage_sel_regmap, -}; - -static const struct regulator_ops sm5703_regulator_ops_fixed =3D { - .enable =3D regulator_enable_regmap, - .disable =3D regulator_disable_regmap, - .is_enabled =3D regulator_is_enabled_regmap, -}; - -static struct regulator_desc sm5703_regulators_desc[SM5703_MAX_REGULATORS]= =3D { - SM5703BUCK("buck"), - SM5703LDO("ldo1", 1), - SM5703LDO("ldo2", 2), - SM5703LDO("ldo3", 3), - SM5703USBLDO("usbldo1", 1), - SM5703USBLDO("usbldo2", 2), - SM5703VBUS("vbus"), -}; - -static int sm5703_regulator_probe(struct platform_device *pdev) -{ - struct device *dev =3D &pdev->dev; - struct regulator_config config =3D { NULL, }; - struct regulator_dev *rdev; - struct sm5703_dev *sm5703 =3D dev_get_drvdata(pdev->dev.parent); - int i; - - config.dev =3D dev->parent; - config.regmap =3D sm5703->regmap; - - for (i =3D 0; i < SM5703_MAX_REGULATORS; i++) { - rdev =3D devm_regulator_register(dev, - &sm5703_regulators_desc[i], - &config); - if (IS_ERR(rdev)) - return dev_err_probe(dev, PTR_ERR(rdev), - "Failed to register a regulator\n"); - } - - return 0; -} - -static const struct platform_device_id sm5703_regulator_id[] =3D { - { "sm5703-regulator", 0 }, - {} -}; -MODULE_DEVICE_TABLE(platform, sm5703_regulator_id); - -static struct platform_driver sm5703_regulator_driver =3D { - .driver =3D { - .name =3D "sm5703-regulator", - .probe_type =3D PROBE_PREFER_ASYNCHRONOUS, - }, - .probe =3D sm5703_regulator_probe, - .id_table =3D sm5703_regulator_id, -}; - -module_platform_driver(sm5703_regulator_driver); - -MODULE_DESCRIPTION("Silicon Mitus SM5703 LDO/Buck/USB regulator driver"); -MODULE_AUTHOR("Markuss Broks "); -MODULE_LICENSE("GPL"); --=20 2.46.0