summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-04-18 13:50:47 -0400
committerTom Rini <trini@konsulko.com>2018-04-27 14:54:48 -0400
commitd024236e5a31a2b4b82cbcc98b31b8170fc88d28 (patch)
treeab4d96f1b0c5e3991b97708f72679a7af7234222 /drivers/power
parentf1b1f77060beadbfe9f42a3be00019bd025afbd6 (diff)
Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTR
We have a large number of places where while we historically referenced gd in the code we no longer do, as well as cases where the code added that line "just in case" during development and never dropped it. Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/domain/power-domain-uclass.c2
-rw-r--r--drivers/power/pmic/act8846.c2
-rw-r--r--drivers/power/pmic/i2c_pmic_emul.c2
-rw-r--r--drivers/power/pmic/lp873x.c2
-rw-r--r--drivers/power/pmic/lp87565.c2
-rw-r--r--drivers/power/pmic/max77686.c2
-rw-r--r--drivers/power/pmic/max8997.c2
-rw-r--r--drivers/power/pmic/max8998.c2
-rw-r--r--drivers/power/pmic/palmas.c2
-rw-r--r--drivers/power/pmic/pfuze100.c2
-rw-r--r--drivers/power/pmic/pm8916.c2
-rw-r--r--drivers/power/pmic/pmic-uclass.c2
-rw-r--r--drivers/power/pmic/pmic_tps65910_dm.c2
-rw-r--r--drivers/power/pmic/rk8xx.c2
-rw-r--r--drivers/power/pmic/s2mps11.c2
-rw-r--r--drivers/power/pmic/s5m8767.c2
-rw-r--r--drivers/power/pmic/sandbox.c2
-rw-r--r--drivers/power/pmic/tps65090.c2
-rw-r--r--drivers/power/regulator/fixed.c2
-rw-r--r--drivers/power/regulator/lp873x_regulator.c2
-rw-r--r--drivers/power/regulator/lp87565_regulator.c2
-rw-r--r--drivers/power/regulator/max77686.c2
-rw-r--r--drivers/power/regulator/palmas_regulator.c2
-rw-r--r--drivers/power/regulator/pbias_regulator.c2
-rw-r--r--drivers/power/regulator/regulator-uclass.c2
-rw-r--r--drivers/power/regulator/s2mps11_regulator.c2
-rw-r--r--drivers/power/regulator/s5m8767.c2
-rw-r--r--drivers/power/regulator/sandbox.c2
28 files changed, 0 insertions, 56 deletions
diff --git a/drivers/power/domain/power-domain-uclass.c b/drivers/power/domain/power-domain-uclass.c
index 1847a492a3..36a374a1b6 100644
--- a/drivers/power/domain/power-domain-uclass.c
+++ b/drivers/power/domain/power-domain-uclass.c
@@ -9,8 +9,6 @@
#include <power-domain.h>
#include <power-domain-uclass.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static inline struct power_domain_ops *power_domain_dev_ops(struct udevice *dev)
{
return (struct power_domain_ops *)dev->driver->ops;
diff --git a/drivers/power/pmic/act8846.c b/drivers/power/pmic/act8846.c
index 7d107f4427..c233ac08b1 100644
--- a/drivers/power/pmic/act8846.c
+++ b/drivers/power/pmic/act8846.c
@@ -13,8 +13,6 @@
#include <power/act8846_pmic.h>
#include <power/pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "REG", .driver = "act8846_reg"},
{ },
diff --git a/drivers/power/pmic/i2c_pmic_emul.c b/drivers/power/pmic/i2c_pmic_emul.c
index 38a2a04f17..c58ebb8825 100644
--- a/drivers/power/pmic/i2c_pmic_emul.c
+++ b/drivers/power/pmic/i2c_pmic_emul.c
@@ -12,8 +12,6 @@
#include <power/pmic.h>
#include <power/sandbox_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/**
* struct sandbox_i2c_pmic_plat_data - platform data for the PMIC
*
diff --git a/drivers/power/pmic/lp873x.c b/drivers/power/pmic/lp873x.c
index 95c2b7e8c7..ec7b9bf29f 100644
--- a/drivers/power/pmic/lp873x.c
+++ b/drivers/power/pmic/lp873x.c
@@ -15,8 +15,6 @@
#include <power/lp873x.h>
#include <dm/device.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "ldo", .driver = LP873X_LDO_DRIVER },
{ .prefix = "buck", .driver = LP873X_BUCK_DRIVER },
diff --git a/drivers/power/pmic/lp87565.c b/drivers/power/pmic/lp87565.c
index 506769e362..7c02f38ed8 100644
--- a/drivers/power/pmic/lp87565.c
+++ b/drivers/power/pmic/lp87565.c
@@ -15,8 +15,6 @@
#include <power/lp87565.h>
#include <dm/device.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "buck", .driver = LP87565_BUCK_DRIVER },
{ },
diff --git a/drivers/power/pmic/max77686.c b/drivers/power/pmic/max77686.c
index b3ed84992f..f4e0f7034d 100644
--- a/drivers/power/pmic/max77686.c
+++ b/drivers/power/pmic/max77686.c
@@ -14,8 +14,6 @@
#include <power/regulator.h>
#include <power/max77686_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "LDO", .driver = MAX77686_LDO_DRIVER },
{ .prefix = "BUCK", .driver = MAX77686_BUCK_DRIVER },
diff --git a/drivers/power/pmic/max8997.c b/drivers/power/pmic/max8997.c
index 5ebeb8a316..66c1c15a2d 100644
--- a/drivers/power/pmic/max8997.c
+++ b/drivers/power/pmic/max8997.c
@@ -12,8 +12,6 @@
#include <power/max8997_pmic.h>
#include <errno.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static int max8997_reg_count(struct udevice *dev)
{
return PMIC_NUM_OF_REGS;
diff --git a/drivers/power/pmic/max8998.c b/drivers/power/pmic/max8998.c
index a7e04699e8..8dd7e4886a 100644
--- a/drivers/power/pmic/max8998.c
+++ b/drivers/power/pmic/max8998.c
@@ -12,8 +12,6 @@
#include <power/pmic.h>
#include <power/max8998_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static int max8998_reg_count(struct udevice *dev)
{
return PMIC_NUM_OF_REGS;
diff --git a/drivers/power/pmic/palmas.c b/drivers/power/pmic/palmas.c
index 1e1ecb382e..7e3b25d2c7 100644
--- a/drivers/power/pmic/palmas.c
+++ b/drivers/power/pmic/palmas.c
@@ -15,8 +15,6 @@
#include <power/palmas.h>
#include <dm/device.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "ldo", .driver = PALMAS_LDO_DRIVER },
{ .prefix = "smps", .driver = PALMAS_SMPS_DRIVER },
diff --git a/drivers/power/pmic/pfuze100.c b/drivers/power/pmic/pfuze100.c
index a06cbc07d4..32b8f71c3e 100644
--- a/drivers/power/pmic/pfuze100.c
+++ b/drivers/power/pmic/pfuze100.c
@@ -14,8 +14,6 @@
#include <power/regulator.h>
#include <power/pfuze100_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
/* sw[x], swbst */
{ .prefix = "s", .driver = PFUZE100_REGULATOR_DRIVER },
diff --git a/drivers/power/pmic/pm8916.c b/drivers/power/pmic/pm8916.c
index a048bbe7ce..cd7c906148 100644
--- a/drivers/power/pmic/pm8916.c
+++ b/drivers/power/pmic/pm8916.c
@@ -10,8 +10,6 @@
#include <power/pmic.h>
#include <spmi/spmi.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define PID_SHIFT 8
#define PID_MASK (0xFF << PID_SHIFT)
#define REG_MASK 0xFF
diff --git a/drivers/power/pmic/pmic-uclass.c b/drivers/power/pmic/pmic-uclass.c
index 9347b40688..5e8f6d6190 100644
--- a/drivers/power/pmic/pmic-uclass.c
+++ b/drivers/power/pmic/pmic-uclass.c
@@ -16,8 +16,6 @@
#include <power/pmic.h>
#include <linux/ctype.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#if CONFIG_IS_ENABLED(PMIC_CHILDREN)
int pmic_bind_children(struct udevice *pmic, ofnode parent,
const struct pmic_child_info *child_info)
diff --git a/drivers/power/pmic/pmic_tps65910_dm.c b/drivers/power/pmic/pmic_tps65910_dm.c
index c65f38f107..b0d0c5e944 100644
--- a/drivers/power/pmic/pmic_tps65910_dm.c
+++ b/drivers/power/pmic/pmic_tps65910_dm.c
@@ -11,8 +11,6 @@
#include <power/regulator.h>
#include <power/tps65910_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "ldo_", .driver = TPS65910_LDO_DRIVER },
{ .prefix = "buck_", .driver = TPS65910_BUCK_DRIVER },
diff --git a/drivers/power/pmic/rk8xx.c b/drivers/power/pmic/rk8xx.c
index 735046dc43..c83c8cf7bb 100644
--- a/drivers/power/pmic/rk8xx.c
+++ b/drivers/power/pmic/rk8xx.c
@@ -11,8 +11,6 @@
#include <power/rk8xx_pmic.h>
#include <power/pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "DCDC_REG", .driver = "rk8xx_buck"},
{ .prefix = "LDO_REG", .driver = "rk8xx_ldo"},
diff --git a/drivers/power/pmic/s2mps11.c b/drivers/power/pmic/s2mps11.c
index 3f9525b67d..13b3f908a4 100644
--- a/drivers/power/pmic/s2mps11.c
+++ b/drivers/power/pmic/s2mps11.c
@@ -13,8 +13,6 @@
#include <power/pmic.h>
#include <power/s2mps11.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = S2MPS11_OF_LDO_PREFIX, .driver = S2MPS11_LDO_DRIVER },
{ .prefix = S2MPS11_OF_BUCK_PREFIX, .driver = S2MPS11_BUCK_DRIVER },
diff --git a/drivers/power/pmic/s5m8767.c b/drivers/power/pmic/s5m8767.c
index 3812e240ab..e3bf3a638f 100644
--- a/drivers/power/pmic/s5m8767.c
+++ b/drivers/power/pmic/s5m8767.c
@@ -13,8 +13,6 @@
#include <power/regulator.h>
#include <power/s5m8767.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "LDO", .driver = S5M8767_LDO_DRIVER },
{ .prefix = "BUCK", .driver = S5M8767_BUCK_DRIVER },
diff --git a/drivers/power/pmic/sandbox.c b/drivers/power/pmic/sandbox.c
index e8d6faca16..80209d3d91 100644
--- a/drivers/power/pmic/sandbox.c
+++ b/drivers/power/pmic/sandbox.c
@@ -14,8 +14,6 @@
#include <power/regulator.h>
#include <power/sandbox_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = SANDBOX_OF_LDO_PREFIX, .driver = SANDBOX_LDO_DRIVER },
{ .prefix = SANDBOX_OF_BUCK_PREFIX, .driver = SANDBOX_BUCK_DRIVER },
diff --git a/drivers/power/pmic/tps65090.c b/drivers/power/pmic/tps65090.c
index ee5358bced..1b0fd991fa 100644
--- a/drivers/power/pmic/tps65090.c
+++ b/drivers/power/pmic/tps65090.c
@@ -13,8 +13,6 @@
#include <power/pmic.h>
#include <power/tps65090.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "fet", .driver = TPS65090_FET_DRIVER },
{ },
diff --git a/drivers/power/regulator/fixed.c b/drivers/power/regulator/fixed.c
index 97b4a98bf0..eec1914c1d 100644
--- a/drivers/power/regulator/fixed.c
+++ b/drivers/power/regulator/fixed.c
@@ -14,8 +14,6 @@
#include <power/pmic.h>
#include <power/regulator.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct fixed_regulator_platdata {
struct gpio_desc gpio; /* GPIO for regulator enable control */
unsigned int startup_delay_us;
diff --git a/drivers/power/regulator/lp873x_regulator.c b/drivers/power/regulator/lp873x_regulator.c
index 11371a7b8b..ba2dbd71d1 100644
--- a/drivers/power/regulator/lp873x_regulator.c
+++ b/drivers/power/regulator/lp873x_regulator.c
@@ -16,8 +16,6 @@
#include <power/regulator.h>
#include <power/lp873x.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const char lp873x_buck_ctrl[LP873X_BUCK_NUM] = {0x2, 0x4};
static const char lp873x_buck_volt[LP873X_BUCK_NUM] = {0x6, 0x7};
static const char lp873x_ldo_ctrl[LP873X_LDO_NUM] = {0x8, 0x9};
diff --git a/drivers/power/regulator/lp87565_regulator.c b/drivers/power/regulator/lp87565_regulator.c
index d908f6d1fb..94f09f5994 100644
--- a/drivers/power/regulator/lp87565_regulator.c
+++ b/drivers/power/regulator/lp87565_regulator.c
@@ -16,8 +16,6 @@
#include <power/regulator.h>
#include <power/lp87565.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const char lp87565_buck_ctrl1[LP87565_BUCK_NUM] = {0x2, 0x4, 0x6, 0x8, 0x2, 0x6};
static const char lp87565_buck_vout[LP87565_BUCK_NUM] = {0xA, 0xC, 0xE, 0x10, 0xA, 0xE };
diff --git a/drivers/power/regulator/max77686.c b/drivers/power/regulator/max77686.c
index 2212d36ed6..6e4ac02036 100644
--- a/drivers/power/regulator/max77686.c
+++ b/drivers/power/regulator/max77686.c
@@ -16,8 +16,6 @@
#include <power/regulator.h>
#include <power/max77686_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define MODE(_id, _val, _name) { \
.id = _id, \
.register_value = _val, \
diff --git a/drivers/power/regulator/palmas_regulator.c b/drivers/power/regulator/palmas_regulator.c
index 24a7977236..45c006c5b7 100644
--- a/drivers/power/regulator/palmas_regulator.c
+++ b/drivers/power/regulator/palmas_regulator.c
@@ -16,8 +16,6 @@
#include <power/regulator.h>
#include <power/palmas.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define REGULATOR_ON 0x1
#define REGULATOR_OFF 0x0
diff --git a/drivers/power/regulator/pbias_regulator.c b/drivers/power/regulator/pbias_regulator.c
index adf589b224..1e042ad712 100644
--- a/drivers/power/regulator/pbias_regulator.c
+++ b/drivers/power/regulator/pbias_regulator.c
@@ -16,8 +16,6 @@
#include <linux/ioport.h>
#include <dm/read.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct pbias_reg_info {
u32 enable;
u32 enable_mask;
diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c
index 426a933d66..b9e2d20e32 100644
--- a/drivers/power/regulator/regulator-uclass.c
+++ b/drivers/power/regulator/regulator-uclass.c
@@ -12,8 +12,6 @@
#include <power/pmic.h>
#include <power/regulator.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int regulator_mode(struct udevice *dev, struct dm_regulator_mode **modep)
{
struct dm_regulator_uclass_platdata *uc_pdata;
diff --git a/drivers/power/regulator/s2mps11_regulator.c b/drivers/power/regulator/s2mps11_regulator.c
index 3af20e60dd..477f0f6225 100644
--- a/drivers/power/regulator/s2mps11_regulator.c
+++ b/drivers/power/regulator/s2mps11_regulator.c
@@ -14,8 +14,6 @@
#include <power/regulator.h>
#include <power/s2mps11.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define MODE(_id, _val, _name) { \
.id = _id, \
.register_value = _val, \
diff --git a/drivers/power/regulator/s5m8767.c b/drivers/power/regulator/s5m8767.c
index 871da122b4..89ad587610 100644
--- a/drivers/power/regulator/s5m8767.c
+++ b/drivers/power/regulator/s5m8767.c
@@ -13,8 +13,6 @@
#include <power/regulator.h>
#include <power/s5m8767.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct sec_voltage_desc buck_v1 = {
.max = 2225000,
.min = 650000,
diff --git a/drivers/power/regulator/sandbox.c b/drivers/power/regulator/sandbox.c
index f980a17389..ab30c50fcc 100644
--- a/drivers/power/regulator/sandbox.c
+++ b/drivers/power/regulator/sandbox.c
@@ -14,8 +14,6 @@
#include <power/regulator.h>
#include <power/sandbox_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define MODE(_id, _val, _name) [_id] = { \
.id = _id, \
.register_value = _val, \