RE: [PATCH V1] TPS62360: Add tps62360 regulator driver

From: Laxman Dewangan
Date: Mon Jan 09 2012 - 03:47:40 EST




> On Monday, January 09, 2012 1:09 PM, Mark Brown wrote
>
> > If I fix the voltage with each VSEL then only 4 voltages will be
> > possible but I want to have more than 4 different output.
> > How do I achieve this?
>
> The driver can decide what voltages to set - like I said in a previous
> mail it could use something like LRU to decide which slot to use, or
> perhaps be clever with the upper end of the range it was given.

So we will change the gpios output also according to voltage register
slot from driver?

>
> > > What I'd expect to see is nothing but the GPIOs and their default state
> > > (since sadly we can't read back from output GPIOs with gpiolib) being
> > > specified.
>
> > I did not understand it correctly. Can you please elaborate how can we
> > pass the voltage with corresponding vsel?
>
> For bootstrapping you can just read the values back.

So through platform data, I will pass the gpio nr for VSEL0, VSEL1 and
their default state.
If these lines tied up with the fixed logic, high or low then value
will be -1 and driver will not request for any gpios apis.
Default state will be the corresponding logic for this situation
which will be passed from platform data and driver will be use
corresponding slots for voltage configuration register always.

If valid gpios will be passed then driver will use the LRU mechanism
for getting desired configuration register for configuring the desired
voltage (passed through the regulator_setvoltage())and set the gpios
accordingly through gpio libs.
In this approach, because we need to set two different gpios for
desired logic, the output will not go in proper transition from
current to new one, for some time when we completed setting of
one gpio and setting second gpio.



> --
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/