mfd: palmas: Add palmas_thermal init
Pradeep Goudagunta [Mon, 2 Sep 2013 05:49:09 +0000 (10:49 +0530)]
Initialize palmas_thermal driver, add palmas_thermal as mfd_cell
and irq resources.

Bug 1355680

Change-Id: Ia874afc435791bb905ea79b963b6e3412c343fc6
Signed-off-by: Pradeep Goudagunta <pgoudagunta@nvidia.com>
Reviewed-on: http://git-master/r/267914
(cherry picked from commit 856815055eb7b9864668ce6172fc26a3c86dc2aa)
Reviewed-on: http://git-master/r/276604
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

drivers/mfd/palmas.c

index 56f5723..0cf94b1 100644 (file)
@@ -108,6 +108,15 @@ static const struct resource wdt_resource[] = {
        },
 };
 
+static const struct resource thermal_resource[] = {
+       {
+               .name = "palmas-junction-temp",
+               .start = PALMAS_HOTDIE_IRQ,
+               .end = PALMAS_HOTDIE_IRQ,
+               .flags = IORESOURCE_IRQ,
+       },
+};
+
 enum palmas_ids {
        PALMAS_PIN_MUX_ID,
        PALMAS_PMIC_ID,
@@ -122,6 +131,7 @@ enum palmas_ids {
        PALMAS_PWM_ID,
        PALMAS_USB_ID,
        PALMAS_EXTCON_ID,
+       PALMAS_THERM_ID,
 };
 
 static const struct mfd_cell palmas_children[] = {
@@ -188,7 +198,13 @@ static const struct mfd_cell palmas_children[] = {
                .num_resources = ARRAY_SIZE(palma_extcon_resource),
                .resources = palma_extcon_resource,
                .id = PALMAS_EXTCON_ID,
-       }
+       },
+       {
+               .name = "palmas-thermal",
+               .num_resources = ARRAY_SIZE(thermal_resource),
+               .resources = thermal_resource,
+               .id = PALMAS_THERM_ID,
+       },
 };
 
 static bool is_volatile_palma_func_reg(struct device *dev, unsigned int reg)