public inbox for linux-spi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/13] fsi: Convert to bus probe mechanism
@ 2025-12-09 11:39 Uwe Kleine-König
  2025-12-09 11:40 ` [PATCH v2 05/13] spi: fsi: Drop assigning fsi bus Uwe Kleine-König
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2025-12-09 11:39 UTC (permalink / raw)
  To: Eddie James
  Cc: Ninad Palsule, linux-fsi, linux-kernel, Andi Shyti, linux-i2c,
	openbmc, Mark Brown, linux-spi

Hello,

this is the 2nd installment of the series converting the fsi bus to use
bus methods for .probe and .remove. The changes since the first
iteration---that can be found at
https://lore.kernel.org/lkml/cover.1764434226.git.ukleinek@kernel.org/
--- are:

 - (trivially) rebase to v6.18
 - add tags by Andi (for the i2c parts) and Mark Brown (for the spi
   parts)
 - Add a patch converting drivers/fsi/i2cr-scom.c (#8)

In the earlier thread I thought I made a mistake for (implicit) v1, but
I confused fsi with fsl and the problem doesn't apply here as it doesn't
touch the shutdown callback.

This series is not urgent, but it would be great to get this into
v6.19-rc1.  With Mark's Acks and Andi's tags (though they are not an
Ack) this should be fine to be picked up in one go by Eddie.

As before there are two commit refs that should refer to the commit for
patch #2 ("fsi: Assign driver's bus in fsi_driver_register()"). As I
cannot know the commit hash yet, I wrote "FIXME" and these need updating
when the series is picked up.

Thanks
Uwe

Uwe Kleine-König (13):
  fsi: Make use of module_fsi_driver()
  fsi: Assign driver's bus in fsi_driver_register()
  fsi: Provide thin wrappers around dev_[gs]et_data() for fsi devices
  i2c: fsi: Drop assigning fsi bus
  spi: fsi: Drop assigning fsi bus
  fsi: Make fsi_bus_type a private variable to the core
  fsi: Create bus specific probe and remove functions
  fsi: i2cr-scom: Convert to fsi bus probe mechanism
  fsi: master: Convert to fsi bus probe mechanism
  fsi: sbefifo: Convert to fsi bus probe mechanism
  fsi: scom: Convert to fsi bus probe mechanism
  i2c: fsi: Convert to fsi bus probe mechanism
  spi: fsi: Convert to fsi bus probe mechanism

 drivers/fsi/fsi-core.c       | 107 ++++++++++++++++++++++++++---------
 drivers/fsi/fsi-master-hub.c |  17 +++---
 drivers/fsi/fsi-sbefifo.c    |  31 +++-------
 drivers/fsi/fsi-scom.c       |  30 +++-------
 drivers/fsi/i2cr-scom.c      |  15 ++---
 drivers/i2c/busses/i2c-fsi.c |  16 +++---
 drivers/spi/spi-fsi.c        |   7 +--
 include/linux/fsi.h          |  13 ++++-
 8 files changed, 131 insertions(+), 105 deletions(-)


base-commit: 7d0a66e4bb9081d75c82ec4957c50034cb0ea449
-- 
2.47.3


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 05/13] spi: fsi: Drop assigning fsi bus
  2025-12-09 11:39 [PATCH v2 00/13] fsi: Convert to bus probe mechanism Uwe Kleine-König
@ 2025-12-09 11:40 ` Uwe Kleine-König
  2026-01-27 15:26   ` Eddie James
  2025-12-09 11:40 ` [PATCH v2 13/13] spi: fsi: Convert to fsi bus probe mechanism Uwe Kleine-König
  2026-01-12  9:47 ` [PATCH v2 00/13] fsi: Convert to " Uwe Kleine-König
  2 siblings, 1 reply; 7+ messages in thread
From: Uwe Kleine-König @ 2025-12-09 11:40 UTC (permalink / raw)
  To: Eddie James; +Cc: Ninad Palsule, linux-fsi, Mark Brown, linux-spi, linux-kernel

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>
---
 drivers/spi/spi-fsi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/spi/spi-fsi.c b/drivers/spi/spi-fsi.c
index e01c63d23b64..f9c15b99dba5 100644
--- a/drivers/spi/spi-fsi.c
+++ b/drivers/spi/spi-fsi.c
@@ -595,7 +595,6 @@ static struct fsi_driver fsi_spi_driver = {
 	.id_table = fsi_spi_ids,
 	.drv = {
 		.name = "spi-fsi",
-		.bus = &fsi_bus_type,
 		.probe = fsi_spi_probe,
 	},
 };
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 13/13] spi: fsi: Convert to fsi bus probe mechanism
  2025-12-09 11:39 [PATCH v2 00/13] fsi: Convert to bus probe mechanism Uwe Kleine-König
  2025-12-09 11:40 ` [PATCH v2 05/13] spi: fsi: Drop assigning fsi bus Uwe Kleine-König
@ 2025-12-09 11:40 ` Uwe Kleine-König
  2026-01-27 15:29   ` Eddie James
  2026-01-12  9:47 ` [PATCH v2 00/13] fsi: Convert to " Uwe Kleine-König
  2 siblings, 1 reply; 7+ messages in thread
From: Uwe Kleine-König @ 2025-12-09 11:40 UTC (permalink / raw)
  To: Eddie James; +Cc: Ninad Palsule, linux-fsi, Mark Brown, linux-spi, linux-kernel

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>
---
 drivers/spi/spi-fsi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi-fsi.c b/drivers/spi/spi-fsi.c
index f9c15b99dba5..07dc3d24f2c9 100644
--- a/drivers/spi/spi-fsi.c
+++ b/drivers/spi/spi-fsi.c
@@ -528,13 +528,13 @@ static size_t fsi_spi_max_transfer_size(struct spi_device *spi)
 	return SPI_FSI_MAX_RX_SIZE;
 }
 
-static int fsi_spi_probe(struct device *dev)
+static int fsi_spi_probe(struct fsi_device *fsi)
 {
 	int rc;
 	struct device_node *np;
 	int num_controllers_registered = 0;
 	struct fsi2spi *bridge;
-	struct fsi_device *fsi = to_fsi_dev(dev);
+	struct device *dev = &fsi->dev;
 
 	rc = fsi_spi_check_mux(fsi, dev);
 	if (rc)
@@ -593,9 +593,9 @@ MODULE_DEVICE_TABLE(fsi, fsi_spi_ids);
 
 static struct fsi_driver fsi_spi_driver = {
 	.id_table = fsi_spi_ids,
+	.probe = fsi_spi_probe,
 	.drv = {
 		.name = "spi-fsi",
-		.probe = fsi_spi_probe,
 	},
 };
 module_fsi_driver(fsi_spi_driver);
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 00/13] fsi: Convert to bus probe mechanism
  2025-12-09 11:39 [PATCH v2 00/13] fsi: Convert to bus probe mechanism Uwe Kleine-König
  2025-12-09 11:40 ` [PATCH v2 05/13] spi: fsi: Drop assigning fsi bus Uwe Kleine-König
  2025-12-09 11:40 ` [PATCH v2 13/13] spi: fsi: Convert to fsi bus probe mechanism Uwe Kleine-König
@ 2026-01-12  9:47 ` Uwe Kleine-König
  2026-01-27 15:31   ` Eddie James
  2 siblings, 1 reply; 7+ messages in thread
From: Uwe Kleine-König @ 2026-01-12  9:47 UTC (permalink / raw)
  To: Eddie James
  Cc: Ninad Palsule, linux-fsi, linux-kernel, Andi Shyti, linux-i2c,
	openbmc, Mark Brown, linux-spi, Greg Kroah-Hartman

[-- Attachment #1: Type: text/plain, Size: 1473 bytes --]

Hello Eddie,

On Tue, Dec 09, 2025 at 12:39:28PM +0100, Uwe Kleine-König wrote:
> Hello,
> 
> this is the 2nd installment of the series converting the fsi bus to use
> bus methods for .probe and .remove. The changes since the first
> iteration---that can be found at
> https://lore.kernel.org/lkml/cover.1764434226.git.ukleinek@kernel.org/
> --- are:
> 
>  - (trivially) rebase to v6.18
>  - add tags by Andi (for the i2c parts) and Mark Brown (for the spi
>    parts)
>  - Add a patch converting drivers/fsi/i2cr-scom.c (#8)
> 
> In the earlier thread I thought I made a mistake for (implicit) v1, but
> I confused fsi with fsl and the problem doesn't apply here as it doesn't
> touch the shutdown callback.
> 
> This series is not urgent, but it would be great to get this into
> v6.19-rc1.  With Mark's Acks and Andi's tags (though they are not an
> Ack) this should be fine to be picked up in one go by Eddie.
> 
> As before there are two commit refs that should refer to the commit for
> patch #2 ("fsi: Assign driver's bus in fsi_driver_register()"). As I
> cannot know the commit hash yet, I wrote "FIXME" and these need updating
> when the series is picked up.

gentle ping. While my quest to drop .probe() and .remove() is still in
early stages, I'd like to see this series go in before it bitrots. It
should have all the acks necessary to merge it.

Alternatively, should I ask Greg (added to Cc:) to merge?

Best regards
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 05/13] spi: fsi: Drop assigning fsi bus
  2025-12-09 11:40 ` [PATCH v2 05/13] spi: fsi: Drop assigning fsi bus Uwe Kleine-König
@ 2026-01-27 15:26   ` Eddie James
  0 siblings, 0 replies; 7+ messages in thread
From: Eddie James @ 2026-01-27 15:26 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Ninad Palsule, linux-fsi, Mark Brown, linux-spi, linux-kernel


On 12/9/25 5:40 AM, Uwe Kleine-König wrote:
> 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.


Acked-by: Eddie James <eajames@linux.ibm.com>


>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> Acked-by: Mark Brown <broonie@kernel.org>
> ---
>   drivers/spi/spi-fsi.c | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/drivers/spi/spi-fsi.c b/drivers/spi/spi-fsi.c
> index e01c63d23b64..f9c15b99dba5 100644
> --- a/drivers/spi/spi-fsi.c
> +++ b/drivers/spi/spi-fsi.c
> @@ -595,7 +595,6 @@ static struct fsi_driver fsi_spi_driver = {
>   	.id_table = fsi_spi_ids,
>   	.drv = {
>   		.name = "spi-fsi",
> -		.bus = &fsi_bus_type,
>   		.probe = fsi_spi_probe,
>   	},
>   };

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 13/13] spi: fsi: Convert to fsi bus probe mechanism
  2025-12-09 11:40 ` [PATCH v2 13/13] spi: fsi: Convert to fsi bus probe mechanism Uwe Kleine-König
@ 2026-01-27 15:29   ` Eddie James
  0 siblings, 0 replies; 7+ messages in thread
From: Eddie James @ 2026-01-27 15:29 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Ninad Palsule, linux-fsi, Mark Brown, linux-spi, linux-kernel


On 12/9/25 5:40 AM, Uwe Kleine-König wrote:
> 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.


Acked-by: Eddie James <eajames@linux.ibm.com>


>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> Acked-by: Mark Brown <broonie@kernel.org>
> ---
>   drivers/spi/spi-fsi.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/spi/spi-fsi.c b/drivers/spi/spi-fsi.c
> index f9c15b99dba5..07dc3d24f2c9 100644
> --- a/drivers/spi/spi-fsi.c
> +++ b/drivers/spi/spi-fsi.c
> @@ -528,13 +528,13 @@ static size_t fsi_spi_max_transfer_size(struct spi_device *spi)
>   	return SPI_FSI_MAX_RX_SIZE;
>   }
>   
> -static int fsi_spi_probe(struct device *dev)
> +static int fsi_spi_probe(struct fsi_device *fsi)
>   {
>   	int rc;
>   	struct device_node *np;
>   	int num_controllers_registered = 0;
>   	struct fsi2spi *bridge;
> -	struct fsi_device *fsi = to_fsi_dev(dev);
> +	struct device *dev = &fsi->dev;
>   
>   	rc = fsi_spi_check_mux(fsi, dev);
>   	if (rc)
> @@ -593,9 +593,9 @@ MODULE_DEVICE_TABLE(fsi, fsi_spi_ids);
>   
>   static struct fsi_driver fsi_spi_driver = {
>   	.id_table = fsi_spi_ids,
> +	.probe = fsi_spi_probe,
>   	.drv = {
>   		.name = "spi-fsi",
> -		.probe = fsi_spi_probe,
>   	},
>   };
>   module_fsi_driver(fsi_spi_driver);

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 00/13] fsi: Convert to bus probe mechanism
  2026-01-12  9:47 ` [PATCH v2 00/13] fsi: Convert to " Uwe Kleine-König
@ 2026-01-27 15:31   ` Eddie James
  0 siblings, 0 replies; 7+ messages in thread
From: Eddie James @ 2026-01-27 15:31 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Uwe Kleine-König
  Cc: Ninad Palsule, linux-fsi, linux-kernel, Andi Shyti, linux-i2c,
	openbmc, Mark Brown, linux-spi


On 1/12/26 3:47 AM, Uwe Kleine-König wrote:
> Hello Eddie,
>
> On Tue, Dec 09, 2025 at 12:39:28PM +0100, Uwe Kleine-König wrote:
>> Hello,
>>
>> this is the 2nd installment of the series converting the fsi bus to use
>> bus methods for .probe and .remove. The changes since the first
>> iteration---that can be found at
>> https://lore.kernel.org/lkml/cover.1764434226.git.ukleinek@kernel.org/
>> --- are:
>>
>>   - (trivially) rebase to v6.18
>>   - add tags by Andi (for the i2c parts) and Mark Brown (for the spi
>>     parts)
>>   - Add a patch converting drivers/fsi/i2cr-scom.c (#8)
>>
>> In the earlier thread I thought I made a mistake for (implicit) v1, but
>> I confused fsi with fsl and the problem doesn't apply here as it doesn't
>> touch the shutdown callback.
>>
>> This series is not urgent, but it would be great to get this into
>> v6.19-rc1.  With Mark's Acks and Andi's tags (though they are not an
>> Ack) this should be fine to be picked up in one go by Eddie.
>>
>> As before there are two commit refs that should refer to the commit for
>> patch #2 ("fsi: Assign driver's bus in fsi_driver_register()"). As I
>> cannot know the commit hash yet, I wrote "FIXME" and these need updating
>> when the series is picked up.
> gentle ping. While my quest to drop .probe() and .remove() is still in
> early stages, I'd like to see this series go in before it bitrots. It
> should have all the acks necessary to merge it.


So sorry for the delay. Thank you very much for the series! Greg, please 
merge at your earliest convenience.


Thanks!

Eddie


>
> Alternatively, should I ask Greg (added to Cc:) to merge?
>
> Best regards
> Uwe

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-01-27 15:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-09 11:39 [PATCH v2 00/13] fsi: Convert to bus probe mechanism Uwe Kleine-König
2025-12-09 11:40 ` [PATCH v2 05/13] spi: fsi: Drop assigning fsi bus Uwe Kleine-König
2026-01-27 15:26   ` Eddie James
2025-12-09 11:40 ` [PATCH v2 13/13] spi: fsi: Convert to fsi bus probe mechanism Uwe Kleine-König
2026-01-27 15:29   ` Eddie James
2026-01-12  9:47 ` [PATCH v2 00/13] fsi: Convert to " Uwe Kleine-König
2026-01-27 15:31   ` Eddie James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox