<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/spi/spi-synquacer.c, branch 0x221E-v0.0.1-v6.19</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=0x221E-v0.0.1-v6.19</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=0x221E-v0.0.1-v6.19'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2024-09-29T23:12:23Z</updated>
<entry>
<title>spi: Switch back to struct platform_driver::remove()</title>
<updated>2024-09-29T23:12:23Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@baylibre.com</email>
</author>
<published>2024-09-25T11:35:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=494c3dc467768782f93f1433650c56b08feb54ea'/>
<id>urn:sha1:494c3dc467768782f93f1433650c56b08feb54ea</id>
<content type='text'>
After commit 0edb555a65d1 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.

Convert all platform drivers below drivers/spi to use .remove(), with
the eventual goal to drop struct platform_driver::remove_new(). As
.remove() and .remove_new() have the same prototypes, conversion is done
by just changing the structure member name in the driver initializer.

The change for the spi-npcm-fiu stands out in the diffstat because the
inconsistent formatting style of the platform_driver initializer is
fixed to match the other struct initializer in the file.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@baylibre.com&gt;
Link: https://patch.msgid.link/20240925113501.25208-2-u.kleine-koenig@baylibre.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>spi: synquacer: switch to use modern name</title>
<updated>2023-12-11T12:55:00Z</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2023-11-28T09:30:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3524d1b727a66712f02f92807219a3650e5cf910'/>
<id>urn:sha1:3524d1b727a66712f02f92807219a3650e5cf910</id>
<content type='text'>
Change legacy name master to modern name host or controller.

No functional changed.

Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Link: https://msgid.link/r/20231128093031.3707034-10-yangyingliang@huawei.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>spi: Replace all spi-&gt;chip_select and spi-&gt;cs_gpiod references with function call</title>
<updated>2023-03-11T12:34:01Z</updated>
<author>
<name>Amit Kumar Mahapatra via Alsa-devel</name>
<email>alsa-devel@alsa-project.org</email>
</author>
<published>2023-03-10T17:32:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9e264f3f85a56cc109cc2d6010a48aa89d5c1ff1'/>
<id>urn:sha1:9e264f3f85a56cc109cc2d6010a48aa89d5c1ff1</id>
<content type='text'>
Supporting multi-cs in spi drivers would require the chip_select &amp; cs_gpiod
members of struct spi_device to be an array. But changing the type of these
members to array would break the spi driver functionality. To make the
transition smoother introduced four new APIs to get/set the
spi-&gt;chip_select &amp; spi-&gt;cs_gpiod and replaced all spi-&gt;chip_select and
spi-&gt;cs_gpiod references with get or set API calls.
While adding multi-cs support in further patches the chip_select &amp; cs_gpiod
members of the spi_device structure would be converted to arrays &amp; the
"idx" parameter of the APIs would be used as array index i.e.,
spi-&gt;chip_select[idx] &amp; spi-&gt;cs_gpiod[idx] respectively.

Signed-off-by: Amit Kumar Mahapatra &lt;amit.kumar-mahapatra@amd.com&gt;
Acked-by: Heiko Stuebner &lt;heiko@sntech.de&gt; # Rockchip drivers
Reviewed-by: Michal Simek &lt;michal.simek@amd.com&gt;
Reviewed-by: Cédric Le Goater &lt;clg@kaod.org&gt; # Aspeed driver
Reviewed-by: Dhruva Gole &lt;d-gole@ti.com&gt; # SPI Cadence QSPI
Reviewed-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt; # spi-stm32-qspi
Acked-by: William Zhang &lt;william.zhang@broadcom.com&gt; # bcm63xx-hsspi driver
Reviewed-by: Serge Semin &lt;fancer.lancer@gmail.com&gt; # DW SSI part
Link: https://lore.kernel.org/r/167847070432.26.15076794204368669839@mailman-core.alsa-project.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>spi: synquacer: Convert to platform remove callback returning void</title>
<updated>2023-03-06T21:18:19Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-03-03T17:20:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1972cdc47df737f5b90ac2132080004f5e413e91'/>
<id>urn:sha1:1972cdc47df737f5b90ac2132080004f5e413e91</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20230303172041.2103336-78-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>spi: synquacer: Fix timeout handling in synquacer_spi_transfer_one()</title>
<updated>2023-02-15T16:07:53Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2023-02-15T13:01:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e6a0b671880207566e1ece983bf989dde60bc1d7'/>
<id>urn:sha1:e6a0b671880207566e1ece983bf989dde60bc1d7</id>
<content type='text'>
wait_for_completion_timeout() never returns a &lt;0 value. It returns either
on timeout or a positive value (at least 1, or number of jiffies left
till timeout)

So, fix the error handling path and return -ETIMEDOUT should a timeout
occur.

Fixes: b0823ee35cf9 ("spi: Add spi driver for Socionext SynQuacer platform")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Acked-by: Jassi Brar &lt;jaswinder.singh@linaro.org&gt;
Link: https://lore.kernel.org/r/c2040bf3cfa201fd8890cfab14fa5a701ffeca14.1676466072.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>spi: synquacer: Add missing clk_disable_unprepare()</title>
<updated>2022-06-27T22:26:53Z</updated>
<author>
<name>Guo Mengqi</name>
<email>guomengqi3@huawei.com</email>
</author>
<published>2022-06-24T00:56:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=917e43de2a56d9b82576f1cc94748261f1988458'/>
<id>urn:sha1:917e43de2a56d9b82576f1cc94748261f1988458</id>
<content type='text'>
Add missing clk_disable_unprepare() in synquacer_spi_resume().

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Guo Mengqi &lt;guomengqi3@huawei.com&gt;
Link: https://lore.kernel.org/r/20220624005614.49434-1-guomengqi3@huawei.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>spi: spi-synquacer: fix set_cs handling</title>
<updated>2021-02-03T16:23:07Z</updated>
<author>
<name>Masahisa Kojima</name>
<email>masahisa.kojima@linaro.org</email>
</author>
<published>2021-02-01T07:31:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1c9f1750f0305bf605ff22686fc0ac89c06deb28'/>
<id>urn:sha1:1c9f1750f0305bf605ff22686fc0ac89c06deb28</id>
<content type='text'>
When the slave chip select is deasserted, DMSTOP bit
must be set.

Fixes: b0823ee35cf9 ("spi: Add spi driver for Socionext SynQuacer platform")
Signed-off-by: Masahisa Kojima &lt;masahisa.kojima@linaro.org&gt;
Signed-off-by: Jassi Brar &lt;jaswinder.singh@linaro.org&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20210201073109.9036-1-jassisinghbrar@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>spi: synquacer: Disable clock in probe error path</title>
<updated>2020-11-12T15:16:33Z</updated>
<author>
<name>Lukas Wunner</name>
<email>lukas@wunner.de</email>
</author>
<published>2020-11-08T22:41:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8853b2503014aca5c793d2c7f0aabc990b32bdad'/>
<id>urn:sha1:8853b2503014aca5c793d2c7f0aabc990b32bdad</id>
<content type='text'>
If the calls to platform_get_irq() or devm_request_irq() fail on probe
of the SynQuacer SPI driver, the clock "sspi-&gt;clk" is erroneously not
unprepared and disabled.

If the clock rate "master-&gt;max_speed_hz" cannot be determined, the same
happens and in addition the spi_master struct is not freed.

Fix it.

Fixes: b0823ee35cf9 ("spi: Add spi driver for Socionext SynQuacer platform")
Signed-off-by: Lukas Wunner &lt;lukas@wunner.de&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v5.3+
Cc: Masahisa Kojima &lt;masahisa.kojima@linaro.org&gt;
Link: https://lore.kernel.org/r/232281df1ab91d8f0f553a62d5f97fc264ace4da.1604874488.git.lukas@wunner.de
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>spi: synquacer: Simplify with dev_err_probe()</title>
<updated>2020-09-08T17:19:29Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzk@kernel.org</email>
</author>
<published>2020-09-01T15:27:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=74ee6dc1257edf5fcfba67fd8075b766d11c42a0'/>
<id>urn:sha1:74ee6dc1257edf5fcfba67fd8075b766d11c42a0</id>
<content type='text'>
Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and the error value gets printed.

Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Link: https://lore.kernel.org/r/20200901152713.18629-9-krzk@kernel.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>spi: Remove dev_err() usage after platform_get_irq()</title>
<updated>2019-08-02T11:15:43Z</updated>
<author>
<name>Stephen Boyd</name>
<email>swboyd@chromium.org</email>
</author>
<published>2019-07-30T18:15:41Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6b8ac10e0dd4b49eda513c1aa5045b3b1660d350'/>
<id>urn:sha1:6b8ac10e0dd4b49eda513c1aa5045b3b1660d350</id>
<content type='text'>
We don't need dev_err() messages when platform_get_irq() fails now that
platform_get_irq() prints an error message itself when something goes
wrong. Let's remove these prints with a simple semantic patch.

// &lt;smpl&gt;
@@
expression ret;
struct platform_device *E;
@@

ret =
(
platform_get_irq(E, ...)
|
platform_get_irq_byname(E, ...)
);

if ( \( ret &lt; 0 \| ret &lt;= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// &lt;/smpl&gt;

While we're here, remove braces on if statements that only have one
statement (manually).

Cc: Mark Brown &lt;broonie@kernel.org&gt;
Cc: linux-spi@vger.kernel.org
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Link: https://lore.kernel.org/r/20190730181557.90391-42-swboyd@chromium.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
