Skip to content

Commit 312fc21

Browse files
pinchartllag-linaro
authored andcommitted
dt-bindings: mfd: Add Analog Devices ADP5585
The ADP5585 is a 10/11 input/output port expander with a built in keypad matrix decoder, programmable logic, reset generator, and PWM generator. These bindings model the device as an MFD, and support the GPIO expander and PWM functions. These bindings support the GPIO and PWM functions. Drop the existing adi,adp5585 and adi,adp5585-02 compatible strings from trivial-devices.yaml. They have been added there by mistake as the driver that was submitted at the same time used different compatible strings. We can take them over safely. Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 8400291 commit 312fc21

File tree

3 files changed

+99
-4
lines changed

3 files changed

+99
-4
lines changed
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/mfd/adi,adp5585.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Analog Devices ADP5585 Keypad Decoder and I/O Expansion
8+
9+
maintainers:
10+
- Laurent Pinchart <[email protected]>
11+
12+
description:
13+
The ADP5585 is a 10/11 input/output port expander with a built in keypad
14+
matrix decoder, programmable logic, reset generator, and PWM generator.
15+
16+
properties:
17+
compatible:
18+
items:
19+
- enum:
20+
- adi,adp5585-00 # Default
21+
- adi,adp5585-01 # 11 GPIOs
22+
- adi,adp5585-02 # No pull-up resistors by default on special pins
23+
- adi,adp5585-03 # Alternate I2C address
24+
- adi,adp5585-04 # Pull-down resistors on all pins by default
25+
- const: adi,adp5585
26+
27+
reg:
28+
maxItems: 1
29+
30+
interrupts:
31+
maxItems: 1
32+
33+
vdd-supply: true
34+
35+
gpio-controller: true
36+
37+
'#gpio-cells':
38+
const: 2
39+
40+
gpio-reserved-ranges: true
41+
42+
"#pwm-cells":
43+
const: 3
44+
45+
required:
46+
- compatible
47+
- reg
48+
- gpio-controller
49+
- "#gpio-cells"
50+
- "#pwm-cells"
51+
52+
allOf:
53+
- if:
54+
properties:
55+
compatible:
56+
contains:
57+
const: adi,adp5585-01
58+
then:
59+
properties:
60+
gpio-reserved-ranges: false
61+
else:
62+
properties:
63+
gpio-reserved-ranges:
64+
maxItems: 1
65+
items:
66+
items:
67+
- const: 5
68+
- const: 1
69+
70+
additionalProperties: false
71+
72+
examples:
73+
- |
74+
i2c {
75+
#address-cells = <1>;
76+
#size-cells = <0>;
77+
78+
io-expander@34 {
79+
compatible = "adi,adp5585-00", "adi,adp5585";
80+
reg = <0x34>;
81+
82+
vdd-supply = <&reg_3v3>;
83+
84+
gpio-controller;
85+
#gpio-cells = <2>;
86+
gpio-reserved-ranges = <5 1>;
87+
88+
#pwm-cells = <3>;
89+
};
90+
};
91+
92+
...

Documentation/devicetree/bindings/trivial-devices.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ properties:
3838
- ad,adm9240
3939
# AD5110 - Nonvolatile Digital Potentiometer
4040
- adi,ad5110
41-
# Analog Devices ADP5585 Keypad Decoder and I/O Expansion
42-
- adi,adp5585
43-
# Analog Devices ADP5585 Keypad Decoder and I/O Expansion with support for Row5
44-
- adi,adp5585-02
4541
# Analog Devices ADP5589 Keypad Decoder and I/O Expansion
4642
- adi,adp5589
4743
# Analog Devices LT7182S Dual Channel 6A, 20V PolyPhase Step-Down Silent Switcher

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,13 @@ F: drivers/leds/leds-adp5520.c
537537
F: drivers/mfd/adp5520.c
538538
F: drivers/video/backlight/adp5520_bl.c
539539

540+
ADP5585 GPIO EXPANDER, PWM AND KEYPAD CONTROLLER DRIVER
541+
M: Laurent Pinchart <[email protected]>
542+
543+
544+
S: Maintained
545+
F: Documentation/devicetree/bindings/*/adi,adp5585*.yaml
546+
540547
ADP5588 QWERTY KEYPAD AND IO EXPANDER DRIVER (ADP5588/ADP5587)
541548
M: Michael Hennerich <[email protected]>
542549
S: Supported

0 commit comments

Comments
 (0)