summaryrefslogtreecommitdiffstats
path: root/drivers/staging/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-05-10 15:49:41 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-05-20 14:51:28 +0200
commitd03f2e248c416cd07105ad25fe1809c14fbb47c1 (patch)
tree33c0bc053de8ff7b036d5162a77352491ba5143d /drivers/staging/media
parent85df8457b31c4c277f59b80c1e2a636d34f0c8ce (diff)
downloadlinux-d03f2e248c416cd07105ad25fe1809c14fbb47c1.tar.bz2
media: atomisp: print the type of PMIC that will be used
While the current code is hardcoded to just one specific type of PMIC, it can support several types. Those should be board-dependent. Instead of just printing a number, change the message to display what type of PMIC control is used at runtime. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging/media')
-rw-r--r--drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c b/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c
index 722681e1ac6e..8fd8bbaeeb5d 100644
--- a/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c
+++ b/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c
@@ -57,9 +57,22 @@ struct gmin_subdev {
static struct gmin_subdev gmin_subdevs[MAX_SUBDEVS];
-static enum { PMIC_UNSET = 0, PMIC_REGULATOR, PMIC_AXP, PMIC_TI,
- PMIC_CRYSTALCOVE
- } pmic_id;
+static enum {
+ PMIC_UNSET = 0,
+ PMIC_REGULATOR,
+ PMIC_AXP,
+ PMIC_TI,
+ PMIC_CRYSTALCOVE
+} pmic_id;
+
+static const char *pmic_name[] = {
+ [PMIC_UNSET] = "unset",
+ [PMIC_REGULATOR] = "regulator",
+ [PMIC_AXP] = "AXP",
+ [PMIC_TI] = "TI",
+ [PMIC_CRYSTALCOVE] = "Crystal Cove",
+};
+
/* The atomisp uses type==0 for the end-of-list marker, so leave space. */
static struct intel_v4l2_subdev_table pdata_subdevs[MAX_SUBDEVS + 1];
@@ -362,8 +375,8 @@ static struct gmin_subdev *gmin_subdev_add(struct v4l2_subdev *subdev)
return NULL;
dev_info(dev,
- "gmin: initializing atomisp module subdev data.PMIC ID %d\n",
- pmic_id);
+ "gmin: initializing atomisp module subdev data using PMIC %s\n",
+ pmic_name[pmic_id]);
gmin_subdevs[i].subdev = subdev;
gmin_subdevs[i].clock_num = gmin_get_var_int(dev, false, "CamClk", 0);