Uwe Kleine-König (The Capable Hub)
64e3357902
floppy: Drop unused pnp driver data
...
The pnp_device_id array is only used for module data to support
auto-loading the floppy module. So the .driver_data member is unused and
this assignment can be dropped.
While touching that array, align the coding style to what is used most
for these.
This patch doesn't modify the compiled array, only its representation
in source form benefits. The former was confirmed with x86 and arm64
builds.
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com >
Reviewed-by: Denis Efremov (Oracle) <efremov@linux.com >
Link: https://patch.msgid.link/99dbf851ffb99229ea1dcfd8f58e9ee6a1f05349.1781075967.git.u.kleine-koenig@baylibre.com
Signed-off-by: Jens Axboe <axboe@kernel.dk >
2026-06-10 06:23:51 -06:00
Uwe Kleine-König
5d087c485b
pwm: stm32: Fix rounding issue for requests with inverted polarity
...
The calculation of the number of pwm clk ticks from a time length in
nanoseconds involves a division and thus some rounding. That might
result in
duty_ticks + offset_ticks < period_ticks
despite
duty_length_ns + duty_offset_ns >= period_length_ns
. The stm32 PWM cannot configure offset_ticks freely, it can only select
0 or period_length_ns - duty_length_ns---that is the classic normal and
inverted polarity. The decision to select the hardware polarity must be
done using the ticks values and not the nanoseconds times to adhere to
the rounding rules by the pwm core.
With the pwm clk running at 208900 kHz on my test machine
(stm32mp135f-dk), a test case that was handled wrong is:
# pwmround -P 9999962 -O 24970 -D 9974992
period_length = 9999962
duty_length = 9974840
duty_offset = 25123
With this change applied the rounding is done correctly:
# pwmround -P 9999962 -O 24970 -D 9974992
period_length = 9999962
duty_length = 9974840
duty_offset = 0
Fixes: deaba9cff8 ("pwm: stm32: Implementation of the waveform callbacks")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/c5e7767cee821b5f6e00f95bd14a5e13015646fb.1776264104.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org >
2026-04-16 07:25:15 +02:00
Uwe Kleine-König
c8d0c36d85
riscv: Simplify assignment for UTS_MACHINE
...
The BITS variable conveniently allows to simplify the assignment for
UTS_MACHINE.
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20260313164012.1153936-2-u.kleine-koenig@baylibre.com
Signed-off-by: Paul Walmsley <pjw@kernel.org >
2026-04-04 18:42:40 -06:00
Uwe Kleine-König
0f967cb8ea
fbdev: au1100fb: Replace license boilerplate by SPDX header
...
This also gets rid of an old address of the FSF.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Helge Deller <deller@gmx.de >
2026-02-19 17:38:17 +01:00
Uwe Kleine-König
cd849d26d0
fbdev: au1100fb: Fold au1100fb.h into its only user
...
This gets rid of a header that is only used once. The copyrights and
license specifications are all already covered in the au1100fb.c file.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Helge Deller <deller@gmx.de >
2026-02-19 17:38:17 +01:00
Uwe Kleine-König
bcf4373eec
fbdev: au1100fb: Replace custom printk wrappers by pr_*
...
The global wrappers also have the advantage to do stricter format
checking, so the pr_devel formats are also checked if DEBUG is not
defined. The global variants only check for DEBUG being defined and not
its actual value, so the #define to zero is dropped, too.
There is only a slight semantic change as the (by default disabled)
debug output doesn't contain __FILE__ any more.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Helge Deller <deller@gmx.de >
2026-02-19 17:38:17 +01:00
Uwe Kleine-König
6f366e8648
fbdev: au1100fb: Make driver compilable on non-mips platforms
...
The header asm/mach-au1x00/au1000.h is unused apart from pulling in
<linux/delay.h> (for mdelay()) and <linux/io.h> (for KSEG1ADDR()). Then
the only platform specific part in the driver is the usage of the KSEG1ADDR
macro, which for the non-mips case can be stubbed.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Helge Deller <deller@gmx.de >
2026-02-19 17:38:17 +01:00
Uwe Kleine-König
13c89a37c6
fbdev: au1100fb: Use proper conversion specifiers in printk formats
...
%zu is the dedicated type for size_t. %d only works on 32bit
architectures where size_t is typedef'd to be unsigned int. (And then
the signedness doesn't fit, but `gcc -Wformat` doesn't stumble over this.
Also the size of dma_addr_t is architecture dependent and it should be
printkd using %pad (and the value passed by reference).
This prepares allowing this driver to be compiled on non-mips platforms.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Helge Deller <deller@gmx.de >
2026-02-19 17:38:17 +01:00
Uwe Kleine-König
2bb53005f4
fbdev: au1100fb: Mark several local functions as static
...
This fixes several (fatal) compiler warnings à la
drivers/video/fbdev/au1100fb.c:530:6: error: no previous prototype for ‘au1100fb_drv_remove’ [-Werror=missing-prototypes]
523 | void au1100fb_drv_remove(struct platform_device *dev)
| ^~~~~~~~~~~~~~~~~~~
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Helge Deller <deller@gmx.de >
2026-02-19 17:38:17 +01:00
Uwe Kleine-König
7939cecdc6
fbdev: au1100fb: Don't store device specific data in global variables
...
Using global data to store device specific data is a bad pattern that
breaks if there is more than one device. So expand driver data and drop
the global variables.
While there is probably no machine that has two or more au1100fb
devices, this makes the driver a better template for new drivers and
saves some memory if there is no such bound device.
bloat-o-meter reports (for ARCH=arm allmodconfig + CONFIG_FB_AU1100=y
and ignoring the rename of the init function):
add/remove: 1/4 grow/shrink: 2/2 up/down: 1360/-4800 (-3440)
Function old new delta
au1100fb_drv_probe 2648 3328 +680
$a 12808 13484 +676
au1100fb_drv_resume 404 400 -4
au1100fb_fix 68 - -68
au1100fb_var 160 - -160
fbregs 2048 - -2048
$d 9525 7009 -2516
Total: Before=38664, After=35224, chg -8.90%
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Helge Deller <deller@gmx.de >
2026-02-19 17:38:16 +01:00
Uwe Kleine-König
544a237ada
Bluetooth: btmtksdio: Use pm_ptr instead of #ifdef CONFIG_PM
...
This increases build coverage and allows to drop an #ifdef.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com >
2026-01-29 13:23:06 -05:00
Uwe Kleine-König
370fdb9825
spi: fsi: Convert to fsi bus probe mechanism
...
The fsi bus got a dedicated probe function. Make use of that. This fixes
a runtime warning about the driver needing to be converted to the bus
probe method.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Acked-by: Mark Brown <broonie@kernel.org >
Acked-by: Eddie James <eajames@linux.ibm.com >
Link: https://patch.msgid.link/fc2a758ef00844dd5bd614a25b36a4a38355d12d.1765279318.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2026-01-27 16:35:36 +01:00
Uwe Kleine-König
1086210a46
i2c: fsi: Convert to fsi bus probe mechanism
...
The fsi bus got a dedicated probe function. Make use of that. This fixes
a runtime warning about the driver needing to be converted to the bus
probe method.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Reviewed-by: Andi Shyti <andi.shyti@kernel.org >
Acked-by: Eddie James <eajames@linux.ibm.com >
Link: https://patch.msgid.link/d8c27aed45bf3119c08c9772768d675ae2ccc0c3.1765279318.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2026-01-27 16:35:36 +01:00
Uwe Kleine-König
0d295b19bd
fsi: scom: Convert to fsi bus probe mechanism
...
The fsi bus got a dedicated probe function. Make use of that. This fixes
a runtime warning about the driver needing to be converted to the bus
probe method.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Acked-by: Eddie James <eajames@linux.ibm.com >
Link: https://patch.msgid.link/d02a22f2f5442dc03d1d803d1b8190bc89bc71d4.1765279318.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2026-01-27 16:35:36 +01:00
Uwe Kleine-König
0cf9580a3e
fsi: sbefifo: Convert to fsi bus probe mechanism
...
The fsi bus got a dedicated probe function. Make use of that. This fixes
a runtime warning about the driver needing to be converted to the bus
probe method.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Acked-by: Eddie James <eajames@linux.ibm.com >
Link: https://patch.msgid.link/79dd5a9459f0719b7602165c89eb6fc24815f3b5.1765279318.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2026-01-27 16:35:36 +01:00
Uwe Kleine-König
573e29c501
fsi: master: Convert to fsi bus probe mechanism
...
The fsi bus got a dedicated probe function. Make use of that. This fixes
a runtime warning about the driver needing to be converted to the bus
probe method.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Acked-by: Eddie James <eajames@linux.ibm.com >
Link: https://patch.msgid.link/17686d71b4ad3f7ebb63e92453273095a5dd09ea.1765279318.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2026-01-27 16:35:36 +01:00
Uwe Kleine-König
ec93d2ea3d
fsi: i2cr-scom: Convert to fsi bus probe mechanism
...
The fsi bus got a dedicated probe and remove callback. Make use of them.
This fixes a runtime warning about the driver needing to be converted to
the bus methods.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Acked-by: Eddie James <eajames@linux.ibm.com >
Link: https://patch.msgid.link/694a7d077316c3e2883a8410eade67cd578ee556.1765279318.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2026-01-27 16:35:36 +01:00
Uwe Kleine-König
69d4ca0090
fsi: Create bus specific probe and remove functions
...
Introduce a bus specific probe and remove function. For now this only
allows to get rid of a cast of the generic device to an fsi device in
the drivers and changes the remove prototype to return void---a non-zero
return value is ignored anyhow.
The objective is to get rid of users of struct device callbacks
.probe(), .remove() and .shutdown() to eventually remove these.
Until all fsi drivers are converted this results in a runtime warning
about the drivers needing an update because there is a bus probe
function and a driver probe function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Acked-by: Eddie James <eajames@linux.ibm.com >
Link: https://patch.msgid.link/3b53adb75a5ae7894736d46cb6eb85f5ef36520e.1765279318.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2026-01-27 16:35:36 +01:00
Uwe Kleine-König
68cc6588b5
fsi: Make fsi_bus_type a private variable to the core
...
There are no users of fsi_bus_type outside of fsi-core.c, so make that
variable static, don't export it and drop the declaration from the
public header file.
As there is a usage of fsi_bus_type in fsi_create_device() the
definition of that variable must happen further up in the file to not
have to add a local declaration.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Acked-by: Eddie James <eajames@linux.ibm.com >
Link: https://patch.msgid.link/bfd83034dec04d5a6b01a234988377fc6224614d.1765279318.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2026-01-27 16:35:35 +01:00
Uwe Kleine-König
605fdbaec1
spi: fsi: Drop assigning fsi bus
...
Since commit FIXME ("fsi: Assign driver's bus in fsi_driver_register()")
module_fsi_driver() cares about assigning the driver's bus member. Drop
the explicit driver specific assignment.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Acked-by: Mark Brown <broonie@kernel.org >
Acked-by: Eddie James <eajames@linux.ibm.com >
Link: https://patch.msgid.link/279e26a6740f10d119be7ea01d4af596309b3bb4.1765279318.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2026-01-27 16:35:35 +01:00
Uwe Kleine-König
76497839ee
i2c: fsi: Drop assigning fsi bus
...
Since commit FIXME ("fsi: Assign driver's bus in fsi_driver_register()")
module_fsi_driver() cares about assigning the driver's bus member. Drop
the explicit driver specific assignment.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Reviewed-by: Andi Shyti <andi.shyti@kernel.org >
Acked-by: Eddie James <eajames@linux.ibm.com >
Link: https://patch.msgid.link/8a36a0dba809d3bfe225627fd178daece10ff6a5.1765279318.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2026-01-27 16:35:35 +01:00
Uwe Kleine-König
18fa479b90
fsi: Provide thin wrappers around dev_[gs]et_data() for fsi devices
...
Similar to wrappers for other subsystems provide inline functions for
fsi devices to store driver data.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Acked-by: Eddie James <eajames@linux.ibm.com >
Link: https://patch.msgid.link/5de7a7cbb30918b3503235130bd8aa1a9a63d71c.1765279318.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2026-01-27 16:35:35 +01:00
Uwe Kleine-König
03db6a80b7
fsi: Assign driver's bus in fsi_driver_register()
...
Instead of letting each driver assign the bus, do it once in the fsi
driver register function.
Simplify the fsi drivers that are living in drivers/fsi accordingly.
Once all fsi drivers dropped assigning the bus, fsi_bus_type can be made
a static variable.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Acked-by: Eddie James <eajames@linux.ibm.com >
Link: https://patch.msgid.link/54804c2cd4d84a6b5fb679831122b6acdd36b168.1765279318.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2026-01-27 16:35:35 +01:00
Uwe Kleine-König
94c37d42cb
fsi: Make use of module_fsi_driver()
...
All other fsi drivers already use this helper to reduce boilerplate.
Catch up for the last two remaining ones.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Acked-by: Eddie James <eajames@linux.ibm.com >
Link: https://patch.msgid.link/602437dc213cbe35ee75d0d0a4b4a2c28859e3f9.1765279318.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2026-01-27 16:35:35 +01:00
Uwe Kleine-König
bad909507a
wifi: rtw88: sdio: Migrate to use sdio specific shutdown function
...
This saves a cast in the driver. The motivation is stop using the callback
.shutdown in rsi_driver.drv to make it possible to drop that.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Acked-by: Ping-Ke Shih <pkshih@realtek.com >
Link: https://patch.msgid.link/5a328658c20613068bbbfabd3d0e721b69b3d474.1768232321.git.u.kleine-koenig@baylibre.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2026-01-27 13:42:20 +01:00
Uwe Kleine-König
0f789b37c1
wifi: rsi: sdio: Migrate to use sdio specific shutdown function
...
This saves a cast in the driver. The motivation is stop using the callback
.shutdown in rsi_driver.drv to make it possible to drop that.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/2909323889b8ad4732ef6a8e05b5c40487a6c4bb.1768232321.git.u.kleine-koenig@baylibre.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2026-01-27 13:42:20 +01:00
Uwe Kleine-König
c5c57e56de
sdio: Provide a bustype shutdown function
...
To prepare sdio drivers to migrate away from struct device_driver::shutdown
(and then eventually remove that callback) create a serdev driver shutdown
callback and migration code to keep the existing behaviour. Note this
introduces a warning for each driver that isn't converted yet to that
callback at register time.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org >
Link: https://patch.msgid.link/397f45c2818f6632151f92b70e547262f373c3b6.1768232321.git.u.kleine-koenig@baylibre.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2026-01-27 13:42:20 +01:00
Uwe Kleine-König
aa12c7e703
pwm: Emit native configuration in /sys/kernel/debug/pwm
...
Currently there are two abstractions for PWM drivers. Use the waveform
representation for the drivers that support it as this is more
expressive and so tells more about the actual hardware state.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20251121104947.2652013-2-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org >
2026-01-20 18:38:05 +01:00
Uwe Kleine-König
c198b7773c
pwm: Ensure ioctl() returns a negative errno on error
...
copy_to_user() returns the number of bytes not copied, thus if there is
a problem a positive number. However the ioctl callback is supposed to
return a negative error code on error.
This error is a unfortunate as strictly speaking it became ABI with the
introduction of pwm character devices. However I never saw the issue in
real life -- I found this by code inspection -- and it only affects an
error case where readonly memory is passed to the ioctls or the address
mapping changes while the ioctl is active. Also there are already error
cases returning negative values, so the calling code must be prepared to
see such values already.
Fixes: 9c06f26ba5 ("pwm: Add support for pwmchip devices for faster and easier userspace access")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20260119151325.571857-2-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org >
2026-01-19 17:46:51 +01:00
Uwe Kleine-König
986d388e67
greybus: Use bus methods for .probe() and .remove()
...
These are nearly identical to the respective driver callbacks. The only
difference is that .remove() returns void instead of int.
The objective is to get rid of users of struct device_driver callbacks
.probe() and .remove() to eventually remove these.
Acked-by: Johan Hovold <johan@kernel.org >
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20260113145012.2379944-2-u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2026-01-16 16:32:03 +01:00
Uwe Kleine-König
e82d0477fd
tpm/tpm_ftpm_tee: Fix kdoc after function renames
...
Recently ftpm_tee_probe() and ftpm_tee_remove() grew a suffix in their
function name but I failed to adapt the kernel doc when doing so. This
change aligns the kernel doc to the actual function name (again).
Fixes: 92fad96aea ("tpm/tpm_ftpm_tee: Make use of tee bus methods")
Reported-by: kernel test robot <lkp@intel.com >
Closes: https://lore.kernel.org/oe-kbuild-all/202601132105.9lgSsC4U-lkp@intel.com/
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org >
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org >
2026-01-15 10:28:33 +01:00
Uwe Kleine-König
cba202aa35
PCI/portdrv: Use bus-type functions
...
Instead of assigning the probe function for each driver individually, use
.probe() and .remove() from the pci_express bus. Rename the functions for
consistency.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com >
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com >
Link: https://patch.msgid.link/83d1edc7d619423331fa6802f0e7da3919a308a9.1764688034.git.u.kleine-koenig@baylibre.com
2026-01-13 15:49:12 -06:00
Uwe Kleine-König
9d29a9c06f
PCI/portdrv: Don't check for valid device and driver in bus callbacks
...
The driver core ensures that in .probe() and .remove() both dev and
dev->driver are valid. So drop the respective check.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com >
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com >
Link: https://patch.msgid.link/2cc2e15e05318b9f0d7b6a2b69b3169d2a6f0bd3.1764688034.git.u.kleine-koenig@baylibre.com
2026-01-13 15:48:59 -06:00
Uwe Kleine-König
61df4929a7
PCI/portdrv: Move pcie_port_bus_type to pcie source file
...
Conceptually the pci_express bus doesn't belong in generic PCI code.
Move pcie_port_bus_match() and pcie_port_bus_type to pcie/portdrv.c.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com >
Link: https://patch.msgid.link/420d771f0091dea7cf18f445b94301576dcee4c8.1764688034.git.u.kleine-koenig@baylibre.com
2026-01-13 15:42:35 -06:00
Uwe Kleine-König
0c1594df40
PCI/portdrv: Don't check for the driver's and device's bus
...
The driver core ensures that the match function is only called for drivers
and devices of the right bus. So drop the useless check.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com >
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com >
Link: https://patch.msgid.link/09ca261912a37d2b253f43359a5dfeec42c016dc.1764688034.git.u.kleine-koenig@baylibre.com
2026-01-13 15:42:23 -06:00
Uwe Kleine-König
15fff3b799
PCI/portdrv: Drop empty shutdown callback
...
.shutdown() is an optional callback and the core only calls it if the
pointer in struct device_driver is non-NULL. So make nothing in a bit
shorter time and remove the empty function.
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org >
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com >
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://patch.msgid.link/283fef06ac51efbb7df25f347d6f3a2967f96429.1764688034.git.u.kleine-koenig@baylibre.com
2026-01-13 15:42:09 -06:00
Uwe Kleine-König
01464a3fdf
PCI/portdrv: Fix potential resource leak
...
pcie_port_probe_service() unconditionally calls get_device() (unless it
fails). So drop that reference also unconditionally as it's fine for a
PCIe driver to not have a remove callback.
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com >
Link: https://patch.msgid.link/e1c68c3b3f1af8427e98ca5e2c79f8bf0ebe2ce4.1764688034.git.u.kleine-koenig@baylibre.com
2026-01-13 15:41:40 -06:00
Uwe Kleine-König
1f61d735b8
host1x: Convert to bus methods
...
The callbacks .probe(), .remove() and .shutdown() for device_drivers
should go away. So migrate to bus methods. There are two differences
that need addressing:
- The bus remove callback returns void while the driver remove callback
returns int (the actual value is ignored by the core).
- The bus shutdown callback is also called for unbound devices, so an
additional check for dev->driver != NULL is needed.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com > # tegra20 tegra-video
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com >
Signed-off-by: Thierry Reding <treding@nvidia.com >
Link: https://patch.msgid.link/dd55d034c68953268ea416aa5c13e41b158fcbb4.1765355236.git.u.kleine-koenig@baylibre.com
2026-01-13 12:26:32 +01:00
Uwe Kleine-König
ba3588410c
host1x: Make remove callback return void
...
The return value of struct device_driver::remove is ignored by the core
(see device_remove() in drivers/base/dd.c). So it doesn't make sense to
let the host1x remove callback return an int just to ignore it later.
So make the callback return void. All current implementors return 0, so
they are easily converted.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com > # tegra20 tegra-video
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com >
Signed-off-by: Thierry Reding <treding@nvidia.com >
Link: https://patch.msgid.link/d364fd4ec043d36ee12e46eaef98c57658884f63.1765355236.git.u.kleine-koenig@baylibre.com
2026-01-13 12:25:38 +01:00
Uwe Kleine-König
4485990537
scsi: ufs: core: Convert to SCSI bus methods
...
The SCSI subsystem has implemented dedicated callbacks for probe, remove
and shutdown. Make use of them. This fixes a runtime warning about the
driver needing to be converted to the bus probe method.
Reviewed-by: Peter Wang <peter.wang@mediatek.com >
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Reviewed-by: Bart Van Assche <bvanassche@acm.org >
Link: https://patch.msgid.link/69f17c7d4f8f587e2a56e3ea268d441d98a6a895.1766133330.git.u.kleine-koenig@baylibre.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2026-01-11 21:31:58 -05:00
Uwe Kleine-König
4bc2205be4
scsi: st: Convert to SCSI bus methods
...
The SCSI subsystem has implemented dedicated callbacks for probe, remove
and shutdown. Make use of them. This fixes a runtime warning about the
driver needing to be converted to the bus probe method.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Reviewed-by: Bart Van Assche <bvanassche@acm.org >
Link: https://patch.msgid.link/6da44731f77e8fdcd18e5f438643d58c98945db4.1766133330.git.u.kleine-koenig@baylibre.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2026-01-11 21:31:58 -05:00
Uwe Kleine-König
9ccda35df7
scsi: sr: Convert to SCSI bus methods
...
The SCSI subsystem has implemented dedicated callbacks for probe, remove
and shutdown. Make use of them. This fixes a runtime warning about the
driver needing to be converted to the bus probe method.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Reviewed-by: Bart Van Assche <bvanassche@acm.org >
Link: https://patch.msgid.link/ff6e8421f9efa84be3c37a11637aa435899160bf.1766133330.git.u.kleine-koenig@baylibre.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2026-01-11 21:31:58 -05:00
Uwe Kleine-König
a71d5deea6
scsi: ses: Convert to SCSI bus methods
...
The SCSI subsystem has implemented dedicated callbacks for probe, remove
and shutdown. Make use of them. This fixes a runtime warning about the
driver needing to be converted to the bus probe method.
There is no need for an empty remove callback, no remove callback has
the same semantics. So instead of converting the remove callback, drop
it.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Reviewed-by: Bart Van Assche <bvanassche@acm.org >
Link: https://patch.msgid.link/7124bf21c02a116bca13940e40e97373fd776590.1766133330.git.u.kleine-koenig@baylibre.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2026-01-11 21:31:58 -05:00
Uwe Kleine-König
63b541f054
scsi: sd: Convert to SCSI bus methods
...
The SCSI subsystem has implemented dedicated callbacks for probe, remove
and shutdown. Make use of them. This fixes a runtime warning about the
driver needing to be converted to the bus probe method.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Reviewed-by: Bart Van Assche <bvanassche@acm.org >
Link: https://patch.msgid.link/8ad5a00c2ad2a64b81350ae3fab02fbe430f306d.1766133330.git.u.kleine-koenig@baylibre.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2026-01-11 21:31:58 -05:00
Uwe Kleine-König
fba333569c
scsi: ch: Convert to SCSI bus methods
...
The SCSI subsystem has implemented dedicated callbacks for probe, remove
and shutdown. Make use of them. This fixes a runtime warning about the
driver needing to be converted to the bus probe method.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Reviewed-by: Bart Van Assche <bvanassche@acm.org >
Link: https://patch.msgid.link/b36de11cbc32265a52264da5c813dd6e1abd21fd.1766133330.git.u.kleine-koenig@baylibre.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2026-01-11 21:31:58 -05:00
Uwe Kleine-König
f7d4f1bf57
scsi: core: sysfs: Make use of bus callbacks
...
Introduce a bus-specific probe, remove and shutdown function. For now
this only allows to get rid of a cast of the generic device to a SCSI
device in the drivers and changes the remove prototype to return
void---a non-zero return value is ignored anyhow.
The objective is to get rid of users of struct device_driver callbacks
.probe(), .remove() and .shutdown() to eventually remove these. Until
all SCSI drivers are converted, this results in a runtime warning about
the drivers needing an update because there is a bus probe function and
a driver probe function. The in-tree drivers are fixed by the following
commits.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Reviewed-by: Peter Wang <peter.wang@mediatek.com >
Reviewed-by: Bart Van Assche <bvanassche@acm.org >
Link: https://patch.msgid.link/a54e363a3fd2054fb924afd7df44bca7f444b5f1.1766133330.git.u.kleine-koenig@baylibre.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2026-01-11 21:31:58 -05:00
Uwe Kleine-König
7d42bcea57
scsi: core: Pass a struct scsi_driver to scsi_{,un}register_driver()
...
This aligns with what other subsystems do, reduces boilerplate a bit for
device drivers and is less error prone.
Reviewed-by: Peter Wang <peter.wang@mediatek.com >
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Reviewed-by: Bart Van Assche <bvanassche@acm.org >
Link: https://patch.msgid.link/ac17fdea58e384cb514c639306d48ce0005820b0.1766133330.git.u.kleine-koenig@baylibre.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2026-01-11 21:31:57 -05:00
Uwe Kleine-König
c874f5fef0
wifi: wlcore: sdio: Use pm_ptr instead of #ifdef CONFIG_PM
...
This increases build coverage and removes two ugly #ifdefs.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20251217112033.3309281-4-u.kleine-koenig@baylibre.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2026-01-08 13:29:38 +01:00
Uwe Kleine-König
92fad96aea
tpm/tpm_ftpm_tee: Make use of tee bus methods
...
The tee bus got dedicated callbacks for probe and remove.
Make use of these. This fixes a runtime warning about the driver needing
to be converted to the bus methods.
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com >
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org >
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org >
2026-01-07 08:14:54 +01:00
Uwe Kleine-König
9e4c7808b7
tpm/tpm_ftpm_tee: Make use of tee specific driver registration
...
tee_client_driver_register() is typed more strongly and cares about
assigning the driver's bus. Similar for tee_client_driver_unregister().
Make use of these functions.
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com >
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org >
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org >
2026-01-07 08:14:54 +01:00
Uwe Kleine-König
c6ef3e9057
KEYS: trusted: Make use of tee bus methods
...
The tee bus got dedicated callbacks for probe and remove.
Make use of these. This fixes a runtime warning about the driver needing
to be converted to the bus methods.
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com >
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org >
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org >
2026-01-07 08:14:53 +01:00
Uwe Kleine-König
7b7e532b58
KEYS: trusted: Migrate to use tee specific driver registration function
...
The tee subsystem recently got a set of dedicated functions to register
(and unregister) a tee driver. Make use of them. These care for setting the
driver's bus (so the explicit assignment can be dropped) and the driver
owner (which is an improvement this driver benefits from).
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com >
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org >
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org >
2026-01-07 08:14:53 +01:00
Uwe Kleine-König
2966fa040b
firmware: tee_bnxt: Make use of tee bus methods
...
The tee bus got dedicated callbacks for probe and remove.
Make use of these. This fixes a runtime warning about the driver needing
to be converted to the bus methods.
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com >
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org >
2026-01-07 08:14:53 +01:00
Uwe Kleine-König
ae9d338ba7
firmware: tee_bnxt: Make use of module_tee_client_driver()
...
Reduce boilerplate by using the newly introduced module_tee_client_driver().
That takes care of assigning the driver's bus, so the explicit assigning
in this driver can be dropped.
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com >
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org >
2026-01-07 08:14:53 +01:00
Uwe Kleine-König
191ef0c5b3
firmware: arm_scmi: Make use of tee bus methods
...
The tee bus got dedicated callbacks for probe and remove.
Make use of these. This fixes a runtime warning about the driver needing
to be converted to the bus methods. Note that the return value of .remove()
was already ignored before, so there is no problem introduced by dropping
the error returns.
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com >
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com >
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org >
2026-01-07 08:14:53 +01:00
Uwe Kleine-König
fe700bc50a
firmware: arm_scmi: optee: Make use of module_tee_client_driver()
...
Reduce boilerplate by using the newly introduced module_tee_client_driver().
That takes care of assigning the driver's bus, so the explicit assigning
in this driver can be dropped.
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com >
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com >
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org >
2026-01-07 08:14:53 +01:00
Uwe Kleine-König
7a5f567ab4
efi: stmm: Make use of tee bus methods
...
The tee bus got dedicated callbacks for probe and remove.
Make use of these. This fixes a runtime warning about the driver needing
to be converted to the bus methods.
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com >
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org >
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org >
2026-01-07 08:14:53 +01:00
Uwe Kleine-König
0a6441a30b
efi: stmm: Make use of module_tee_client_driver()
...
Reduce boilerplate by using the newly introduced module_tee_client_driver().
That takes care of assigning the driver's bus, so the explicit assigning
in this driver can be dropped.
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com >
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org >
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org >
2026-01-07 08:14:53 +01:00
Uwe Kleine-König
5e9151cecb
hwrng: optee - Make use of tee bus methods
...
The tee bus got dedicated callbacks for probe and remove.
Make use of these. This fixes a runtime warning about the driver needing
to be converted to the bus methods.
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com >
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Acked-by: Herbert Xu <herbert@gondor.apana.org.au >
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org >
2026-01-07 08:14:53 +01:00
Uwe Kleine-König
21ecfe424b
hwrng: optee - Make use of module_tee_client_driver()
...
Reduce boilerplate by using the newly introduced module_tee_client_driver().
That takes care of assigning the driver's bus, so the explicit assigning
in this driver can be dropped.
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com >
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Acked-by: Herbert Xu <herbert@gondor.apana.org.au >
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org >
2026-01-07 08:14:53 +01:00
Uwe Kleine-König
91a0b0dce3
bus: mhi: ep: Use bus callbacks for .probe() and .remove()
...
These are nearly identical to the driver callbacks, the only relevant
difference is that the bus remove method returns void (instead of an int
where the value is ignored).
The objective is to get rid of users of struct device_driver callbacks
.probe(), and .remove() to eventually remove these.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com >
Link: https://patch.msgid.link/2a79d99182a5171e83a07bf9f438ae31362f7e5d.1766090211.git.ukleinek@kernel.org
2025-12-31 16:27:13 +05:30
Uwe Kleine-König
8535df5dd6
bus: mhi: host: Use bus callbacks for .probe() and .remove()
...
These are nearly identical to the driver callbacks, the only relevant
difference is that the bus remove method returns void (instead of an int
where the value is ignored).
The objective is to get rid of users of struct device_driver callbacks
.probe(), and .remove() to eventually remove these.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com >
Link: https://patch.msgid.link/e8032b3c2a8953a4a2b84dfa79a260c35f1d71b7.1766090211.git.ukleinek@kernel.org
2025-12-31 16:27:13 +05:30
Uwe Kleine-König
866160a51f
soundwire: Use bus methods for .probe(), .remove() and .shutdown()
...
These are nearly identical to the respective driver callbacks. The only
differences are that .remove() returns void instead of int and .shutdown()
has to cope for unbound devices.
The objective is to get rid of users of struct device_driver callbacks
.probe(), .remove() and .shutdown() to eventually remove these.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20251215174925.1327021-6-u.kleine-koenig@baylibre.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2025-12-23 12:12:49 +05:30
Uwe Kleine-König
478f389070
soundwire: Make remove function return no value
...
All remove functions return zero and the driver core ignores any other
returned value (just emits a warning about it being ignored). So make all
remove callbacks return void instead of an ignored int. This is in line
with most other subsystems.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20251215174925.1327021-5-u.kleine-koenig@baylibre.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2025-12-23 12:12:49 +05:30
Uwe Kleine-König
273aa250f1
Documentation: Improve wording on requirements for a free Nitrokey
...
"listed in MAINTAINERS" is not enough to qualify for the free Nitrokey
Start. You have to be listed in an M: entry. Mention that to reduce
confusion for reviewers who wonder why their application fails.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Reviewed-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org >
Signed-off-by: Jonathan Corbet <corbet@lwn.net >
Message-ID: <20251203074349.1826233-2-u.kleine-koenig@baylibre.com >
2025-12-22 15:30:51 -07:00
Uwe Kleine-König
4f32b63418
rtc: optee: Make use of tee bus methods
...
The tee bus got dedicated callbacks for probe and remove. Make use of
these. This fixes a runtime warning about the driver needing to be
converted to the bus methods.
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com >
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org >
2025-12-18 15:00:45 +01:00
Uwe Kleine-König
6d8a0031d9
rtc: optee: Migrate to use tee specific driver registration function
...
The tee subsystem recently got a set of dedicated functions to register
(and unregister) a tee driver. Make use of them. These care for setting the
driver's bus (so the explicit assignment can be dropped) and the driver
owner (which is an improvement this driver benefits from).
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com >
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org >
2025-12-18 15:00:36 +01:00
Uwe Kleine-König
71e47245f8
tee: Adapt documentation to cover recent additions
...
The previous commits introduced some helpers to reduce boilerplate
and bus specific callbacks for probe and remove.
Adapt the reference example to make use of these.
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com >
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org >
2025-12-17 18:28:28 +01:00
Uwe Kleine-König
71a3346572
tee: Add probe, remove and shutdown bus callbacks to tee_client_driver
...
Introduce a bus specific probe, remove and shutdown function. For now
this only allows to get rid of a cast of the generic device to a
tee_client device in the drivers and changes the remove prototype to
return void---a non-zero return value is ignored anyhow.
The objective is to get rid of users of struct device_driver callbacks
.probe(), .remove() and .shutdown() to eventually remove these. Until
all tee_client drivers are converted this results in a runtime warning
about the drivers needing an update because there is a bus probe
function and a driver probe function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com >
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org >
2025-12-17 18:28:28 +01:00
Uwe Kleine-König
a707eda330
tee: Add some helpers to reduce boilerplate for tee client drivers
...
Similar to platform drivers (and others) create dedicated register and
unregister functions and a macro to simplify modules that only need to
handle driver registration in their init and exit handlers.
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com >
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org >
2025-12-17 18:28:27 +01:00
Uwe Kleine-König
284da5de61
platform/surface: Migrate to serdev specific shutdown function
...
The motivation is stop using the callback .shutdown in
qca_serdev_driver.driver to make it possible to drop that.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/9682d206a1f375cd98e7dbfce4f1a83b4b345178.1765526117.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2025-12-17 15:08:19 +01:00
Uwe Kleine-König
12a6a5726c
Bluetooth: hci_qca: Migrate to serdev specific shutdown function
...
This saves a cast in the driver. The motivation is stop using the callback
.shutdown in qca_serdev_driver.driver to make it possible to drop that.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/261a3384e25c4837d4efee87958805f15d7d4e3c.1765526117.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2025-12-17 15:08:19 +01:00
Uwe Kleine-König
673a674c52
Bluetooth: hci_aml: Migrate to serdev specific shutdown function
...
This saves a cast in the driver. The motivation is stop using the callback
.shutdown in qca_serdev_driver.driver to make it possible to drop that.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/42ae20ba70ff6fbbbd9b846ac9acd0f7d58451b0.1765526117.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2025-12-17 15:08:19 +01:00
Uwe Kleine-König
6d71c62b13
serdev: Provide a bustype shutdown function
...
To prepare serdev driver to migrate away from struct device_driver::shutdown
(and then eventually remove that callback) create a serdev driver shutdown
callback and migration code to keep the existing behaviour. Note this
introduces a warning for each driver at register time that isn't converted
yet to that callback.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/ab518883e3ed0976a19cb5b5b5faf42bd3a655b7.1765526117.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2025-12-17 15:08:18 +01:00
Uwe Kleine-König
30eb99dfd3
gpio: stub: Drop empty probe function
...
A probe callback that just returns 0 does the same as not having a probe
callback at all. So gpio_stub_drv_probe() can be dropped without side
effects.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://lore.kernel.org/r/20251210070255.484169-2-u.kleine-koenig@baylibre.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com >
2025-12-17 10:15:07 +01:00
Uwe Kleine-König
726c93b040
kunit: Drop unused parameter from kunit_device_register_internal
...
The passed driver isn't used, so just drop this parameter.
Link: https://lore.kernel.org/r/20251210065839.482608-2-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Reviewed-by: David Gow <davidgow@google.com >
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org >
2025-12-15 09:27:19 -07:00
Uwe Kleine-König
81acbdc51b
ASoC: sdw-mockup: Drop dummy remove function
...
A remove callback is optional and having no such function has the same
semantic as one returning zero (and other return values are effectively
ignored).
This allows to remove the remove function without replacement.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20251212073555.1065284-2-u.kleine-koenig@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2025-12-14 19:37:36 +09:00
Uwe Kleine-König
a7b7afcc54
ALSA: seq: Refuse to probe seq drivers with non-bus probe or remove
...
Now that all in-tree seq drivers are converted to bus methods, let
old-style drivers fails to probe until driver methods are removed.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Link: https://patch.msgid.link/10adbd12b75984f6fd45e281438d475735cf5fdb.1765283601.git.u.kleine-koenig@baylibre.com
2025-12-14 11:08:10 +01:00
Uwe Kleine-König
4b8da6d089
ALSA: seq: oss: Convert to snd_seq bus probe mechanism
...
The snd_seq bus got a dedicated probe function. Make use of that. This
fixes a runtime warning about the driver needing to be converted to the
bus probe method.
Note that the remove callback returns void now. The actual return value
was ignored before (see device_remove() in drivers/base/dd.c), so there
is no problem introduced by converting `return -EINVAL` to `return`.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Link: https://patch.msgid.link/affb5a7107e9d678ce85dc7f0b87445928cd6b94.1765283601.git.u.kleine-koenig@baylibre.com
2025-12-14 11:08:09 +01:00
Uwe Kleine-König
94afb5b7a1
ALSA: emu10k1: Convert to snd_seq bus probe mechanism
...
The snd_seq bus got a dedicated probe function. Make use of that. This
fixes a runtime warning about the driver needing to be converted to the
bus probe method.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Link: https://patch.msgid.link/31d351fc844348eac0955db8db78c19a0c23d888.1765283601.git.u.kleine-koenig@baylibre.com
2025-12-14 11:08:09 +01:00
Uwe Kleine-König
4983d2f55f
ALSA: sb: Convert to snd_seq bus probe mechanism
...
The snd_seq bus got a dedicated probe function. Make use of that. This
fixes a runtime warning about the driver needing to be converted to the
bus probe method.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Link: https://patch.msgid.link/ccaf10073a6e8a68ea751bfc0e8aae1c66b57458.1765283601.git.u.kleine-koenig@baylibre.com
2025-12-14 11:08:09 +01:00
Uwe Kleine-König
505b57e52c
ALSA: opl4: Convert to snd_seq bus probe mechanism
...
The snd_seq bus got a dedicated probe function. Make use of that. This
fixes a runtime warning about the driver needing to be converted to the
bus probe method.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Link: https://patch.msgid.link/15cd19c9c8ec32e92b956eec112e515335bc22cf.1765283601.git.u.kleine-koenig@baylibre.com
2025-12-14 11:08:09 +01:00
Uwe Kleine-König
376cdcd3ff
ALSA: opl3: Convert to snd_seq bus probe mechanism
...
The snd_seq bus got a dedicated probe function. Make use of that. This
fixes a runtime warning about the driver needing to be converted to the
bus probe method.
Note that the remove callback returns void now. The actual return value
was ignored before (see device_remove() in drivers/base/dd.c), so there
is no problem introduced by converting `return -EINVAL` to `return`.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Link: https://patch.msgid.link/fb5e44d995cf93b8feae22c4558598859712bc07.1765283601.git.u.kleine-koenig@baylibre.com
2025-12-14 11:08:09 +01:00
Uwe Kleine-König
d1c83a79e3
ALSA: seq: ump: Convert to snd_seq bus probe mechanism
...
The snd_seq bus got a dedicated probe function. Make use of that. This
fixes a runtime warning about the driver needing to be converted to the
bus probe method.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Link: https://patch.msgid.link/054f1a0536228ccfe5f539ce854804f789f2ee64.1765283601.git.u.kleine-koenig@baylibre.com
2025-12-14 11:08:09 +01:00
Uwe Kleine-König
2e514916e9
ALSA: seq: midi: Convert to snd_seq bus probe mechanism
...
The snd_seq bus got a dedicated probe function. Make use of that. This
fixes a runtime warning about the driver needing to be converted to the
bus probe method.
Note that the remove callback returns void now. The actual return value
was ignored before (see device_remove() in drivers/base/dd.c), so there
is no problem introduced by converting `return -ENODEV` to `return`.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Link: https://patch.msgid.link/054ae56db6b55eea60c8aa8f9633e8d3d180cb09.1765283601.git.u.kleine-koenig@baylibre.com
2025-12-14 11:08:09 +01:00
Uwe Kleine-König
a89f7f0818
ALSA: seq: Use bus specific probe and remove
...
Introduce a bus specific probe and remove function. For now this only
allows to get rid of a cast of the generic device to an snd_seq device
in the drivers and changes the remove prototype to return void---a
non-zero return value is ignored anyhow.
The objective is to get rid of users of struct device callbacks
.probe(), .remove() and .shutdown() to eventually remove these. Until
all snd_seq drivers are converted this results in a runtime warning
about the drivers needing an update because there is a bus probe
function and a driver probe function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Link: https://patch.msgid.link/f36b01b297fc5cbb6d0ed4959143add0c13eec99.1765283601.git.u.kleine-koenig@baylibre.com
2025-12-14 11:08:09 +01:00
Uwe Kleine-König
c8dff80a31
bus: fsl-mc: Convert to bus callbacks
...
With the eventual goal to drop .probe(), .remove() and .shutdown() from
struct device_driver, convert the fsl bus to use bus methods.
Other than a driver's shutdown callback the bus shutdown callback is
also called for unbound drivers. So check for the device being bound
before following the pointer to its driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Tested-by: Ioana Ciornei <ioana.ciornei@nxp.com >
Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com >
Link: https://lore.kernel.org/r/848fffe5c479d899c04a4c99ccb5f0128ccc942d.1764684327.git.u.kleine-koenig@baylibre.com
Link: https://lore.kernel.org/r/20251209115950.3382308-2-u.kleine-koenig@baylibre.com
[chleroy: squashed the two patches]
Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org >
2025-12-14 10:22:19 +01:00
Uwe Kleine-König
f4aff53c90
bus: fsl-mc: Drop error message in probe function
...
The driver core already emits an error message when probe fails, see
call_driver_probe() in drivers/base/dd.c. So drop the duplicated error
message.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Tested-by: Ioana Ciornei <ioana.ciornei@nxp.com >
Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com >
Link: https://lore.kernel.org/r/52c89497f78839446713a9c5456defce97a74c7d.1764684327.git.u.kleine-koenig@baylibre.com
Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org >
2025-12-14 10:22:19 +01:00
Uwe Kleine-König
cda323dbda
pwm: bcm2835: Make sure the channel is enabled after pwm_request()
...
The .free callback cleared among others the enable bit PWENx in the
control register. When the PWM is requested later again this bit isn't
restored but the core assumes the PWM is enabled and thus skips a
request to configure the same state as before.
To fix that don't touch the hardware configuration in .free(). For
symmetry also drop .request() and configure the mode completely in
.apply().
Fixes: e5a06dc5ac ("pwm: Add BCM2835 PWM driver")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com >
Link: https://patch.msgid.link/20251118174303.1761577-2-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org >
2025-11-19 11:41:00 +01:00
Uwe Kleine-König
0a47e5e864
pwm: mediatek: Make use of struct_size macro
...
struct_size provides the size of a struct with a flexible array member.
Use that instead of open-coding it (with less checks than the global
macro).
Reported-by: kernel test robot <lkp@intel.com >
Reported-by: Julia Lawall <julia.lawall@inria.fr >
Closes: https://lore.kernel.org/r/202510301753.iqGmTwae-lkp@intel.com/
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20251030222528.632836-2-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org >
2025-11-14 11:56:14 +01:00
Uwe Kleine-König
24ec5632a1
pwm: mediatek: Convert to waveform API
...
Implement the new waveform callbacks which makes the usage of this
hardware more flexible and allows to use it via the pwm character
device.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20251013114258.149260-2-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org >
2025-11-14 11:56:14 +01:00
Uwe Kleine-König
0559730b85
pwm: Drop unused function pwm_apply_args()
...
The function pwm_apply_args() was introduced with the concept of atomic
PWM configuration and needed for drivers not using this concept yet. Now
all drivers are converted accordingly and so no callers are left which
allows to remove this function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20250922094327.1143944-2-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org >
2025-11-14 11:56:14 +01:00
Uwe Kleine-König
5f7ff902e7
pwm: Use %u to printf unsigned int pwm_chip::npwm and pwm_chip::id
...
%u is the right conversion specifier to emit an unsigned int value.
Fixes: 62099abf67 ("pwm: Add debugfs interface")
Fixes: 0360a48733 ("pwm: Mention PWM chip ID in /sys/kernel/debug/pwm")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20251006133525.2457171-2-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org >
2025-11-14 11:56:14 +01:00
Uwe Kleine-König
3cf8e55894
pwm: Simplify printf to emit chip->npwm in $debugfs/pwm
...
Instead of caring to correctly pluralize "PWM device(s)" using
(chip->npwm != 1) ? "s" : ""
or
str_plural(chip->npwm)
just simplify the format to not need a plural-s.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20250926165702.321514-2-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org >
2025-11-14 11:56:13 +01:00
Uwe Kleine-König
a69a54f8df
rust: pwm: Drop wrapping of PWM polarity and state
...
These were introduced and used in an earlier revision of the patch that
became commit fb3957af9ec6 ("pwm: Add Rust driver for T-HEAD TH1520
SoC"). The variant that was actually applied sticks to the modern
waveform abstraction only (and other drivers are supposed to do that,
too), so they can be dropped.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20251025122359.361372-2-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org >
2025-11-07 10:22:43 +01:00
Uwe Kleine-König
ce11164460
pwm: pca9586: Convert to waveform API
...
This allows to expose the duty_offset feature that the chip supports, and
so also emit inverted polarity waveforms. The conversion from a waveform to
hardware settings (and vice versa) is aligned to the usual rounding rules
silencing warnings with PWM_DEBUG.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://lore.kernel.org/r/1927d115ae6797858e6c4537971dacf1d563854f.1753784092.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org >
2025-09-15 11:39:46 +02:00
Uwe Kleine-König
42f18ae36f
pwm: pca9685: Drop GPIO support
...
The functionality will be restored after the driver is converted to the
waveform API as the pwm core optionally provides a gpio chip for all
pwm chips that support the waveform API.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://lore.kernel.org/r/d975376fce9640c90ddc868e3722adeb83fff279.1753784092.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org >
2025-09-15 11:39:46 +02:00
Uwe Kleine-König
3d4c421723
pwm: pca9685: Make use of register caching in regmap
...
This essentially only caches the PRESCALE register because the per channel
registers are affected by the ALL configuration that is used by the virtual
pwm #16 . The PRESCALE register is read often so caching it saves quite some
i2c transfers.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://lore.kernel.org/r/dc25361908ad1dd790f108599bc9dbcc752288a5.1753784092.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org >
2025-09-15 11:39:46 +02:00
Uwe Kleine-König
de58556132
pwm: pca9685: Use bulk write to atomicially update registers
...
The output of a PWM channel is configured by four register values. Write
them in a single i2c transaction to ensure glitch free updates.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://lore.kernel.org/r/bfa8c0267c9ec059d0d77f146998d564654c75ca.1753784092.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org >
2025-09-15 11:39:46 +02:00
Uwe Kleine-König
ca478d8a4b
pwm: pca9685: Don't disable hardware in .free()
...
It's the responsibility of the consumer to disable the hardware before
it's released. And there are use cases where it's beneficial to keep the
PWM on, e.g. to keep a backlight on before kexec()ing into a new kernel.
Even if it would be considered right to disable on pwm_put(), this
should be done in the core and not each individual driver. So drop the
hardware access in .free().
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://lore.kernel.org/r/1ee1a514aeb5f0effafa2d6ec91bc54130895cd9.1753784092.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org >
2025-09-15 11:39:46 +02:00