diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2014-03-26 15:55:54 +0530 |
---|---|---|
committer | Laxman Dewangan <ldewangan@nvidia.com> | 2014-03-26 09:46:43 -0700 |
commit | 1ac49c0e78dc55ccae3d78c22f07dd99c405ebd1 (patch) | |
tree | d3517fb60648f9b71b7b682bc85b802ba634f3ea /arch/arm | |
parent | 4ef0179cbbde22367b4c028d6b722c4bde52c6ec (diff) |
ARM: tegra: move power_supply_extcon to DT for Ardbeg/TN8.
Move power_supply_extcon driver which is used for AC/USB notification
to Android to DT and remove related code from board files.
Change-Id: I9e97ac155c87324e59b7a0af8299688386fd4ef1
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/387064
Diffstat (limited to 'arch/arm')
7 files changed, 25 insertions, 30 deletions
diff --git a/arch/arm/boot/dts/tegra124-platforms/tegra124-ardbeg-pmic-e1733-1000-a00.dtsi b/arch/arm/boot/dts/tegra124-platforms/tegra124-ardbeg-pmic-e1733-1000-a00.dtsi index 9db96cfc11f3..336f80e69084 100644 --- a/arch/arm/boot/dts/tegra124-platforms/tegra124-ardbeg-pmic-e1733-1000-a00.dtsi +++ b/arch/arm/boot/dts/tegra124-platforms/tegra124-ardbeg-pmic-e1733-1000-a00.dtsi @@ -628,4 +628,9 @@ efuse@7000f800 { vpp_fuse-supply = <&as3722_ldo11>; }; + + psy_extcon { + compatible = "power-supply-extcon"; + power-supply,extcon-dev = "tegra-udc"; + }; }; diff --git a/arch/arm/boot/dts/tegra124-platforms/tegra124-e1791-e1736-pmic.dtsi b/arch/arm/boot/dts/tegra124-platforms/tegra124-e1791-e1736-pmic.dtsi index 773927f91d80..4db7eff07acf 100644 --- a/arch/arm/boot/dts/tegra124-platforms/tegra124-e1791-e1736-pmic.dtsi +++ b/arch/arm/boot/dts/tegra124-platforms/tegra124-e1791-e1736-pmic.dtsi @@ -748,4 +748,9 @@ }; }; }; + + psy_extcon { + compatible = "power-supply-extcon"; + power-supply,extcon-dev = "tegra-udc"; + }; }; diff --git a/arch/arm/boot/dts/tegra124-platforms/tegra124-tn8-pmic-e1736-1000-a00.dtsi b/arch/arm/boot/dts/tegra124-platforms/tegra124-tn8-pmic-e1736-1000-a00.dtsi index 5e60d418bd9a..f5bb0a317e84 100644 --- a/arch/arm/boot/dts/tegra124-platforms/tegra124-tn8-pmic-e1736-1000-a00.dtsi +++ b/arch/arm/boot/dts/tegra124-platforms/tegra124-tn8-pmic-e1736-1000-a00.dtsi @@ -843,4 +843,9 @@ }; }; }; + + psy_extcon { + compatible = "power-supply-extcon"; + power-supply,extcon-dev = "tegra-udc"; + }; }; diff --git a/arch/arm/boot/dts/tegra124-platforms/tegra124-tn8-pmic-e1769-1000-a00.dtsi b/arch/arm/boot/dts/tegra124-platforms/tegra124-tn8-pmic-e1769-1000-a00.dtsi index c859a05b030e..5fcbc29cbaaf 100644 --- a/arch/arm/boot/dts/tegra124-platforms/tegra124-tn8-pmic-e1769-1000-a00.dtsi +++ b/arch/arm/boot/dts/tegra124-platforms/tegra124-tn8-pmic-e1769-1000-a00.dtsi @@ -814,4 +814,9 @@ }; }; }; + + psy_extcon { + compatible = "power-supply-extcon"; + power-supply,extcon-dev = "tegra-udc"; + }; }; diff --git a/arch/arm/boot/dts/tegra124-platforms/tegra124-tn8-pmic-e1936-1000-a00.dtsi b/arch/arm/boot/dts/tegra124-platforms/tegra124-tn8-pmic-e1936-1000-a00.dtsi index ed83a93cd8e4..c39ddd0c90b8 100644 --- a/arch/arm/boot/dts/tegra124-platforms/tegra124-tn8-pmic-e1936-1000-a00.dtsi +++ b/arch/arm/boot/dts/tegra124-platforms/tegra124-tn8-pmic-e1936-1000-a00.dtsi @@ -715,4 +715,9 @@ efuse@7000f800 { vpp_fuse-supply = <&vpp_fuse>; }; + + psy_extcon { + compatible = "power-supply-extcon"; + power-supply,extcon-dev = "tegra-udc"; + }; }; diff --git a/arch/arm/mach-tegra/board-ardbeg-power.c b/arch/arm/mach-tegra/board-ardbeg-power.c index 2be8ee1b3d86..ef2a4b497b98 100644 --- a/arch/arm/mach-tegra/board-ardbeg-power.c +++ b/arch/arm/mach-tegra/board-ardbeg-power.c @@ -30,7 +30,6 @@ #include <linux/regulator/fixed.h> #include <linux/mfd/palmas.h> #include <linux/mfd/as3722-plat.h> -#include <linux/power/power_supply_extcon.h> #include <linux/regulator/tps51632-regulator.h> #include <linux/regulator/machine.h> #include <linux/irq.h> @@ -609,18 +608,6 @@ static struct tegra_suspend_platform_data ardbeg_suspend_data = { .min_residency_crail = 20000, }; -static struct power_supply_extcon_plat_data extcon_pdata = { - .extcon_name = "tegra-udc", -}; - -static struct platform_device power_supply_extcon_device = { - .name = "power-supply-extcon", - .id = -1, - .dev = { - .platform_data = &extcon_pdata, - }, -}; - /* Macro for defining fixed regulator sub device data */ #define FIXED_SUPPLY(_name) "fixed_reg_en_"#_name #define FIXED_REG(_id, _var, _name, _in_supply, \ @@ -1148,9 +1135,6 @@ int __init ardbeg_regulator_init(void) break; } - if (pmu_board_info.board_id != BOARD_E1735) - platform_device_register(&power_supply_extcon_device); - ardbeg_cl_dvfs_init(&pmu_board_info); return 0; } diff --git a/arch/arm/mach-tegra/board-tn8-power.c b/arch/arm/mach-tegra/board-tn8-power.c index dec31f415cb5..d3dc650025af 100644 --- a/arch/arm/mach-tegra/board-tn8-power.c +++ b/arch/arm/mach-tegra/board-tn8-power.c @@ -30,7 +30,6 @@ #include <linux/gpio.h> #include <linux/power/bq2419x-charger.h> -#include <linux/power/power_supply_extcon.h> #include <linux/max17048_battery.h> #include <linux/tegra-soc.h> #include <linux/generic_adc_thermal.h> @@ -195,18 +194,6 @@ static struct platform_device gadc_thermal_battery = { }, }; -static struct power_supply_extcon_plat_data extcon_pdata = { - .extcon_name = "tegra-udc", -}; - -static struct platform_device power_supply_extcon_device = { - .name = "power-supply-extcon", - .id = -1, - .dev = { - .platform_data = &extcon_pdata, - }, -}; - int __init tn8_regulator_init(void) { void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE); @@ -229,7 +216,6 @@ int __init tn8_regulator_init(void) platform_device_register(&gadc_thermal_battery); } - platform_device_register(&power_supply_extcon_device); return 0; } |