* [PATCH v4 0/2 RESEND] Fix pm8941-misc extcon interrupt dependency assumptions
@ 2022-09-08 11:25 Bryan O'Donoghue
2022-09-08 11:25 ` [PATCH v4 1/2 RESEND] dt-bindings: pm8941-misc: Fix usb_id and usb_vbus definitions Bryan O'Donoghue
2022-09-08 11:25 ` [PATCH v4 2/2 RESEND] extcon: qcom-spmi: Switch to platform_get_irq_byname_optional Bryan O'Donoghue
0 siblings, 2 replies; 8+ messages in thread
From: Bryan O'Donoghue @ 2022-09-08 11:25 UTC (permalink / raw)
To: agross, andersson, konrad.dybcio, myungjoo.ham, cw00.choi,
robh+dt, krzysztof.kozlowski+dt, gurus, marijn.suijten,
linux-arm-msm, devicetree
Cc: bryan.odonoghue
V4:
- Added suggested extra log text from Marjin to extcon patch
V3:
- Adds a cover-letter since we are now doing two patches a dt-bindings fix and
platform_get_irq_byname_optional fix.
- Add Review-by -> Rob Herring, Marijn Suijten
- Add additional patch to negate warning when one of usb_id or usb_vbus
is not declared in the platform DTS.
Bryan O'Donoghue (2):
dt-bindings: pm8941-misc: Fix usb_id and usb_vbus definitions
extcon: qcom-spmi: Switch to platform_get_irq_byname_optional
.../devicetree/bindings/extcon/qcom,pm8941-misc.yaml | 12 ++++++++----
drivers/extcon/extcon-qcom-spmi-misc.c | 4 ++--
2 files changed, 10 insertions(+), 6 deletions(-)
--
2.36.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v4 1/2 RESEND] dt-bindings: pm8941-misc: Fix usb_id and usb_vbus definitions
2022-09-08 11:25 [PATCH v4 0/2 RESEND] Fix pm8941-misc extcon interrupt dependency assumptions Bryan O'Donoghue
@ 2022-09-08 11:25 ` Bryan O'Donoghue
2022-09-08 11:25 ` [PATCH v4 2/2 RESEND] extcon: qcom-spmi: Switch to platform_get_irq_byname_optional Bryan O'Donoghue
1 sibling, 0 replies; 8+ messages in thread
From: Bryan O'Donoghue @ 2022-09-08 11:25 UTC (permalink / raw)
To: agross, andersson, konrad.dybcio, myungjoo.ham, cw00.choi,
robh+dt, krzysztof.kozlowski+dt, gurus, marijn.suijten,
linux-arm-msm, devicetree
Cc: bryan.odonoghue, Rob Herring
dts validation is throwing an error for me on 8916 and 8939 with
extcon@1300. In that case we have usb_vbus but not usb_id.
It wasn't immediately obvious if there was a valid use-case for the
existing code for usb_id in isolation, however discussing further, we
concluded that usb_id, usb_vbus or (usb_id | usb_vbus) are valid
combinations as an external IC may be responsible for usb_id or usb_vbus.
Expand the definition with anyOf to capture the three different valid
modes.
Fixes: 4fcdd677c4ea ("bindings: pm8941-misc: Add support for VBUS detection")
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
.../devicetree/bindings/extcon/qcom,pm8941-misc.yaml | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml b/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml
index 6a9c96f0352ac..1bc412a4ac5e6 100644
--- a/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml
+++ b/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml
@@ -27,10 +27,14 @@ properties:
interrupt-names:
minItems: 1
- items:
- - const: usb_id
- - const: usb_vbus
-
+ anyOf:
+ - items:
+ - const: usb_id
+ - const: usb_vbus
+ - items:
+ - const: usb_id
+ - items:
+ - const: usb_vbus
required:
- compatible
- reg
--
2.36.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH v4 2/2 RESEND] extcon: qcom-spmi: Switch to platform_get_irq_byname_optional
2022-09-08 11:25 [PATCH v4 0/2 RESEND] Fix pm8941-misc extcon interrupt dependency assumptions Bryan O'Donoghue
2022-09-08 11:25 ` [PATCH v4 1/2 RESEND] dt-bindings: pm8941-misc: Fix usb_id and usb_vbus definitions Bryan O'Donoghue
@ 2022-09-08 11:25 ` Bryan O'Donoghue
1 sibling, 0 replies; 8+ messages in thread
From: Bryan O'Donoghue @ 2022-09-08 11:25 UTC (permalink / raw)
To: agross, andersson, konrad.dybcio, myungjoo.ham, cw00.choi,
robh+dt, krzysztof.kozlowski+dt, gurus, marijn.suijten,
linux-arm-msm, devicetree
Cc: bryan.odonoghue
Valid configurations for the extcon interrupt declarations are
- usb_id
- usb_vbus
- (usb_id | usb_vbus)
In the case of a standalone usb_id or usb_vbus failure to find one of the
interrupts shouldn't generate a warning message. A warning is already in
place if both IRQs are missing.
Switch to using platform_get_irq_byname_optional() in order to facilitate
this behaviour.
Suggested-by: Marijn Suijten <marijn.suijten@somainline.org>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
drivers/extcon/extcon-qcom-spmi-misc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/extcon/extcon-qcom-spmi-misc.c b/drivers/extcon/extcon-qcom-spmi-misc.c
index eb02cb962b5e1..f72e90ceca53d 100644
--- a/drivers/extcon/extcon-qcom-spmi-misc.c
+++ b/drivers/extcon/extcon-qcom-spmi-misc.c
@@ -123,7 +123,7 @@ static int qcom_usb_extcon_probe(struct platform_device *pdev)
if (ret)
return ret;
- info->id_irq = platform_get_irq_byname(pdev, "usb_id");
+ info->id_irq = platform_get_irq_byname_optional(pdev, "usb_id");
if (info->id_irq > 0) {
ret = devm_request_threaded_irq(dev, info->id_irq, NULL,
qcom_usb_irq_handler,
@@ -136,7 +136,7 @@ static int qcom_usb_extcon_probe(struct platform_device *pdev)
}
}
- info->vbus_irq = platform_get_irq_byname(pdev, "usb_vbus");
+ info->vbus_irq = platform_get_irq_byname_optional(pdev, "usb_vbus");
if (info->vbus_irq > 0) {
ret = devm_request_threaded_irq(dev, info->vbus_irq, NULL,
qcom_usb_irq_handler,
--
2.36.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v4 0/2 RESEND] Fix pm8941-misc extcon interrupt dependency assumptions
@ 2022-09-26 11:31 Bryan O'Donoghue
2022-09-28 8:45 ` Marijn Suijten
2022-11-22 20:15 ` Luca Weiss
0 siblings, 2 replies; 8+ messages in thread
From: Bryan O'Donoghue @ 2022-09-26 11:31 UTC (permalink / raw)
To: myungjoo.ham, cw00.choi
Cc: agross, bjorn.andersson, konrad.dybcio, robh+dt,
krzysztof.kozlowski+dt, gurus, aghayal, linux-arm-msm, devicetree,
bryan.odonoghue
RESEND:
- I thought I resent these at the start of this month, can't find them
in linux-msm I think I just sent them to myself.
No change since July 17th
V4:
- Added suggested extra log text from Marjin to extcon patch
V3:
- Adds a cover-letter since we are now doing two patches a dt-bindings fix and
platform_get_irq_byname_optional fix.
- Add Review-by -> Rob Herring, Marijn Suijten
- Add additional patch to negate warning when one of usb_id or usb_vbus
is not declared in the platform DTS.
Bryan O'Donoghue (2):
dt-bindings: pm8941-misc: Fix usb_id and usb_vbus definitions
extcon: qcom-spmi: Switch to platform_get_irq_byname_optional
.../devicetree/bindings/extcon/qcom,pm8941-misc.yaml | 12 ++++++++----
drivers/extcon/extcon-qcom-spmi-misc.c | 4 ++--
2 files changed, 10 insertions(+), 6 deletions(-)
--
2.36.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v4 0/2 RESEND] Fix pm8941-misc extcon interrupt dependency assumptions
2022-09-26 11:31 [PATCH v4 0/2 RESEND] Fix pm8941-misc extcon interrupt dependency assumptions Bryan O'Donoghue
@ 2022-09-28 8:45 ` Marijn Suijten
2022-11-22 20:15 ` Luca Weiss
1 sibling, 0 replies; 8+ messages in thread
From: Marijn Suijten @ 2022-09-28 8:45 UTC (permalink / raw)
To: Bryan O'Donoghue
Cc: myungjoo.ham, cw00.choi, agross, bjorn.andersson, konrad.dybcio,
robh+dt, krzysztof.kozlowski+dt, gurus, aghayal, linux-arm-msm,
devicetree
(Whoops, I didn't get CC'd in the cover letter - downloaded it from the
lists)
On 2022-09-26 12:31:41, Bryan O'Donoghue wrote:
> RESEND:
> - I thought I resent these at the start of this month, can't find them
> in linux-msm I think I just sent them to myself.
It seems it made it to the lists successfully - there's a v4 RESEND from
the 8th: https://lore.kernel.org/linux-arm-msm/20220908112556.860343-1-bryan.odonoghue@linaro.org/
> No change since July 17th
>
> V4:
> - Added suggested extra log text from Marjin to extcon patch
MarIJn*, thanks :)
- Marijn
> V3:
> - Adds a cover-letter since we are now doing two patches a dt-bindings fix and
> platform_get_irq_byname_optional fix.
> - Add Review-by -> Rob Herring, Marijn Suijten
> - Add additional patch to negate warning when one of usb_id or usb_vbus
> is not declared in the platform DTS.
>
> Bryan O'Donoghue (2):
> dt-bindings: pm8941-misc: Fix usb_id and usb_vbus definitions
> extcon: qcom-spmi: Switch to platform_get_irq_byname_optional
>
> .../devicetree/bindings/extcon/qcom,pm8941-misc.yaml | 12 ++++++++----
> drivers/extcon/extcon-qcom-spmi-misc.c | 4 ++--
> 2 files changed, 10 insertions(+), 6 deletions(-)
>
> --
> 2.36.1
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v4 0/2 RESEND] Fix pm8941-misc extcon interrupt dependency assumptions
2022-09-26 11:31 [PATCH v4 0/2 RESEND] Fix pm8941-misc extcon interrupt dependency assumptions Bryan O'Donoghue
2022-09-28 8:45 ` Marijn Suijten
@ 2022-11-22 20:15 ` Luca Weiss
2022-11-24 0:38 ` Bryan O'Donoghue
1 sibling, 1 reply; 8+ messages in thread
From: Luca Weiss @ 2022-11-22 20:15 UTC (permalink / raw)
To: myungjoo.ham, cw00.choi, Bryan O'Donoghue
Cc: agross, andersson, konrad.dybcio, robh+dt, krzysztof.kozlowski+dt,
gurus, aghayal, linux-arm-msm, devicetree, bryan.odonoghue
On Montag, 26. September 2022 13:31:41 CET Bryan O'Donoghue wrote:
> RESEND:
> - I thought I resent these at the start of this month, can't find them
> in linux-msm I think I just sent them to myself.
>
> No change since July 17th
>
> V4:
> - Added suggested extra log text from Marjin to extcon patch
>
> V3:
> - Adds a cover-letter since we are now doing two patches a dt-bindings fix
> and platform_get_irq_byname_optional fix.
> - Add Review-by -> Rob Herring, Marijn Suijten
> - Add additional patch to negate warning when one of usb_id or usb_vbus
> is not declared in the platform DTS.
>
> Bryan O'Donoghue (2):
> dt-bindings: pm8941-misc: Fix usb_id and usb_vbus definitions
> extcon: qcom-spmi: Switch to platform_get_irq_byname_optional
>
> .../devicetree/bindings/extcon/qcom,pm8941-misc.yaml | 12 ++++++++----
> drivers/extcon/extcon-qcom-spmi-misc.c | 4 ++--
> 2 files changed, 10 insertions(+), 6 deletions(-)
Hi Chanwoo Cho and MyungJoo Ham,
could you please pick up these patches?
Regards
Luca
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v4 0/2 RESEND] Fix pm8941-misc extcon interrupt dependency assumptions
2022-11-22 20:15 ` Luca Weiss
@ 2022-11-24 0:38 ` Bryan O'Donoghue
0 siblings, 0 replies; 8+ messages in thread
From: Bryan O'Donoghue @ 2022-11-24 0:38 UTC (permalink / raw)
To: Luca Weiss, myungjoo.ham, cw00.choi
Cc: agross, andersson, konrad.dybcio, robh+dt, krzysztof.kozlowski+dt,
gurus, aghayal, linux-arm-msm, devicetree, Greg Kroah-Hartman
On 22/11/2022 20:15, Luca Weiss wrote:
> On Montag, 26. September 2022 13:31:41 CET Bryan O'Donoghue wrote:
>> RESEND:
>> - I thought I resent these at the start of this month, can't find them
>> in linux-msm I think I just sent them to myself.
>>
>> No change since July 17th
>>
>> V4:
>> - Added suggested extra log text from Marjin to extcon patch
>>
>> V3:
>> - Adds a cover-letter since we are now doing two patches a dt-bindings fix
>> and platform_get_irq_byname_optional fix.
>> - Add Review-by -> Rob Herring, Marijn Suijten
>> - Add additional patch to negate warning when one of usb_id or usb_vbus
>> is not declared in the platform DTS.
>>
>> Bryan O'Donoghue (2):
>> dt-bindings: pm8941-misc: Fix usb_id and usb_vbus definitions
>> extcon: qcom-spmi: Switch to platform_get_irq_byname_optional
>>
>> .../devicetree/bindings/extcon/qcom,pm8941-misc.yaml | 12 ++++++++----
>> drivers/extcon/extcon-qcom-spmi-misc.c | 4 ++--
>> 2 files changed, 10 insertions(+), 6 deletions(-)
>
> Hi Chanwoo Cho and MyungJoo Ham,
>
> could you please pick up these patches?
>
> Regards
> Luca
>
>
Thanks for bumping this Luca.
I was about to do just that.
Chanwoo - would appreciate merging this, its an annoying and very old
dts splat for us.
---
bod
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v4 0/2 RESEND] Fix pm8941-misc extcon interrupt dependency assumptions
@ 2022-12-28 13:30 Bryan O'Donoghue
0 siblings, 0 replies; 8+ messages in thread
From: Bryan O'Donoghue @ 2022-12-28 13:30 UTC (permalink / raw)
To: cw00.choi, myungjoo.ham, andersson, robh+dt,
krzysztof.kozlowski+dt, gregkh, agross
Cc: konrad.dybcio, linux-arm-msm, linux-kernel, devicetree,
bryan.odonoghue
RESEND December 2022:
Hey Chanwoo could you please pick this up ?
RESEND September 2022:
- I thought I resent these at the start of this month, can't find them
in linux-msm I think I just sent them to myself.
No change since July 17th
V4:
- Added suggested extra log text from Marjin to extcon patch
V3:
- Adds a cover-letter since we are now doing two patches a dt-bindings fix and
platform_get_irq_byname_optional fix.
- Add Review-by -> Rob Herring, Marijn Suijten
- Add additional patch to negate warning when one of usb_id or usb_vbus
is not declared in the platform DTS.
Bryan O'Donoghue (2):
dt-bindings: pm8941-misc: Fix usb_id and usb_vbus definitions
extcon: qcom-spmi: Switch to platform_get_irq_byname_optional
.../devicetree/bindings/extcon/qcom,pm8941-misc.yaml | 12 ++++++++----
drivers/extcon/extcon-qcom-spmi-misc.c | 4 ++--
2 files changed, 10 insertions(+), 6 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-12-28 13:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-08 11:25 [PATCH v4 0/2 RESEND] Fix pm8941-misc extcon interrupt dependency assumptions Bryan O'Donoghue
2022-09-08 11:25 ` [PATCH v4 1/2 RESEND] dt-bindings: pm8941-misc: Fix usb_id and usb_vbus definitions Bryan O'Donoghue
2022-09-08 11:25 ` [PATCH v4 2/2 RESEND] extcon: qcom-spmi: Switch to platform_get_irq_byname_optional Bryan O'Donoghue
-- strict thread matches above, loose matches on Subject: below --
2022-09-26 11:31 [PATCH v4 0/2 RESEND] Fix pm8941-misc extcon interrupt dependency assumptions Bryan O'Donoghue
2022-09-28 8:45 ` Marijn Suijten
2022-11-22 20:15 ` Luca Weiss
2022-11-24 0:38 ` Bryan O'Donoghue
2022-12-28 13:30 Bryan O'Donoghue
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).