mbox series

[v4,0/2] Fix simple-bus issues with fw_devlink

Message ID 20210929000735.585237-1-saravanak@google.com (mailing list archive)
Headers show
Series Fix simple-bus issues with fw_devlink | expand

Message

Saravana Kannan Sept. 29, 2021, 12:07 a.m. UTC
Ulf reported an issue[1] with fw_devlink. This series tries to fix that
issue.

I replicated a similar set up on my end and I confirmed:
- A simple-bus only device is probed.
- Another device listing simple-bus as a 2nd compatible string isn't
  probed.

v1->v2:
- Switched to probing the simple-bus device instead of marking it as
  NEVER_PROBES.

v2->v3:
- Moved all the code into the simple-pm-bus driver
- Addressed Ulf's comment about the remove() code missing a check.

v3->v4:
- Added support for driver_override to accommodate the case where new
  transparent bus compatible strings are added to DT, but the kernel hasn't
  been updated yet.
- Added/updated comments to give more details.
- Adding Ulf's Tested-by that he have for v3 (v4 didn't change by much).

Thanks,
Saravana
[1] - https://lore.kernel.org/lkml/CAPDyKFo9Bxremkb1dDrr4OcXSpE0keVze94Cm=zrkOVxHHxBmQ@mail.gmail.com/

Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Rob Herring <robh+dt@kernel.org>

Saravana Kannan (2):
  drivers: bus: simple-pm-bus: Add support for probing simple bus only
    devices
  drivers: bus: Delete CONFIG_SIMPLE_PM_BUS

 arch/arm/configs/multi_v7_defconfig |  1 -
 arch/arm/configs/oxnas_v6_defconfig |  1 -
 arch/arm/configs/shmobile_defconfig |  1 -
 arch/arm/mach-omap2/Kconfig         |  1 -
 arch/arm64/configs/defconfig        |  1 -
 drivers/bus/Kconfig                 | 12 ---------
 drivers/bus/Makefile                |  2 +-
 drivers/bus/simple-pm-bus.c         | 42 ++++++++++++++++++++++++++---
 drivers/soc/canaan/Kconfig          |  1 -
 9 files changed, 40 insertions(+), 22 deletions(-)

Comments

Damien Le Moal Sept. 30, 2021, 2:50 a.m. UTC | #1
On 2021/09/29 9:07, Saravana Kannan wrote:
> Ulf reported an issue[1] with fw_devlink. This series tries to fix that
> issue.
> 
> I replicated a similar set up on my end and I confirmed:
> - A simple-bus only device is probed.
> - Another device listing simple-bus as a 2nd compatible string isn't
>   probed.
> 
> v1->v2:
> - Switched to probing the simple-bus device instead of marking it as
>   NEVER_PROBES.
> 
> v2->v3:
> - Moved all the code into the simple-pm-bus driver
> - Addressed Ulf's comment about the remove() code missing a check.
> 
> v3->v4:
> - Added support for driver_override to accommodate the case where new
>   transparent bus compatible strings are added to DT, but the kernel hasn't
>   been updated yet.
> - Added/updated comments to give more details.
> - Adding Ulf's Tested-by that he have for v3 (v4 didn't change by much).

For riscv Kendryte K210 boards:

Tested-by: Damien Le Moal <damien.lemoal@wdc.com>

> 
> Thanks,
> Saravana
> [1] - https://lore.kernel.org/lkml/CAPDyKFo9Bxremkb1dDrr4OcXSpE0keVze94Cm=zrkOVxHHxBmQ@mail.gmail.com/
> 
> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
> Cc: Rob Herring <robh+dt@kernel.org>
> 
> Saravana Kannan (2):
>   drivers: bus: simple-pm-bus: Add support for probing simple bus only
>     devices
>   drivers: bus: Delete CONFIG_SIMPLE_PM_BUS
> 
>  arch/arm/configs/multi_v7_defconfig |  1 -
>  arch/arm/configs/oxnas_v6_defconfig |  1 -
>  arch/arm/configs/shmobile_defconfig |  1 -
>  arch/arm/mach-omap2/Kconfig         |  1 -
>  arch/arm64/configs/defconfig        |  1 -
>  drivers/bus/Kconfig                 | 12 ---------
>  drivers/bus/Makefile                |  2 +-
>  drivers/bus/simple-pm-bus.c         | 42 ++++++++++++++++++++++++++---
>  drivers/soc/canaan/Kconfig          |  1 -
>  9 files changed, 40 insertions(+), 22 deletions(-)
>
Tony Lindgren Oct. 6, 2021, 5:29 a.m. UTC | #2
* Saravana Kannan <saravanak@google.com> [210929 03:08]:
> Ulf reported an issue[1] with fw_devlink. This series tries to fix that
> issue.
> 
> I replicated a similar set up on my end and I confirmed:
> - A simple-bus only device is probed.
> - Another device listing simple-bus as a 2nd compatible string isn't
>   probed.
> 
> v1->v2:
> - Switched to probing the simple-bus device instead of marking it as
>   NEVER_PROBES.
> 
> v2->v3:
> - Moved all the code into the simple-pm-bus driver
> - Addressed Ulf's comment about the remove() code missing a check.
> 
> v3->v4:
> - Added support for driver_override to accommodate the case where new
>   transparent bus compatible strings are added to DT, but the kernel hasn't
>   been updated yet.
> - Added/updated comments to give more details.
> - Adding Ulf's Tested-by that he have for v3 (v4 didn't change by much).

Works for me:

Tested-by: Tony Lindgren <tony@atomide.com>