regulator: max5970: Rename driver and remove wildcard
PATCH 1/1 regulator: max5970: Rename driver and remove wildcard
The previous version of this driver included wildcards in file names and descriptions. This patch renames the driver to only support MAX5970 and MAX5978, which are the only chips that the driver actually supports.
---
drivers/regulator/Kconfig | 6 ++--
drivers/regulator/Makefile | 2 +-
...ax597x-regulator.c => max5970-regulator.c} | 28 +++++++++----------
3 files changed, 18 insertions(+), 18 deletions(-)
rename drivers/regulator/{max597x-regulator.c => max5970-regulator.c} (94%)drivers/regulator/Kconfig +3 -3
@@ -546,11 +546,11 @@ config REGULATOR_MAX1586 regulator via I2C bus. The provided regulator is suitable for PXA27x chips to control VCC_CORE and VCC_USIM voltages. -config REGULATOR_MAX597X - tristate "Maxim 597x power switch and monitor" +config REGULATOR_MAX5970 + tristate "Maxim 5970/5978 power switch and monitor" depends on I2C depends on OF - depends on MFD_MAX597X + depends on MFD_MAX5970 help This driver controls a Maxim 5970/5978 switch via I2C bus. The MAX5970/5978 is a smart switch with no output regulation, but
drivers/regulator/Makefile +1 -1
@@ -67,7 +67,7 @@ obj-$(CONFIG_REGULATOR_LTC3589) += ltc3589.o obj-$(CONFIG_REGULATOR_LTC3676) += ltc3676.o obj-$(CONFIG_REGULATOR_MAX14577) += max14577-regulator.o obj-$(CONFIG_REGULATOR_MAX1586) += max1586.o -obj-$(CONFIG_REGULATOR_MAX597X) += max597x-regulator.o +obj-$(CONFIG_REGULATOR_MAX5970) += max5970-regulator.o obj-$(CONFIG_REGULATOR_MAX77541) += max77541-regulator.o obj-$(CONFIG_REGULATOR_MAX77620) += max77620-regulator.o obj-$(CONFIG_REGULATOR_MAX77650) += max77650-regulator.o
drivers/regulator/max5970-regulator.c renamed from drivers/regulator/max597x-regulator.c +14 -14
@@ -20,9 +20,9 @@#include <linux/regulator/of_regulator.h> #include <linux/platform_device.h> -#include <linux/mfd/max597x.h> +#include <linux/mfd/max5970.h> -struct max597x_regulator { +struct max5970_regulator {int num_switches, mon_rng, irng, shunt_micro_ohms, lim_uA;struct regmap *regmap; };
@@ -58,7 +58,7 @@ static int max597x_set_vp(struct regulator_dev *rdev, int lim_uV, int severity, bool enable, bool overvoltage) { int off_h, off_l, reg, ret; -struct max597x_regulator *data =rdev_get_drvdata (rdev); +struct max5970_regulator *data =rdev_get_drvdata (rdev);int channel =rdev_get_id (rdev);if (overvoltage) {
@@ -140,7 +140,7 @@ static int max597x_set_ocp(struct regulator_dev *rdev, int lim_uA,int val, reg;unsigned int vthst, vthfst; -struct max597x_regulator *data =rdev_get_drvdata (rdev); +struct max5970_regulator *data =rdev_get_drvdata (rdev);int rdev_id =rdev_get_id (rdev);/* * MAX5970 doesn't has enable control for ocp.
@@ -222,7 +222,7 @@ static int max597x_dt_parse(struct device_node *np,const struct regulator_desc *desc, struct regulator_config *cfg) { - struct max597x_regulator *data = cfg->driver_data; + struct max5970_regulator *data = cfg->driver_data;int ret =0 ; ret =
@@ -274,7 +274,7 @@ static int max597x_irq_handler(int irq, struct regulator_irq_data *rid, unsigned long *dev_mask) {struct regulator_err_state *stat; -struct max597x_regulator *d = (struct max597x_regulator *)rid->data; +struct max5970_regulator *d = (struct max5970_regulator *)rid->data;int val, ret, i; ret =max597x_regmap_read_clear (d->regmap,MAX5970_REG_FAULT0 , &val);
@@ -394,7 +394,7 @@ static int max597x_adc_range(struct regmap *regmap, const int ch,static int max597x_setup_irq (struct device *dev,int irq,struct regulator_dev *rdevs[MAX5970_NUM_SWITCHES ], -int num_switches,struct max597x_regulator *data) +int num_switches,struct max5970_regulator *data) {struct regulator_irq_desc max597x_notif = { .name ="max597x-irq" ,
@@ -425,9 +425,9 @@ static int max597x_setup_irq(struct device *dev,static int max597x_regulator_probe (struct platform_device *pdev) { -struct max597x_data *max597x; +struct max5970_data *max597x;struct regmap *regmap =dev_get_regmap (pdev->dev.parent,NULL ); -struct max597x_regulator *data; +struct max5970_regulator *data;struct i2c_client *i2c =to_i2c_client (pdev->dev.parent);struct regulator_config config = { };struct regulator_dev *rdev;
@@ -438,16 +438,16 @@ static int max597x_regulator_probe(struct platform_device *pdev)if (!regmap)return -EPROBE_DEFER ; - max597x =devm_kzalloc (&i2c->dev,sizeof (struct max597x_data ),GFP_KERNEL ); + max597x =devm_kzalloc (&i2c->dev,sizeof (struct max5970_data ),GFP_KERNEL );if (!max597x)return -ENOMEM ;i2c_set_clientdata (i2c, max597x);if (of_device_is_compatible (i2c->dev.of_node,"maxim,max5978" )) - max597x->num_switches = MAX597x_TYPE_MAX5978; + max597x->num_switches =MAX5978_NUM_SWITCHES ;else if (of_device_is_compatible (i2c->dev.of_node,"maxim,max5970" )) - max597x->num_switches = MAX597x_TYPE_MAX5970; + max597x->num_switches =MAX5970_NUM_SWITCHES ;else return -ENODEV ;
@@ -456,7 +456,7 @@ static int max597x_regulator_probe(struct platform_device *pdev)for (i =0 ; i < num_switches; i++) { data = -devm_kzalloc (&i2c->dev,sizeof (struct max597x_regulator ), +devm_kzalloc (&i2c->dev,sizeof (struct max5970_regulator ),GFP_KERNEL );if (!data)return -ENOMEM ;
@@ -500,7 +500,7 @@ static int max597x_regulator_probe(struct platform_device *pdev)static struct platform_driver max597x_regulator_driver = { .driver = { - .name ="max597x-regulator" , + .name ="max5970-regulator" , .probe_type =PROBE_PREFER_ASYNCHRONOUS , }, .probe = max597x_regulator_probe,
base-commit: 1519454ab7686d3902ae65aef422c3c662b5944a
Signature · 1 line
2.41.0
Mark Brown
maintainerQuoted 5 lines · Naresh Solanki
The previous version of this driver included wildcards in file names and descriptions. This patch renames the driver to only support MAX5970 and MAX5978, which are the only chips that the driver actually supports.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/1] regulator: max5970: Rename driver and remove wildcard
commit: ed2f4c745fb2bc51bb1b402ff2294587cb0b207a
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark