summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/panfrost/panfrost_device.h
diff options
context:
space:
mode:
authorClément Péron <peron.clem@gmail.com>2020-07-10 11:54:04 +0200
committerRob Herring <robh@kernel.org>2020-08-07 10:11:26 -0600
commit512f21227fd3d2dbe7aad57a995b9732229c9b56 (patch)
treec50c554c12fe41b37f33199534e3805d35f5676c /drivers/gpu/drm/panfrost/panfrost_device.h
parent25e247bbf85af3ad721dfeb2e2caf405f43b7e66 (diff)
downloadlinux-512f21227fd3d2dbe7aad57a995b9732229c9b56.tar.bz2
drm/panfrost: dynamically alloc regulators
We will later introduce regulators managed by OPP. Only alloc regulators when it's needed. This also help use to release the regulators only when they are allocated. Reviewed-by: Steven Price <steven.price@arm.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Signed-off-by: Clément Péron <peron.clem@gmail.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200710095409.407087-10-peron.clem@gmail.com
Diffstat (limited to 'drivers/gpu/drm/panfrost/panfrost_device.h')
-rw-r--r--drivers/gpu/drm/panfrost/panfrost_device.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/panfrost/panfrost_device.h b/drivers/gpu/drm/panfrost/panfrost_device.h
index 2efa59c9d1c5..953f7536a773 100644
--- a/drivers/gpu/drm/panfrost/panfrost_device.h
+++ b/drivers/gpu/drm/panfrost/panfrost_device.h
@@ -22,7 +22,6 @@ struct panfrost_job;
struct panfrost_perfcnt;
#define NUM_JOB_SLOTS 3
-#define MAX_REGULATORS 2
#define MAX_PM_DOMAINS 3
struct panfrost_features {
@@ -81,7 +80,7 @@ struct panfrost_device {
void __iomem *iomem;
struct clk *clock;
struct clk *bus_clock;
- struct regulator_bulk_data regulators[MAX_REGULATORS];
+ struct regulator_bulk_data *regulators;
struct reset_control *rstc;
/* pm_domains for devices with more than one. */
struct device *pm_domain_devs[MAX_PM_DOMAINS];