On Tue, Jan 24, 2012 at 02:35:19PM +0530, Laxman Dewangan wrote:OK, I will make the log message as single liner.
+ /*Don't split log messages over multiple lines, it makes grepping the logs
+ * Rail can not be control from all external input EN1, EN2 and EN3
+ * together.
+ */
+ if ((ext_sleep_config& EXT_SLEEP_CONTROL) == EXT_SLEEP_CONTROL) {
+ dev_err(mfd->dev, "External sleep control flag is not "
+ " not proper\n");
+ return -EINVAL;
+ }
harder. Also, are combinations of two external enables valid?
The external controls for different rails are managed by power manament driver of soc in kernel to toggel them. The bootloader make sure that all external control signals are active just before jumping into kernel so that there is no issue during regulator init.+static void tps65910_shutdown(struct platform_device *pdev)Why?
+{
+ struct tps65910_reg *pmic = platform_get_drvdata(pdev);
+ int i;
+ int err;
+ dev_err(&pdev->dev, "%s() is called\n", __func__);
+
+ /* Remove all external control before shutting down the device */
+ for (i = 0; i< pmic->num_regulators; i++) {
+ if (!pmic->rdev[i])
+ continue;
+
+ err = tps65910_set_ext_sleep_config(pmic, i, 0);
+ if (err< 0)
+ dev_err(&pdev->dev, "Error in clearing external "
+ "control\n");
+ }
Hmm.., I thought that suspend mode apis manages the low/full-on power mode when the controls are not through external inputs. There is different register for configuring the power mode by i2c- write.+/*There's the suspend mode API for configuring suspend modes.
+ * Regulator mode when rail is in sleep state which controlled by external
+ * input. The regultor will be OFF if it is in sleep state by default but
+ * can be set in LOW power mode by ORing following macro with any of
+ * above exterenl input option.
+ */
+#define TPS65910_SLEEP_CONTROL_REG_LOW_POWER 0x10
I used this member in the probe as for configuring the rails..+I can't see anything in this code which will manage the enable signals?
/**
* struct tps65910_board
* Board platform data may be used to initialize regulators.
@@ -779,6 +792,7 @@ struct tps65910_board {
int irq_base;
int vmbch_threshold;
int vmbch2_threshold;
+ unsigned long regulator_ext_sleep_control[TPS65910_NUM_REGS];
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html