Re: [PATCH 3/4] regulator: added register initialization for ab8500 regulators

From: Linus Walleij
Date: Thu Mar 10 2011 - 10:49:43 EST


On Thu, Mar 10, 2011 at 2:50 PM, Mark Brown
<broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> On Thu, Mar 10, 2011 at 02:43:51PM +0100, Linus Walleij wrote:
>> From: Bengt Jonsson <bengt.g.jonsson@xxxxxxxxxxxxxx>
>>
>> The regulators can come up in a number of undefined
>> states, depending on boot path, firmware revisions and
>> things like kexec():ing into a new kernel. Provide a
>> platform initialization vector so that we have a known
>> state when we have booted the kernel.
>
> This should be done using the regulator constraints, there's nothing
> device specific about this.

The commit message is wrong. My bad, BTW, Bengt didn't
write that up. What we're actually passing in from the platform
data is stuff like this (taken from other patch):

+ /*
+ * SysClkReq2Valid1 = SysClkReq2 controlled
+ * SysClkReq3Valid1 = disabled
+ * SysClkReq4Valid1 = SysClkReq4 controlled
+ * SysClkReq5Valid1 = disabled
+ * SysClkReq6Valid1 = SysClkReq6 controlled
+ * SysClkReq7Valid1 = disabled
+ * SysClkReq8Valid1 = disabled
+ */
+ INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID1, 0x2a),

No voltages, currents or anything. The above bits refer to
fields in the regulator register that control real custom stuff.

Mainly it is about hardware signals controlling the regulator
depending on the setting of a number of "SysClkReq" lines,
basically 1-bit pins on the chip.

I will repost with some more clever commit message.

Linus Walleij
--
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/