- 14 Feb, 2022 2 commits
-
-
Linus Walleij authored
All drivers using GPIOs as chip select have been rewritten to use GPIO descriptors passing the ->use_gpio_descriptors flag. Retire the code and fields used by the legacy GPIO API. Do not drop the ->use_gpio_descriptors flag: it now only indicates that we want to use GPIOs in addition to native chip selects. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20220210231954.807904-1-linus.walleij@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Li-hao Kuo authored
Clang build fails with spi-sunplus-sp7021.c:405:2: error: variable 'ret' is used uninitialized whenever switch default is taken default: simplify code Restore initializing ret. and add return error at default Fixes: 47e8fe57 ("spi: Modify irq request position and modify parameters") Reported-by: Tom Rix <trix@redhat.com> Reported-by: kernel test robot <lkp@intel.com> Reported-by: Nathan Chancellor <nathan@kernel.org> Reported-by: Mark Brown <broonie@kernel.org> Signed-off-by: Li-hao Kuo <lhjeff911@gmail.com> Link: https://lore.kernel.org/r/7d91e6ce29f9a8df2c53a47b4b977664020e237a.1644805060.git.lhjeff911@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 09 Feb, 2022 6 commits
-
-
Mark Brown authored
Merge series from Uwe Kleine-König <u.kleine-koenig@pengutronix.de>: this series goal is to change the spi remove callback's return value to void. After numerous patches nearly all drivers already return 0 unconditionally. The four first patches in this series convert the remaining three drivers to return 0, the final patch changes the remove prototype and converts all implementers. base-commit: 26291c54
-
Uwe Kleine-König authored
The value returned by an spi driver's remove function is mostly ignored. (Only an error message is printed if the value is non-zero that the error is ignored.) So change the prototype of the remove function to return no value. This way driver authors are not tempted to assume that passing an error to the upper layer is a good idea. All drivers are adapted accordingly. There is no intended change of behaviour, all callbacks were prepared to return 0 before. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Acked-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Acked-by: Claudius Heine <ch@denx.de> Acked-by: Stefan Schmidt <stefan@datenfreihafen.org> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> # For MMC Acked-by: Marcus Folkesson <marcus.folkesson@gmail.com> Acked-by: Łukasz Stelmach <l.stelmach@samsung.com> Acked-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20220123175201.34839-6-u.kleine-koenig@pengutronix.deSigned-off-by: Mark Brown <broonie@kernel.org>
-
Uwe Kleine-König authored
Up to now cros_ec_unregister() returns zero unconditionally. Make it return void instead which makes it easier to see in the callers that there is no error to handle. Also the return value of i2c, platform and spi remove callbacks is ignored anyway. Reviewed-by: Guenter Roeck <groeck@chromium.org> Link: https://lore.kernel.org/r/20211020071753.wltjslmimb6wtlp5@pengutronix.deSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20220123175201.34839-5-u.kleine-koenig@pengutronix.deSigned-off-by: Mark Brown <broonie@kernel.org>
-
Uwe Kleine-König authored
Up to now st33zp24_remove() returns zero unconditionally. Make it return no value instead which makes it easier to see in the callers that there is no error to handle. Also the return value of i2c and spi remove callbacks is ignored anyway. Link: https://lore.kernel.org/r/20220104231103.227924-1-u.kleine-koenig@pengutronix.deSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20220123175201.34839-4-u.kleine-koenig@pengutronix.deSigned-off-by: Mark Brown <broonie@kernel.org>
-
Uwe Kleine-König authored
The two macros FBTFT_REGISTER_DRIVER and FBTFT_REGISTER_SPI_DRIVER contain quite some duplication: Both define an spi driver and an of device table and the differences are quite subtle. So create two new macros and use both twice. Link: https://lore.kernel.org/r/20220118181338.207943-2-u.kleine-koenig@pengutronix.deSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20220123175201.34839-3-u.kleine-koenig@pengutronix.deSigned-off-by: Mark Brown <broonie@kernel.org>
-
Uwe Kleine-König authored
If registering the platform driver fails, the function must not return without undoing the spi driver registration first. Fixes: c296d5f9 ("staging: fbtft: core support") Link: https://lore.kernel.org/r/20220118181338.207943-1-u.kleine-koenig@pengutronix.deSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20220123175201.34839-2-u.kleine-koenig@pengutronix.deSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 08 Feb, 2022 10 commits
-
-
Mark Brown authored
Merge series from Leilk Liu <leilk.liu@mediatek.com>: This is more YAML conversion than new compatible.
-
Miaoqian Lin authored
This func misses checking for platform_get_irq()'s call and may passes the negative error codes to request_threaded_irq(), which takes unsigned IRQ #, causing it to fail with -EINVAL, overriding an original error code. Stop calling request_threaded_irq() with invalid IRQ #s. Fixes: 921fc183 ("spi: tegra210-quad: Add support for Tegra210 QSPI controller") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Link: https://lore.kernel.org/r/20220128165956.27821-1-linmq006@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Li-hao Kuo authored
Remove the include path and modify parameters for fix error for bt binding test Fixes: a708078e ("spi: Add Sunplus SP7021 schema") Signed-off-by: Li-hao Kuo <lhjeff911@gmail.com> Link: https://lore.kernel.org/r/b8a94fbfcab68b1279b09b6297099310c209927b.1644198244.git.lhjeff911@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Miaoqian Lin authored
This func misses checking for platform_get_irq()'s call and may passes the negative error codes to request_threaded_irq(), which takes unsigned IRQ #, causing it to fail with -EINVAL, overriding an original error code. Stop calling request_threaded_irq() with invalid IRQ #s. Fixes: f333a331 ("spi/tegra114: add spi driver") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Link: https://lore.kernel.org/r/20220128165238.25615-1-linmq006@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Luiz Angelo Daros de Luca authored
Reading from memory is 3x faster than bit-bang read operation. Also, for tl-wr2543nd, the bit-bang read was sporadically returning random data, possibly a HW defect, while fast-read works as expected. Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> Link: https://lore.kernel.org/r/20220129040453.8476-1-luizluca@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Li-hao Kuo authored
- Change irq request position to the back. - Add temporary varilable and setting (as suggested by Mr. Andy Shevchenko) Fixes: f62ca4e2 ("spi: Add spi driver for Sunplus SP7021") Signed-off-by: Li-hao Kuo <lhjeff911@gmail.com> Link: https://lore.kernel.org/r/a94e3b123773fe303221d2bd2e4ce36ffa905a1c.1644198957.git.lhjeff911@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Dan Carpenter authored
A zero value for spi->max_speed_hz or spidev->speed_hz does not make sense and trying to set that can lead to divide by zero crashes in a some of the drivers. drivers/spi/spi-s3c64xx.c:874 s3c64xx_spi_setup() error: potential divide by zero bug '/ spi->max_speed_hz'. drivers/spi/spi-fsl-dspi.c:613 hz_to_spi_baud() error: potential divide by zero bug '/ speed_hz'. drivers/spi/spi-xlp.c:146 xlp_spi_setup() error: potential divide by zero bug '/ (spi->max_speed_hz)'. drivers/spi/spi-orion.c:162 orion_spi_baudrate_set() error: potential divide by zero bug '/ speed'. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20220125065202.GA8807@kiliSigned-off-by: Mark Brown <broonie@kernel.org>
-
Leilk Liu authored
This commit adds dt-binding documentation of spi bus for Mediatek MT8186 SoC Platform. Signed-off-by: Leilk Liu <leilk.liu@mediatek.com> Acked-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20220125012330.13449-4-leilk.liu@mediatek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Leilk Liu authored
Convert Mediatek ARM SOC's SPI Master controller binding to json-schema format. Signed-off-by: Leilk Liu <leilk.liu@mediatek.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20220125012330.13449-3-leilk.liu@mediatek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Leilk Liu authored
Convert Mediatek ARM SOC's SPI Slave controller binding to json-schema format. Signed-off-by: Leilk Liu <leilk.liu@mediatek.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20220125012330.13449-2-leilk.liu@mediatek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 03 Feb, 2022 1 commit
-
-
David Heidelberg authored
Added missing description type. Fixes warning: Documentation/devicetree/bindings/spi/spi-sunplus-sp7021.yaml: properties:reg:items: 'anyOf' conditional failed Fixes: a708078e ("spi: Add Sunplus SP7021 schema") Signed-off-by: David Heidelberg <david@ixit.cz> Link: https://lore.kernel.org/r/20220202104715.27839-1-david@ixit.czSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 02 Feb, 2022 3 commits
-
-
Linus Walleij authored
My patch created compilation bugs in the MPC512x-PSC driver. Fix them up. Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Anatolij Gustschin <agust@denx.de> Cc: linuxppc-dev@lists.ozlabs.org Reported-by: kernel test robot <lkp@intel.com> Fixes: 2818824c (" spi: mpc512x-psc: Convert to use GPIO descriptors") Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20220201234535.569973-1-linus.walleij@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Rafael J. Wysocki authored
Replace acpi_bus_get_device() that is going to be dropped with acpi_fetch_acpi_dev(). No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://lore.kernel.org/r/2231987.ElGaqSPkdT@kreacherSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
-
- 01 Feb, 2022 12 commits
-
-
Mark Brown authored
Merge series from Stefan Binding <sbinding@opensource.cirrus.com>: This series enhances the helpers for ACPI resources to cope with multiple resources and exports them for use in the x86 platform code's multi-instantiate driver.
-
Stefan Binding authored
Some ACPI nodes may have more than one Spi Resource. To be able to handle these case, its necessary to have a way of counting these resources. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220121172431.6876-5-sbinding@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Stefan Binding authored
If a node contains more than one SPI resource it may be necessary to use an index to select which one you want to allocate a spi device for. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220121172431.6876-4-sbinding@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Stefan Binding authored
This can then be used to find a spi resource inside an ACPI node, and allocate a spi device. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220121172431.6876-3-sbinding@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Stefan Binding authored
This functions were previously made private since they were not used. However, these functions will be needed again. Partial revert of commit da21fde0 ("spi: Make several public functions private to spi.c") Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220121172431.6876-2-sbinding@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
Merge series from Stefan Binding <sbinding@opensource.cirrus.com>: This series enhances the helpers for ACPI resources to cope with multiple resources and exports them for use in the x86 platform code's multi-instantiate driver.
-
Stefan Binding authored
Some ACPI nodes may have more than one Spi Resource. To be able to handle these case, its necessary to have a way of counting these resources. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220121172431.6876-5-sbinding@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Stefan Binding authored
If a node contains more than one SPI resource it may be necessary to use an index to select which one you want to allocate a spi device for. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220121172431.6876-4-sbinding@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Stefan Binding authored
This can then be used to find a spi resource inside an ACPI node, and allocate a spi device. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220121172431.6876-3-sbinding@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Stefan Binding authored
This functions were previously made private since they were not used. However, these functions will be needed again. Partial revert of commit da21fde0 ("spi: Make several public functions private to spi.c") Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220121172431.6876-2-sbinding@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Linus Walleij authored
This one is pretty straight forward to switch over, the driver already relies on inspecting cs_gpio just check cs_gpiod instead and stop the special handling of requesting the GPIO and stuff the core will take care of. Cc: Lukas Wunner <lukas@wunner.de> Cc: Martin Sperl <kernel@martin.sperl.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20220201012956.563272-1-linus.walleij@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Linus Walleij authored
This switches the ST SSC SPI controller to use GPIO descriptors from the core instead of GPIO numbers. It is already using the core parsing of GPIO numbers so the switch is pretty straight-forward. Cc: Lee Jones <lee.jones@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20220201012654.562578-1-linus.walleij@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 31 Jan, 2022 5 commits
-
-
郭力豪 authored
Fix compiler warming for kernel test Fixes: f62ca4e2 ("spi: Add spi driver for Sunplus SP7021") Signed-off-by: Li-hao Kuo <lhjeff911@gmail.com> Link: https://lore.kernel.org/r/CAGcXWkzM6wbhNFLbYoijq7iS_76nYVod1ySFEDu-BRgnBokEQA@mail.gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Linus Walleij authored
The driver already relies on the core looking up GPIO lines from the core, so this is trivial to switch over to using GPIO descriptors. Cc: Purna Chandra Mandal <purna.mandal@microchip.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20220122004846.374930-1-linus.walleij@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Linus Walleij authored
This driver is already relying on the core to provide valid GPIO numbers in spi->cs_gpio through of_spi_get_gpio_numbers(), so we can switch to letting the core use GPIO descriptors instead. The driver was assigning a local function to the custom chipselect callback, but I chose to just open code the gpiod setting instead, this is easier to read. The only platform that overrides the cs_control callback is the mpc832x_rdb. Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Anatolij Gustschin <agust@denx.de> Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20220120002600.216667-1-linus.walleij@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Linus Walleij authored
The MT65xx driver was already relying on the core to get some GPIO line numbers so it can be (hopefully) trivially converted to use descriptors instead. Cc: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> Cc: Mason Zhang <Mason.Zhang@mediatek.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Peter Hess <peter.hess@ph-home.de> Cc: Leilk Liu <leilk.liu@mediatek.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20220122003302.374304-1-linus.walleij@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Linus Walleij authored
This converts the PXA2xx SPI driver to use GPIO descriptors exclusively to retrieve GPIO chip select lines. The device tree and ACPI paths of the driver already use descriptors, hence ->use_gpio_descriptors is already set and this codepath is well tested. Convert all the PXA boards providing chip select GPIOs as platform data and drop the old GPIO chipselect handling in favor of the core managing it exclusively. Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Daniel Mack <daniel@zonque.org> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Cc: linux-arm-kernel@lists.infradead.org Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20220125005836.494807-1-linus.walleij@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 30 Jan, 2022 1 commit
-
-
Linus Torvalds authored
-