<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/pinctrl/mediatek, branch v5.14.2</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>pinctrl: mediatek: Fix fallback behavior for bias_set_combo</title>
<updated>2021-07-23T15:41:56+00:00</updated>
<author>
<name>Hsin-Yi Wang</name>
<email>hsinyi@chromium.org</email>
</author>
<published>2021-07-01T08:09:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=798a315fc359aa6dbe48e09d802aa59b7e158ffc'/>
<id>798a315fc359aa6dbe48e09d802aa59b7e158ffc</id>
<content type='text'>
Some pin doesn't support PUPD register, if it fails and fallbacks with
bias_set_combo case, it will call mtk_pinconf_bias_set_pupd_r1_r0() to
modify the PUPD pin again.

Since the general bias set are either PU/PD or PULLSEL/PULLEN, try
bias_set or bias_set_rev1 for the other fallback case. If the pin
doesn't support neither PU/PD nor PULLSEL/PULLEN, it will return
-ENOTSUPP.

Fixes: 81bd1579b43e ("pinctrl: mediatek: Fix fallback call path")
Signed-off-by: Hsin-Yi Wang &lt;hsinyi@chromium.org&gt;
Reviewed-by: Chen-Yu Tsai &lt;wenst@chromium.org&gt;
Reviewed-by: Zhiyong Tao &lt;zhiyong.tao@mediatek.com&gt;
Link: https://lore.kernel.org/r/20210701080955.2660294-1-hsinyi@chromium.org
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some pin doesn't support PUPD register, if it fails and fallbacks with
bias_set_combo case, it will call mtk_pinconf_bias_set_pupd_r1_r0() to
modify the PUPD pin again.

Since the general bias set are either PU/PD or PULLSEL/PULLEN, try
bias_set or bias_set_rev1 for the other fallback case. If the pin
doesn't support neither PU/PD nor PULLSEL/PULLEN, it will return
-ENOTSUPP.

Fixes: 81bd1579b43e ("pinctrl: mediatek: Fix fallback call path")
Signed-off-by: Hsin-Yi Wang &lt;hsinyi@chromium.org&gt;
Reviewed-by: Chen-Yu Tsai &lt;wenst@chromium.org&gt;
Reviewed-by: Zhiyong Tao &lt;zhiyong.tao@mediatek.com&gt;
Link: https://lore.kernel.org/r/20210701080955.2660294-1-hsinyi@chromium.org
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pinctrl: mediatek: fix mode encoding</title>
<updated>2021-06-09T13:30:45+00:00</updated>
<author>
<name>Matthias Brugger</name>
<email>mbrugger@suse.com</email>
</author>
<published>2021-06-08T15:06:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=21c423a6511f5a0639501a3100513666c8344372'/>
<id>21c423a6511f5a0639501a3100513666c8344372</id>
<content type='text'>
Pin modes are encoded in the SoC data structure. Use that value to set
IES SMT.

Cc: Fabien Parent &lt;fparent@baylibre.com&gt;
Cc: Sean Wang &lt;sean.wang@kernel.org&gt;
Cc: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
Cc: linux-mediatek@lists.infradead.org
Fixes: 696beef77521 ("pinctrl: mediatek: move bit assignment")
Signed-off-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Signed-off-by: Matthias Brugger &lt;mbrugger@suse.com&gt;
Link: https://lore.kernel.org/r/20210608150656.29007-1-matthias.bgg@kernel.org
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pin modes are encoded in the SoC data structure. Use that value to set
IES SMT.

Cc: Fabien Parent &lt;fparent@baylibre.com&gt;
Cc: Sean Wang &lt;sean.wang@kernel.org&gt;
Cc: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
Cc: linux-mediatek@lists.infradead.org
Fixes: 696beef77521 ("pinctrl: mediatek: move bit assignment")
Signed-off-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Signed-off-by: Matthias Brugger &lt;mbrugger@suse.com&gt;
Link: https://lore.kernel.org/r/20210608150656.29007-1-matthias.bgg@kernel.org
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pinctrl: mtk: Fix mt8365 Kconfig dependency</title>
<updated>2021-06-07T06:56:20+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2021-06-07T06:56:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=375eede3e37797667850f10342d8ace6fb327553'/>
<id>375eede3e37797667850f10342d8ace6fb327553</id>
<content type='text'>
This SoC needs to select PINCTRL_MTK or we can end up in
kernel compiles that miss some symbols.

Cc: Fabien Parent &lt;fparent@baylibre.com&gt;
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Fixes: e94d8b6fb83a ("pinctrl: mediatek: add support for mt8365 SoC")
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This SoC needs to select PINCTRL_MTK or we can end up in
kernel compiles that miss some symbols.

Cc: Fabien Parent &lt;fparent@baylibre.com&gt;
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Fixes: e94d8b6fb83a ("pinctrl: mediatek: add support for mt8365 SoC")
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pinctrl: mediatek: move bit assignment</title>
<updated>2021-05-28T09:19:10+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2021-05-28T09:13:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=696beef77521d3e418a2780859d1522c3c39d9b5'/>
<id>696beef77521d3e418a2780859d1522c3c39d9b5</id>
<content type='text'>
The bit needs offset to be defined which happens some lines
below. Looks like a bug. The kernel test robot complains:

drivers/pinctrl/mediatek/pinctrl-mtk-common.c:137:12:
warning: variable 'offset' is uninitialized when used here [-Wuninitialized]
           bit = BIT(offset &amp; pctl-&gt;devdata-&gt;mode_mask);
                     ^~~~~~

Fix it up by reverting to what was done before.

Cc: Fabien Parent &lt;fparent@baylibre.com&gt;
Cc: Sean Wang &lt;sean.wang@kernel.org&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
Cc: linux-mediatek@lists.infradead.org
Fixes: 9f940d8ecf92 ("pinctrl: mediatek: don't hardcode mode encoding in common code")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The bit needs offset to be defined which happens some lines
below. Looks like a bug. The kernel test robot complains:

drivers/pinctrl/mediatek/pinctrl-mtk-common.c:137:12:
warning: variable 'offset' is uninitialized when used here [-Wuninitialized]
           bit = BIT(offset &amp; pctl-&gt;devdata-&gt;mode_mask);
                     ^~~~~~

Fix it up by reverting to what was done before.

Cc: Fabien Parent &lt;fparent@baylibre.com&gt;
Cc: Sean Wang &lt;sean.wang@kernel.org&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
Cc: linux-mediatek@lists.infradead.org
Fixes: 9f940d8ecf92 ("pinctrl: mediatek: don't hardcode mode encoding in common code")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pinctrl: mediatek: add support for mt8365 SoC</title>
<updated>2021-05-27T14:50:15+00:00</updated>
<author>
<name>Fabien Parent</name>
<email>fparent@baylibre.com</email>
</author>
<published>2021-05-19T16:24:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e94d8b6fb83a81fa8c6595fadcada7b349e7694a'/>
<id>e94d8b6fb83a81fa8c6595fadcada7b349e7694a</id>
<content type='text'>
Add pinctrl driver for MT8365 SoC.

Signed-off-by: Fabien Parent &lt;fparent@baylibre.com&gt;
Link: https://lore.kernel.org/r/20210519162409.3755679-3-fparent@baylibre.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add pinctrl driver for MT8365 SoC.

Signed-off-by: Fabien Parent &lt;fparent@baylibre.com&gt;
Link: https://lore.kernel.org/r/20210519162409.3755679-3-fparent@baylibre.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pinctrl: mediatek: don't hardcode mode encoding in common code</title>
<updated>2021-05-27T14:50:15+00:00</updated>
<author>
<name>Fabien Parent</name>
<email>fparent@baylibre.com</email>
</author>
<published>2021-05-19T16:24:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9f940d8ecf921d2638b05da60eec0d25459be170'/>
<id>9f940d8ecf921d2638b05da60eec0d25459be170</id>
<content type='text'>
MT8365 encode the pins mode differently than other
MTK pinctrl drivers that use the PINCTRL_MTK common code.

Add 3 new fields in mtk_pinctrl_devdata in order to store how
pin modes are encoded into the register. At the
same time update all the pinctrl driver that depends on
CONFIG_PINCTRL_MTK.

Signed-off-by: Fabien Parent &lt;fparent@baylibre.com&gt;
Link: https://lore.kernel.org/r/20210519162409.3755679-2-fparent@baylibre.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MT8365 encode the pins mode differently than other
MTK pinctrl drivers that use the PINCTRL_MTK common code.

Add 3 new fields in mtk_pinctrl_devdata in order to store how
pin modes are encoded into the register. At the
same time update all the pinctrl driver that depends on
CONFIG_PINCTRL_MTK.

Signed-off-by: Fabien Parent &lt;fparent@baylibre.com&gt;
Link: https://lore.kernel.org/r/20210519162409.3755679-2-fparent@baylibre.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pinctrl: mediatek: use spin lock in mtk_rmw</title>
<updated>2021-04-21T23:53:29+00:00</updated>
<author>
<name>Tzung-Bi Shih</name>
<email>tzungbi@google.com</email>
</author>
<published>2021-04-19T09:34:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=56ab29ec6ff6c1441fda6ddcca0193be32d395b7'/>
<id>56ab29ec6ff6c1441fda6ddcca0193be32d395b7</id>
<content type='text'>
Commit 42a46434e9b1 ("pinctrl: add lock in mtk_rmw function.") uses
mutex lock in mtk_rmw.  However the function is possible called from
atomic context.

For example call trace:
  mutex_lock+0x28/0x64
  mtk_rmw+0x38/0x80
  [snip]
  max98357a_daiops_trigger+0x8c/0x9c
  soc_pcm_trigger+0x5c/0x10c

The max98357a_daiops_trigger() could run in either atomic or non-atomic
context.  As a result, dmesg shows some similar messages: "BUG: sleeping
function called from invalid context at kernel/locking/mutex.c:254".

Uses spin lock in mtk_rmw instead.

Fixes: 42a46434e9b1 ("pinctrl: add lock in mtk_rmw function.")
Signed-off-by: Tzung-Bi Shih &lt;tzungbi@google.com&gt;
Link: https://lore.kernel.org/r/20210419093449.3125704-1-tzungbi@google.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 42a46434e9b1 ("pinctrl: add lock in mtk_rmw function.") uses
mutex lock in mtk_rmw.  However the function is possible called from
atomic context.

For example call trace:
  mutex_lock+0x28/0x64
  mtk_rmw+0x38/0x80
  [snip]
  max98357a_daiops_trigger+0x8c/0x9c
  soc_pcm_trigger+0x5c/0x10c

The max98357a_daiops_trigger() could run in either atomic or non-atomic
context.  As a result, dmesg shows some similar messages: "BUG: sleeping
function called from invalid context at kernel/locking/mutex.c:254".

Uses spin lock in mtk_rmw instead.

Fixes: 42a46434e9b1 ("pinctrl: add lock in mtk_rmw function.")
Signed-off-by: Tzung-Bi Shih &lt;tzungbi@google.com&gt;
Link: https://lore.kernel.org/r/20210419093449.3125704-1-tzungbi@google.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pinctrl: add drive for I2C related pins on MT8195</title>
<updated>2021-04-21T23:53:02+00:00</updated>
<author>
<name>Zhiyong Tao</name>
<email>zhiyong.tao@mediatek.com</email>
</author>
<published>2021-04-13T05:57:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ea9d2ed46520a3fb0b865143cc824aea27deb8fa'/>
<id>ea9d2ed46520a3fb0b865143cc824aea27deb8fa</id>
<content type='text'>
This patch provides the advanced drive raw data setting version
for I2C used pins on MT8195.

Signed-off-by: Zhiyong Tao &lt;zhiyong.tao@mediatek.com&gt;
Acked-by: Sean Wang &lt;sean.wang@kernel.org&gt;
Link: https://lore.kernel.org/r/20210413055702.27535-4-zhiyong.tao@mediatek.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch provides the advanced drive raw data setting version
for I2C used pins on MT8195.

Signed-off-by: Zhiyong Tao &lt;zhiyong.tao@mediatek.com&gt;
Acked-by: Sean Wang &lt;sean.wang@kernel.org&gt;
Link: https://lore.kernel.org/r/20210413055702.27535-4-zhiyong.tao@mediatek.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pinctrl: add pinctrl driver on mt8195</title>
<updated>2021-04-21T23:53:02+00:00</updated>
<author>
<name>Zhiyong Tao</name>
<email>zhiyong.tao@mediatek.com</email>
</author>
<published>2021-04-13T05:57:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6cf5e9ef362af824de2e4e8afb78d74537f1e3db'/>
<id>6cf5e9ef362af824de2e4e8afb78d74537f1e3db</id>
<content type='text'>
This commit includes pinctrl driver for mt8195.

Signed-off-by: Zhiyong Tao &lt;zhiyong.tao@mediatek.com&gt;
Acked-by: Sean Wang &lt;sean.wang@kernel.org&gt;
Link: https://lore.kernel.org/r/20210413055702.27535-3-zhiyong.tao@mediatek.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit includes pinctrl driver for mt8195.

Signed-off-by: Zhiyong Tao &lt;zhiyong.tao@mediatek.com&gt;
Acked-by: Sean Wang &lt;sean.wang@kernel.org&gt;
Link: https://lore.kernel.org/r/20210413055702.27535-3-zhiyong.tao@mediatek.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pinctrl: add lock in mtk_rmw function.</title>
<updated>2021-03-25T09:14:50+00:00</updated>
<author>
<name>Zhiyong Tao</name>
<email>zhiyong.tao@mediatek.com</email>
</author>
<published>2021-03-21T03:31:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=42a46434e9b18b35d2e57433cdbeff3233ca9765'/>
<id>42a46434e9b18b35d2e57433cdbeff3233ca9765</id>
<content type='text'>
When multiple threads operate on the same register resource
which include multiple pin, It will make the register resource
wrong to control. So we add lock to avoid the case.

Signed-off-by: Zhiyong Tao &lt;zhiyong.tao@mediatek.com&gt;
Link: https://lore.kernel.org/r/20210321033150.15380-2-zhiyong.tao@mediatek.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When multiple threads operate on the same register resource
which include multiple pin, It will make the register resource
wrong to control. So we add lock to avoid the case.

Signed-off-by: Zhiyong Tao &lt;zhiyong.tao@mediatek.com&gt;
Link: https://lore.kernel.org/r/20210321033150.15380-2-zhiyong.tao@mediatek.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
