Skip to content

Commit 9441d6b

Browse files
committed
Merge tag 'extcon-next-for-6.18' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next
Chanwoo writes: Update extcon next for v6.18 Detailed description for this pull request: - Fix wakeup source leaks on device unbind for extcon drivers - Add new Maxim MAX14526 MUIC extcon driver and dt-binding document : The MAX14526 is designed to simplify interface requirements on portable devices by multiplexing common inputs (USB, UART, Microphone, Stereo Audio and Composite Video) on a single micro/mini USB connector. The USB input supports Hi-Speed USB and the audio/video inputs feature : This provides the following supported external connector detection - EXTCON_USB - EXTCON_USB_HOST - EXTCON_CHG_USB_FAST - EXTCON_DISP_MHL - Convert legacy DT binding to YAML of richktek,rt8973a-muic.yaml - Add missing DT binding information of that must include either id-gpios or vbus-gpios for linux,extcon-usb-gpio.yaml * tag 'extcon-next-for-6.18' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon: dt-bindings: extcon: linux,extcon-usb-gpio: GPIO must be provided dt-bindings: extcon: rt8973a: Convert DT bindings to YAML extcon: max14526: depends on I2C to prevent build warning/errors extcon: max14526: avoid defined but not used warning extcon: Add basic support for Maxim MAX14526 MUIC dt-bindings: extcon: Document Maxim MAX14526 MUIC extcon: adc-jack: Cleanup wakeup source only if it was enabled extcon: qcom-spmi-misc: Fix wakeup source leaks on device unbind extcon: fsa9480: Fix wakeup source leaks on device unbind extcon: axp288: Fix wakeup source leaks on device unbind extcon: adc-jack: Fix wakeup source leaks on device unbind
2 parents 4a58aac + 94d885e commit 9441d6b

File tree

11 files changed

+456
-26
lines changed

11 files changed

+456
-26
lines changed

Documentation/devicetree/bindings/extcon/extcon-rt8973a.txt

Lines changed: 0 additions & 23 deletions
This file was deleted.

Documentation/devicetree/bindings/extcon/linux,extcon-usb-gpio.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ properties:
2525
required:
2626
- compatible
2727

28+
anyOf:
29+
- required:
30+
- id-gpios
31+
- required:
32+
- vbus-gpios
33+
2834
additionalProperties: false
2935

3036
examples:
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/extcon/maxim,max14526.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Maxim MAX14526 MicroUSB Integrated Circuit (MUIC)
8+
9+
maintainers:
10+
- Svyatoslav Ryhel <[email protected]>
11+
12+
properties:
13+
compatible:
14+
const: maxim,max14526
15+
16+
reg:
17+
maxItems: 1
18+
19+
interrupts:
20+
maxItems: 1
21+
22+
connector:
23+
$ref: /schemas/connector/usb-connector.yaml#
24+
25+
port:
26+
$ref: /schemas/graph.yaml#/properties/port
27+
28+
required:
29+
- compatible
30+
- reg
31+
- interrupts
32+
- connector
33+
- port
34+
35+
unevaluatedProperties: false
36+
37+
examples:
38+
- |
39+
#include <dt-bindings/gpio/gpio.h>
40+
#include <dt-bindings/interrupt-controller/irq.h>
41+
42+
i2c {
43+
#address-cells = <1>;
44+
#size-cells = <0>;
45+
46+
muic@44 {
47+
compatible = "maxim,max14526";
48+
reg = <0x44>;
49+
50+
interrupt-parent = <&gpio>;
51+
interrupts = <72 IRQ_TYPE_EDGE_FALLING>;
52+
53+
connector {
54+
compatible = "usb-b-connector";
55+
label = "micro-USB";
56+
type = "micro";
57+
};
58+
59+
port {
60+
#address-cells = <1>;
61+
#size-cells = <0>;
62+
63+
muic_to_charger: endpoint@0 {
64+
reg = <0>;
65+
remote-endpoint = <&charger_input>;
66+
};
67+
68+
muic_to_usb: endpoint@1 {
69+
reg = <1>;
70+
remote-endpoint = <&usb_input>;
71+
};
72+
73+
muic_to_mhl: endpoint@2 {
74+
reg = <2>;
75+
remote-endpoint = <&mhl_input>;
76+
};
77+
};
78+
};
79+
};
80+
...
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/extcon/richtek,rt8973a-muic.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Richtek RT8973A MUIC
8+
9+
maintainers:
10+
- Chanwoo Choi <[email protected]>
11+
12+
description:
13+
The Richtek RT8973A is Micro USB Switch with OVP and I2C interface. The RT8973A
14+
is a USB port accessory detector and switch that is optimized to protect low
15+
voltage system from abnormal high input voltage (up to 28V) and supports high
16+
speed USB operation. Also, RT8973A support 'auto-configuration' mode.
17+
If auto-configuration mode is enabled, RT8973A would control internal h/w patch
18+
for USB D-/D+ switching.
19+
20+
properties:
21+
compatible:
22+
const: richtek,rt8973a-muic
23+
24+
reg:
25+
maxItems: 1
26+
27+
interrupts:
28+
maxItems: 1
29+
30+
required:
31+
- compatible
32+
- reg
33+
- interrupts
34+
35+
additionalProperties: false
36+
37+
examples:
38+
- |
39+
#include <dt-bindings/interrupt-controller/irq.h>
40+
i2c {
41+
#address-cells = <1>;
42+
#size-cells = <0>;
43+
usb-switch@14 {
44+
compatible = "richtek,rt8973a-muic";
45+
reg = <0x14>;
46+
interrupt-parent = <&gpio>;
47+
interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
48+
};
49+
};

drivers/extcon/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,19 @@ config EXTCON_MAX8997
134134
Maxim MAX8997 PMIC. The MAX8997 MUIC is a USB port accessory
135135
detector and switch.
136136

137+
config EXTCON_MAX14526
138+
tristate "Maxim MAX14526 EXTCON Support"
139+
depends on I2C
140+
select IRQ_DOMAIN
141+
select REGMAP_I2C
142+
help
143+
If you say yes here you get support for the Maxim MAX14526
144+
MUIC device. The MAX14526 MUIC is a USB port accessory
145+
detector and switch. The MAX14526 is designed to simplify
146+
interface requirements on portable devices by multiplexing
147+
common inputs (USB, UART, Microphone, Stereo Audio and
148+
Composite Video) on a single micro/mini USB connector.
149+
137150
config EXTCON_PALMAS
138151
tristate "Palmas USB EXTCON support"
139152
depends on MFD_PALMAS

drivers/extcon/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ obj-$(CONFIG_EXTCON_MAX3355) += extcon-max3355.o
1818
obj-$(CONFIG_EXTCON_MAX77693) += extcon-max77693.o
1919
obj-$(CONFIG_EXTCON_MAX77843) += extcon-max77843.o
2020
obj-$(CONFIG_EXTCON_MAX8997) += extcon-max8997.o
21+
obj-$(CONFIG_EXTCON_MAX14526) += extcon-max14526.o
2122
obj-$(CONFIG_EXTCON_PALMAS) += extcon-palmas.o
2223
obj-$(CONFIG_EXTCON_PTN5150) += extcon-ptn5150.o
2324
obj-$(CONFIG_EXTCON_QCOM_SPMI_MISC) += extcon-qcom-spmi-misc.o

drivers/extcon/extcon-adc-jack.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ static void adc_jack_remove(struct platform_device *pdev)
164164
{
165165
struct adc_jack_data *data = platform_get_drvdata(pdev);
166166

167+
if (data->wakeup_source)
168+
device_init_wakeup(&pdev->dev, false);
167169
free_irq(data->irq, data);
168170
cancel_work_sync(&data->handler.work);
169171
}

drivers/extcon/extcon-axp288.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ static int axp288_extcon_probe(struct platform_device *pdev)
470470
if (ret < 0)
471471
return ret;
472472

473-
device_init_wakeup(dev, true);
473+
devm_device_init_wakeup(dev);
474474
platform_set_drvdata(pdev, info);
475475

476476
return 0;

drivers/extcon/extcon-fsa9480.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ static int fsa9480_probe(struct i2c_client *client)
317317
return ret;
318318
}
319319

320-
device_init_wakeup(info->dev, true);
320+
devm_device_init_wakeup(info->dev);
321321
fsa9480_detect_dev(info);
322322

323323
return 0;

0 commit comments

Comments
 (0)