Since we change the way that pn544 using the regulator. There is no need to use VPMIC at all. Change-Id: Id626cb1127a43674e55164c7dfc49b3ab0558f60 Signed-off-by: Neil Zhang <zhangwm@xxxxxxxxxxx> --- arch/arm/mach-mmp/ttc_dkb.c | 62 +------------------ drivers/regulator/Kconfig | 5 -- drivers/regulator/Makefile | 1 - drivers/regulator/vpmic.c | 135 --------------------------------------- include/linux/regulator/vpmic.h | 25 ------- 5 files changed, 1 insertions(+), 227 deletions(-) delete mode 100644 drivers/regulator/vpmic.c delete mode 100644 include/linux/regulator/vpmic.h diff --git a/arch/arm/mach-mmp/ttc_dkb.c b/arch/arm/mach-mmp/ttc_dkb.c index 8625c4b..cc0ba75 100644 --- a/arch/arm/mach-mmp/ttc_dkb.c +++ b/arch/arm/mach-mmp/ttc_dkb.c @@ -34,7 +34,6 @@ #include <linux/sd8x_rfkill.h> #include <linux/mmc/host.h> #include <linux/nfc/pn544.h> -#include <linux/regulator/vpmic.h> #include <linux/cwmi.h> #include <linux/cwgd.h> #include <asm/mach-types.h> @@ -900,61 +899,6 @@ static struct pca953x_platform_data max7312_data[] = { }; #endif -/* The following structure is for VPMIC regulator */ -#if defined(CONFIG_REGULATOR_VPMIC) -static struct regulator_consumer_supply vpmic_regulator_supply[] = { - [VPMIC_ID_Vdd_IO] = REGULATOR_SUPPLY("Vdd_IO", NULL), - [VPMIC_ID_VBat] = REGULATOR_SUPPLY("VBat", NULL), - [VPMIC_ID_VSim] = REGULATOR_SUPPLY("VSim", NULL), -}; - -#define REGULATOR_INIT(_name, _min, _max, _always, _boot) \ -{ \ - .constraints = { \ - .name = __stringify(_name), \ - .min_uV = _min, \ - .max_uV = _max, \ - .always_on = _always, \ - .boot_on = _boot, \ - .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE \ - | REGULATOR_CHANGE_STATUS, \ - }, \ - .num_consumer_supplies = 1, \ - .consumer_supplies = &vpmic_regulator_supply[VPMIC_ID_##_name],\ -} - -static struct regulator_init_data vpmic_regulator_init_data[] = { - REGULATOR_INIT(Vdd_IO, 1000000, 1500000, 1, 1), - REGULATOR_INIT(VBat, 1000000, 3000000, 1, 1), - REGULATOR_INIT(VSim, 1200000, 2800000, 1, 1), -}; - -static struct platform_device vpmic_regulator_vdd = { - .name = "vpmic-regulator", - .id = 0, - .dev = { - .platform_data = &vpmic_regulator_init_data[VPMIC_ID_Vdd_IO], - }, -}; - -static struct platform_device vpmic_regulator_vbat = { - .name = "vpmic-regulator", - .id = 1, - .dev = { - .platform_data = &vpmic_regulator_init_data[VPMIC_ID_VBat], - }, -}; - -static struct platform_device vpmic_regulator_vsim = { - .name = "vpmic-regulator", - .id = 2, - .dev = { - .platform_data = &vpmic_regulator_init_data[VPMIC_ID_VSim], - }, -}; - -#endif - /* The following structure is for pn544 I2C device */ #if defined(CONFIG_PN544_NFC) static int pn544_request_resources(struct i2c_client *client) @@ -989,6 +933,7 @@ static struct pn544_nfc_platform_data pn544_data = { .request_resources = pn544_request_resources, .free_resources = pn544_free_resources, .test = pn544_test, + .regulator_num = 0; }; #endif @@ -1669,11 +1614,6 @@ static struct platform_device *ttc_dkb_devices[] = { #elif defined(CONFIG_SOC_CAMERA_OV5640) &dkb_ov5640_mipi, #endif -#if defined(CONFIG_REGULATOR_VPMIC) - &vpmic_regulator_vdd, - &vpmic_regulator_vbat, - &vpmic_regulator_vsim, -#endif }; #if (defined CONFIG_CMMB) diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 8f4bc5a..8d8ff1b 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -269,11 +269,6 @@ config REGULATOR_88PM8607 help This driver supports 88PM8607 voltage regulator chips. -config REGULATOR_VPMIC - bool "Marvell VPMIC Power regulators" - help - This driver supports VPMIC voltage regulator, only for NFC test usage. - config REGULATOR_88PM800 bool "Marvell 88PM800 Power regulators" depends on MFD_88PM80X=y diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile index cb8c3f0..f400f7e 100644 --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile @@ -40,7 +40,6 @@ obj-$(CONFIG_REGULATOR_TPS65023) += tps65023-regulator.o obj-$(CONFIG_REGULATOR_TPS6507X) += tps6507x-regulator.o obj-$(CONFIG_REGULATOR_TPS6524X) += tps6524x-regulator.o obj-$(CONFIG_REGULATOR_88PM8607) += 88pm8607.o -obj-$(CONFIG_REGULATOR_VPMIC) += vpmic.o obj-$(CONFIG_REGULATOR_88PM800) += 88pm800.o obj-$(CONFIG_REGULATOR_ISL6271A) += isl6271a-regulator.o obj-$(CONFIG_REGULATOR_AB8500) += ab8500.o diff --git a/drivers/regulator/vpmic.c b/drivers/regulator/vpmic.c deleted file mode 100644 index 288841b..0000000 --- a/drivers/regulator/vpmic.c +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Virtual Regulators driver for PN544 - * - * Copyright (C) 2010 Marvell International Ltd. - * Neil Zhang <zhangwm@xxxxxxxxxxx> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/err.h> -#include <linux/platform_device.h> -#include <linux/regulator/driver.h> -#include <linux/regulator/machine.h> - -#include <linux/regulator/vpmic.h> - - -struct vpmic_regulator_info { - struct regulator_desc desc; - struct regulator_dev *regulator; -}; - - -static int vpmic_enable(struct regulator_dev *rdev) -{ - struct vpmic_regulator_info *info = rdev_get_drvdata(rdev); - dev_dbg(&rdev->dev, "vpmic_enable: %s\n", info->desc.name); - - return 0; -} - -static int vpmic_disable(struct regulator_dev *rdev) -{ - struct vpmic_regulator_info *info = rdev_get_drvdata(rdev); - dev_dbg(&rdev->dev, "vpmic_disable: %s\n", info->desc.name); - - return 0; -} - - -static struct regulator_ops vpmic_regulator_ops = { - .enable = vpmic_enable, - .disable = vpmic_disable, -}; - - -#define VPMIC_DVC(vreg) \ -{ \ - .desc = { \ - .name = #vreg, \ - .ops = &vpmic_regulator_ops, \ - .type = REGULATOR_VOLTAGE, \ - .id = VPMIC_ID_##vreg, \ - .owner = THIS_MODULE, \ - }, \ -} - - -static struct vpmic_regulator_info vpmic_info[] = { - VPMIC_DVC(Vdd_IO), - VPMIC_DVC(VBat), - VPMIC_DVC(VSim), -}; - - -static int __devinit vpmic_regulator_probe(struct platform_device *pdev) -{ - struct vpmic_regulator_info *info = NULL; - struct regulator_init_data *pdata = NULL; - int i = 0; - - pdata = pdev->dev.platform_data; - if (pdata == NULL) - return -EINVAL; - - for (i = 0; i < ARRAY_SIZE(vpmic_info); i++) { - info = &vpmic_info[i]; - if (!strcmp(info->desc.name, pdata->constraints.name)) - break; - } - - if (i >= ARRAY_SIZE(vpmic_info)) { - dev_err(&pdev->dev, "Failed to find regulator %s\n", - pdata->constraints.name); - return -EINVAL; - } - - info->regulator = regulator_register(&info->desc, &pdev->dev, - pdata, info); - if (IS_ERR(info->regulator)) { - dev_err(&pdev->dev, "failed to register regulator %s\n", - info->desc.name); - return PTR_ERR(info->regulator); - } - - platform_set_drvdata(pdev, info); - - return 0; -} - -static int __devexit vpmic_regulator_remove(struct platform_device *pdev) -{ - struct vpmic_regulator_info *info = platform_get_drvdata(pdev); - - platform_set_drvdata(pdev, NULL); - regulator_unregister(info->regulator); - return 0; -} - -static struct platform_driver vpmic_regulator_driver = { - .driver = { - .name = "vpmic-regulator", - .owner = THIS_MODULE, - }, - .probe = vpmic_regulator_probe, - .remove = __devexit_p(vpmic_regulator_remove), -}; - -static int __init vpmic_regulator_init(void) -{ - return platform_driver_register(&vpmic_regulator_driver); -} -subsys_initcall(vpmic_regulator_init); - -static void __exit vpmic_regulator_exit(void) -{ - platform_driver_unregister(&vpmic_regulator_driver); -} -module_exit(vpmic_regulator_exit); - -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("Regulator Driver for Marvell Virtual PMIC"); diff --git a/include/linux/regulator/vpmic.h b/include/linux/regulator/vpmic.h deleted file mode 100644 index 0e8e5bf..0000000 --- a/include/linux/regulator/vpmic.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Marvell vpmic Interface - * - * Copyright (C) 2010 Marvell International Ltd. - * Neil Zhang <zhangwm@xxxxxxxxxxx> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - - -#ifndef __VPMIC_H -#define __VPMIC_H - - -enum { - VPMIC_ID_Vdd_IO = 0, - VPMIC_ID_VBat, - VPMIC_ID_VSim, - VPMIC_ID_RG_MAX, -}; - - -#endif -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html