mbox series

[v2,0/3] mmc: support setting card detect interrupt from drivers and use it in meson-gx

Message ID 15df9ef0-9b73-ca5a-d3cf-0585cd135bc5@gmail.com (mailing list archive)
Headers show
Series mmc: support setting card detect interrupt from drivers and use it in meson-gx | expand

Message

Heiner Kallweit Feb. 14, 2023, 9:39 p.m. UTC
On certain platforms like Amlogic Meson gpiod_to_irq() isn't supported
due to the design of gpio / interrupt controller. Therefore provide an
option for drivers to pass the card detect interrupt number
(retrieved e.g. from device tree) to mmc core.

v2:
- use another mechanism for passing and storing the cd interrupt
- add patch 2

Heiner Kallweit (3):
  mmc: core: support setting card detect interrupt from drivers
  dt-bindings: mmc: meson-gx: support specifying cd interrupt
  mmc: meson-gx: support platform interrupt as card detect interrupt

 .../bindings/mmc/amlogic,meson-gx-mmc.yaml      |  2 +-
 drivers/mmc/core/slot-gpio.c                    | 17 ++++++++++++++++-
 drivers/mmc/host/meson-gx-mmc.c                 |  5 ++++-
 include/linux/mmc/slot-gpio.h                   |  1 +
 4 files changed, 22 insertions(+), 3 deletions(-)

Comments

Ulf Hansson Feb. 15, 2023, 12:48 p.m. UTC | #1
On Tue, 14 Feb 2023 at 22:39, Heiner Kallweit <hkallweit1@gmail.com> wrote:
>
> On certain platforms like Amlogic Meson gpiod_to_irq() isn't supported
> due to the design of gpio / interrupt controller. Therefore provide an
> option for drivers to pass the card detect interrupt number
> (retrieved e.g. from device tree) to mmc core.
>
> v2:
> - use another mechanism for passing and storing the cd interrupt
> - add patch 2
>
> Heiner Kallweit (3):
>   mmc: core: support setting card detect interrupt from drivers
>   dt-bindings: mmc: meson-gx: support specifying cd interrupt
>   mmc: meson-gx: support platform interrupt as card detect interrupt
>
>  .../bindings/mmc/amlogic,meson-gx-mmc.yaml      |  2 +-
>  drivers/mmc/core/slot-gpio.c                    | 17 ++++++++++++++++-
>  drivers/mmc/host/meson-gx-mmc.c                 |  5 ++++-
>  include/linux/mmc/slot-gpio.h                   |  1 +
>  4 files changed, 22 insertions(+), 3 deletions(-)
>

Applied for next, thanks!

Kind regards
Uffe
Krzysztof Kozlowski Feb. 16, 2023, 9:18 a.m. UTC | #2
On 15/02/2023 13:48, Ulf Hansson wrote:
> On Tue, 14 Feb 2023 at 22:39, Heiner Kallweit <hkallweit1@gmail.com> wrote:
>>
>> On certain platforms like Amlogic Meson gpiod_to_irq() isn't supported
>> due to the design of gpio / interrupt controller. Therefore provide an
>> option for drivers to pass the card detect interrupt number
>> (retrieved e.g. from device tree) to mmc core.
>>
>> v2:
>> - use another mechanism for passing and storing the cd interrupt
>> - add patch 2
>>
>> Heiner Kallweit (3):
>>   mmc: core: support setting card detect interrupt from drivers
>>   dt-bindings: mmc: meson-gx: support specifying cd interrupt
>>   mmc: meson-gx: support platform interrupt as card detect interrupt
>>
>>  .../bindings/mmc/amlogic,meson-gx-mmc.yaml      |  2 +-
>>  drivers/mmc/core/slot-gpio.c                    | 17 ++++++++++++++++-
>>  drivers/mmc/host/meson-gx-mmc.c                 |  5 ++++-
>>  include/linux/mmc/slot-gpio.h                   |  1 +
>>  4 files changed, 22 insertions(+), 3 deletions(-)
>>
> 
> Applied for next, thanks!

A bit too fast. Binding is incorrect - suggests ABI break and makes
interrupts not described enough.

Best regards,
Krzysztof
Ulf Hansson Feb. 16, 2023, 11:14 a.m. UTC | #3
On Thu, 16 Feb 2023 at 10:18, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 15/02/2023 13:48, Ulf Hansson wrote:
> > On Tue, 14 Feb 2023 at 22:39, Heiner Kallweit <hkallweit1@gmail.com> wrote:
> >>
> >> On certain platforms like Amlogic Meson gpiod_to_irq() isn't supported
> >> due to the design of gpio / interrupt controller. Therefore provide an
> >> option for drivers to pass the card detect interrupt number
> >> (retrieved e.g. from device tree) to mmc core.
> >>
> >> v2:
> >> - use another mechanism for passing and storing the cd interrupt
> >> - add patch 2
> >>
> >> Heiner Kallweit (3):
> >>   mmc: core: support setting card detect interrupt from drivers
> >>   dt-bindings: mmc: meson-gx: support specifying cd interrupt
> >>   mmc: meson-gx: support platform interrupt as card detect interrupt
> >>
> >>  .../bindings/mmc/amlogic,meson-gx-mmc.yaml      |  2 +-
> >>  drivers/mmc/core/slot-gpio.c                    | 17 ++++++++++++++++-
> >>  drivers/mmc/host/meson-gx-mmc.c                 |  5 ++++-
> >>  include/linux/mmc/slot-gpio.h                   |  1 +
> >>  4 files changed, 22 insertions(+), 3 deletions(-)
> >>
> >
> > Applied for next, thanks!
>
> A bit too fast. Binding is incorrect - suggests ABI break and makes
> interrupts not described enough.

Sorry! Thanks for pointing this out. Heiner is fixing this with an
incremental patch on top, please help to review.

Kind regards
Uffe