<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/regulator/ab8500.c, branch v3.10.11</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>regulator: ab8500: Get rid of voltage_shift field from struct ab8500_regulator_info</title>
<updated>2013-04-18T17:26:35+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2013-04-17T14:55:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5d9de8b1216c60c15b02982c9f6b4875f757db02'/>
<id>5d9de8b1216c60c15b02982c9f6b4875f757db02</id>
<content type='text'>
The voltage_shift can be calculated from voltage_mask.
Let's remove voltage_shift fied from struct ab8500_regulator_info, this change
can prevent missing voltage_shift setting issue.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Bengt Jonsson &lt;bengt.g.jonsson@stericsson.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The voltage_shift can be calculated from voltage_mask.
Let's remove voltage_shift fied from struct ab8500_regulator_info, this change
can prevent missing voltage_shift setting issue.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Bengt Jonsson &lt;bengt.g.jonsson@stericsson.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: ab8500: Remove unused voltage_shift field from struct expand_register</title>
<updated>2013-04-18T17:26:30+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2013-04-17T14:54:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9135d3bcec6c087fa2ef4fbde8b80ff8b27b34c7'/>
<id>9135d3bcec6c087fa2ef4fbde8b80ff8b27b34c7</id>
<content type='text'>
The voltage_shift field of struct expand_register is not used now, remove it.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Bengt Jonsson &lt;bengt.g.jonsson@stericsson.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The voltage_shift field of struct expand_register is not used now, remove it.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Bengt Jonsson &lt;bengt.g.jonsson@stericsson.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: ab8500: Fix set voltage for AB8540_LDO_AUX3</title>
<updated>2013-04-17T14:09:27+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2013-04-16T16:50:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b4d12a79295ca216008af7970f208c6051fd408d'/>
<id>b4d12a79295ca216008af7970f208c6051fd408d</id>
<content type='text'>
When setting voltage for AB8540_LDO_AUX3, current code only updates one of
info-&gt;voltage_reg and info-&gt;expand_register registers which is wrong.
To ensure we set to correct voltage, it always needs to clear or set
expand_register.voltage_mask bit of expand_register.

The function of the expand register bit is the following (from the user manual):
0: VAUX3 output voltage is determined by Vaux3Sel bit settings in register
   VldoCVaux3Sel
1: VAUX3 output voltage is set to 3.05V regardless of Vaux3Sel settings in
   register VldoCVaux3Sel (VldoCVaux3Sel is the register at 0x0421)

So when going to 3.05V, set the expand register bit.
When leaving 3.05V for another voltage, set the target voltage before clearing
the expand register bit.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Bengt Jonsson &lt;bengt.g.jonsson@stericsson.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When setting voltage for AB8540_LDO_AUX3, current code only updates one of
info-&gt;voltage_reg and info-&gt;expand_register registers which is wrong.
To ensure we set to correct voltage, it always needs to clear or set
expand_register.voltage_mask bit of expand_register.

The function of the expand register bit is the following (from the user manual):
0: VAUX3 output voltage is determined by Vaux3Sel bit settings in register
   VldoCVaux3Sel
1: VAUX3 output voltage is set to 3.05V regardless of Vaux3Sel settings in
   register VldoCVaux3Sel (VldoCVaux3Sel is the register at 0x0421)

So when going to 3.05V, set the expand register bit.
When leaving 3.05V for another voltage, set the target voltage before clearing
the expand register bit.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Bengt Jonsson &lt;bengt.g.jonsson@stericsson.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: ab8500: Don't update lp_mode_req flag in set_mode() error paths</title>
<updated>2013-04-17T14:08:27+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2013-04-09T12:17:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0b665062a1dde470d69ff3bd435b090a119991ab'/>
<id>0b665062a1dde470d69ff3bd435b090a119991ab</id>
<content type='text'>
Currently, set invalid mode setting for shared mode regulators may change
sm-&gt;lp_mode_req flag. This patch ensures we don't set lp_mode_req flag to wrong
status if set_mode() fails.

This patch includes some clean up, and these changes makes this patch looks like
code refactor. The clean up is mainly to avoid adding ugly code to handle
failure paths.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Bengt Jonsson &lt;bengt.g.jonsson@stericsson.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, set invalid mode setting for shared mode regulators may change
sm-&gt;lp_mode_req flag. This patch ensures we don't set lp_mode_req flag to wrong
status if set_mode() fails.

This patch includes some clean up, and these changes makes this patch looks like
code refactor. The clean up is mainly to avoid adding ugly code to handle
failure paths.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Bengt Jonsson &lt;bengt.g.jonsson@stericsson.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: ab8500: Don't update info-&gt;update_val if write to register fails</title>
<updated>2013-04-17T14:08:22+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2013-04-09T12:15:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f04adc5ab3b70ad9b7d17d6a6fc2113669134a4d'/>
<id>f04adc5ab3b70ad9b7d17d6a6fc2113669134a4d</id>
<content type='text'>
This patch ensures info-&gt;update_val is consistent with current register value.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Bengt Jonsson &lt;bengt.g.jonsson@stericsson.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch ensures info-&gt;update_val is consistent with current register value.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Bengt Jonsson &lt;bengt.g.jonsson@stericsson.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: ab8500: Optimize ab8540_aux3_regulator_get_voltage_sel</title>
<updated>2013-04-16T11:23:27+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2013-04-10T06:46:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=241896ce8d112f10dae5538be41fad9eeb9e5e46'/>
<id>241896ce8d112f10dae5538be41fad9eeb9e5e46</id>
<content type='text'>
We can save a register read operation in some case if read
expand_register first.
If info-&gt;expand_register.voltage_mask bit is set, no need to read
voltage_reg.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Bengt Jonsson &lt;bengt.g.jonsson@stericsson.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can save a register read operation in some case if read
expand_register first.
If info-&gt;expand_register.voltage_mask bit is set, no need to read
voltage_reg.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Bengt Jonsson &lt;bengt.g.jonsson@stericsson.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: ab8500: Fix voltage_shift setting for AB8540_LDO_DMIC</title>
<updated>2013-04-15T15:54:25+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2013-04-15T08:36:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=375dc9c141b4d62b92bb171817039ef764c61d9f'/>
<id>375dc9c141b4d62b92bb171817039ef764c61d9f</id>
<content type='text'>
The voltage_mask is 0xc0, thus we need to set voltage_shift = 6 to get correct
selector in get_voltage_sel and set_voltage_sel.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Bengt Jonsson &lt;bengt.g.jonsson@stericsson.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The voltage_mask is 0xc0, thus we need to set voltage_shift = 6 to get correct
selector in get_voltage_sel and set_voltage_sel.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Bengt Jonsson &lt;bengt.g.jonsson@stericsson.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: ab8500: Fix voltage_mask for AB8505_LDO_AUDIO</title>
<updated>2013-04-12T12:29:33+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2013-04-12T07:33:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e4fc9d6d9fea5a1b05dcf5b60984bd6a19cc73d6'/>
<id>e4fc9d6d9fea5a1b05dcf5b60984bd6a19cc73d6</id>
<content type='text'>
The voltage_mask and voltage_shift settings of AB8505_LDO_AUDIO are not matched.
It looks like a typo in the voltage_mask settings.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Bengt Jonsson &lt;bengt.g.jonsson@stericsson.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The voltage_mask and voltage_shift settings of AB8505_LDO_AUDIO are not matched.
It looks like a typo in the voltage_mask settings.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Bengt Jonsson &lt;bengt.g.jonsson@stericsson.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: ab8500: Unregister ab8500-ext regulators in probe() failure path</title>
<updated>2013-04-11T16:43:56+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2013-04-11T04:05:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=42e8c811bab682121cb57d58e9a37d8cb38e51ca'/>
<id>42e8c811bab682121cb57d58e9a37d8cb38e51ca</id>
<content type='text'>
Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Bengt Jonsson &lt;bengt.g.jonsson@stericsson.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Bengt Jonsson &lt;bengt.g.jonsson@stericsson.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: ab8500-ext: Make the return type of ab8500_ext_regulator_exit() void</title>
<updated>2013-04-11T16:43:50+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2013-04-11T04:04:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3480c0cab6e1a25fdeb63147b0b643b7825a36fb'/>
<id>3480c0cab6e1a25fdeb63147b0b643b7825a36fb</id>
<content type='text'>
ab8500_ext_regulator_exit() never fails.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Bengt Jonsson &lt;bengt.g.jonsson@stericsson.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ab8500_ext_regulator_exit() never fails.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Bengt Jonsson &lt;bengt.g.jonsson@stericsson.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
