Skip to content

Commit afc5fdd

Browse files
committed
Merge tag 'extcon-next-for-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next
Chanwoo writes: Update extcon next for v6.5 Detailed description for this pull request: 1. Clean-up extcon core without any behavior changes - Add extcon_alloc_cables/muex/groups to improve the readability of extcon_dev_register. - Fix kernel doc of property and property capability fields to aovid warnings and add missing description of struct extcon_dev. - Use DECLARE_BITMAP macro and sysfs_emit instead of sprintf - Use device_match_of_node helper instead of accessing the .of_node - Use ida_alloc/free to get the unique id for extcon device 2. Update extcon-usbc-tusb320.c to support usb_role_switch and accessory detection - Add usb_role_switch support on extcon-usbsc-tusb320. - Add additional accessory detection for audio/debug accessory and then pass the deteced accessory information to typec subsystem on extcon-usbsc-tusb320.c. - Add the support of unregistration of typec port on both error handling and driver removal step on 3. Update extcon provider drivers (apx288/qcom-spmi-misc/palmas) - Replace put_device with acpi_dev_put on extcon-axp288.c - Use platform_get_irq_byname_optional for getting irq of usb_id and usb_vbus on extcon-qcom-spmi-misc.c. - Remove unused of_gpio.h on extcon-palmas.c. 4. Fix the devicetree binding document - Rename misc node name to 'usb-dect@900' on pm8941-misc.yam - Fix usb-id and usb_vbus defintion on pm8941-misc.yaml - Drop unneeded quotes from extcon-arizona.c devicetree documentation * tag 'extcon-next-for-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon: (26 commits) dt-bindings: extcon: wlf,arizona: drop unneeded quotes extcon: Switch i2c drivers back to use .probe() extcon: Drop unneeded assignments extcon: Use sizeof(*pointer) instead of sizeof(type) extcon: Use unique number for the extcon device ID extcon: Remove dup device name in the message and unneeded error check extcon: Use dev_of_node(dev) instead of dev->of_node extcon: Use device_match_of_node() helper extcon: Amend kernel documentation of struct extcon_dev extcon: Use sysfs_emit() to instead of sprintf() extcon: Use DECLARE_BITMAP() to declare bit arrays extcon: Fix kernel doc of property capability fields to avoid warnings extcon: Fix kernel doc of property fields to avoid warnings extcon: usbc-tusb320: add USB_ROLE_SWITCH dependency extcon: usbc-tusb320: add usb_role_switch support extcon: usbc-tusb320: add accessory detection support extcon: Add extcon_alloc_groups to simplify extcon register function extcon: Add extcon_alloc_muex to simplify extcon register function extcon: Add extcon_alloc_cables to simplify extcon register function extcon: Remove redundant null checking for class ...
2 parents 74a81c4 + 94da3da commit afc5fdd

13 files changed

Lines changed: 366 additions & 209 deletions

File tree

Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,14 @@ properties:
2727

2828
interrupt-names:
2929
minItems: 1
30-
items:
31-
- const: usb_id
32-
- const: usb_vbus
33-
30+
anyOf:
31+
- items:
32+
- const: usb_id
33+
- const: usb_vbus
34+
- items:
35+
- const: usb_id
36+
- items:
37+
- const: usb_vbus
3438
required:
3539
- compatible
3640
- reg
@@ -49,7 +53,7 @@ examples:
4953
interrupt-controller;
5054
#interrupt-cells = <4>;
5155
52-
usb_id: misc@900 {
56+
usb_id: usb-detect@900 {
5357
compatible = "qcom,pm8941-misc";
5458
reg = <0x900>;
5559
interrupts = <0x0 0x9 0 IRQ_TYPE_EDGE_BOTH>;

Documentation/devicetree/bindings/extcon/wlf,arizona.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ properties:
2323
headphone detect mode to HPDETL, ARIZONA_ACCDET_MODE_HPR/2 sets it
2424
to HPDETR. If this node is not included or if the value is unknown,
2525
then headphone detection mode is set to HPDETL.
26-
$ref: "/schemas/types.yaml#/definitions/uint32"
26+
$ref: /schemas/types.yaml#/definitions/uint32
2727
minimum: 1
2828
maximum: 2
2929

@@ -51,7 +51,7 @@ properties:
5151
description:
5252
Additional software microphone detection debounce specified in
5353
milliseconds.
54-
$ref: "/schemas/types.yaml#/definitions/uint32"
54+
$ref: /schemas/types.yaml#/definitions/uint32
5555

5656
wlf,micd-pol-gpio:
5757
description:
@@ -63,23 +63,23 @@ properties:
6363
description:
6464
Time allowed for MICBIAS to startup prior to performing microphone
6565
detection, specified as per the ARIZONA_MICD_TIME_XXX defines.
66-
$ref: "/schemas/types.yaml#/definitions/uint32"
66+
$ref: /schemas/types.yaml#/definitions/uint32
6767
minimum: 0
6868
maximum: 12
6969

7070
wlf,micd-rate:
7171
description:
7272
Delay between successive microphone detection measurements, specified
7373
as per the ARIZONA_MICD_TIME_XXX defines.
74-
$ref: "/schemas/types.yaml#/definitions/uint32"
74+
$ref: /schemas/types.yaml#/definitions/uint32
7575
minimum: 0
7676
maximum: 12
7777

7878
wlf,micd-dbtime:
7979
description:
8080
Microphone detection hardware debounces specified as the number of
8181
measurements to take.
82-
$ref: "/schemas/types.yaml#/definitions/uint32"
82+
$ref: /schemas/types.yaml#/definitions/uint32
8383
enum: [2, 4]
8484

8585
wlf,micd-timeout-ms:
@@ -97,7 +97,7 @@ properties:
9797
CTIA / OMTP headsets), the field can be of variable length but
9898
should always be a multiple of 3 cells long, each three cell group
9999
represents one polarity configuration.
100-
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
100+
$ref: /schemas/types.yaml#/definitions/uint32-matrix
101101
items:
102102
items:
103103
- description:
@@ -119,7 +119,7 @@ properties:
119119
description:
120120
Settings for the general purpose switch, set as one of the
121121
ARIZONA_GPSW_XXX defines.
122-
$ref: "/schemas/types.yaml#/definitions/uint32"
122+
$ref: /schemas/types.yaml#/definitions/uint32
123123
minimum: 0
124124
maximum: 3
125125

drivers/extcon/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ config EXTCON_USBC_TUSB320
185185
tristate "TI TUSB320 USB-C extcon support"
186186
depends on I2C && TYPEC
187187
select REGMAP_I2C
188+
depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH
188189
help
189190
Say Y here to enable support for USB Type C cable detection extcon
190191
support using a TUSB320.

drivers/extcon/extcon-axp288.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ static int axp288_extcon_probe(struct platform_device *pdev)
393393
adev = acpi_dev_get_first_match_dev("INT3496", NULL, -1);
394394
if (adev) {
395395
info->id_extcon = extcon_get_extcon_dev(acpi_dev_name(adev));
396-
put_device(&adev->dev);
396+
acpi_dev_put(adev);
397397
if (IS_ERR(info->id_extcon))
398398
return PTR_ERR(info->id_extcon);
399399

drivers/extcon/extcon-fsa9480.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ static struct i2c_driver fsa9480_i2c_driver = {
369369
.pm = &fsa9480_pm_ops,
370370
.of_match_table = fsa9480_of_match,
371371
},
372-
.probe_new = fsa9480_probe,
372+
.probe = fsa9480_probe,
373373
.id_table = fsa9480_id,
374374
};
375375

drivers/extcon/extcon-palmas.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include <linux/mfd/palmas.h>
1919
#include <linux/of.h>
2020
#include <linux/of_platform.h>
21-
#include <linux/of_gpio.h>
2221
#include <linux/gpio/consumer.h>
2322
#include <linux/workqueue.h>
2423

drivers/extcon/extcon-ptn5150.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ static struct i2c_driver ptn5150_i2c_driver = {
348348
.name = "ptn5150",
349349
.of_match_table = ptn5150_dt_match,
350350
},
351-
.probe_new = ptn5150_i2c_probe,
351+
.probe = ptn5150_i2c_probe,
352352
.id_table = ptn5150_i2c_id,
353353
};
354354
module_i2c_driver(ptn5150_i2c_driver);

drivers/extcon/extcon-qcom-spmi-misc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ static int qcom_usb_extcon_probe(struct platform_device *pdev)
123123
if (ret)
124124
return ret;
125125

126-
info->id_irq = platform_get_irq_byname(pdev, "usb_id");
126+
info->id_irq = platform_get_irq_byname_optional(pdev, "usb_id");
127127
if (info->id_irq > 0) {
128128
ret = devm_request_threaded_irq(dev, info->id_irq, NULL,
129129
qcom_usb_irq_handler,
@@ -136,7 +136,7 @@ static int qcom_usb_extcon_probe(struct platform_device *pdev)
136136
}
137137
}
138138

139-
info->vbus_irq = platform_get_irq_byname(pdev, "usb_vbus");
139+
info->vbus_irq = platform_get_irq_byname_optional(pdev, "usb_vbus");
140140
if (info->vbus_irq > 0) {
141141
ret = devm_request_threaded_irq(dev, info->vbus_irq, NULL,
142142
qcom_usb_irq_handler,

drivers/extcon/extcon-rt8973a.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ static struct i2c_driver rt8973a_muic_i2c_driver = {
695695
.pm = &rt8973a_muic_pm_ops,
696696
.of_match_table = rt8973a_dt_match,
697697
},
698-
.probe_new = rt8973a_muic_i2c_probe,
698+
.probe = rt8973a_muic_i2c_probe,
699699
.remove = rt8973a_muic_i2c_remove,
700700
.id_table = rt8973a_i2c_id,
701701
};

drivers/extcon/extcon-sm5502.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ static struct i2c_driver sm5502_muic_i2c_driver = {
840840
.pm = &sm5502_muic_pm_ops,
841841
.of_match_table = sm5502_dt_match,
842842
},
843-
.probe_new = sm5022_muic_i2c_probe,
843+
.probe = sm5022_muic_i2c_probe,
844844
.id_table = sm5502_i2c_id,
845845
};
846846

0 commit comments

Comments
 (0)