Staging/max77978 - #3424
Conversation
|
Hi. Changed the merge target to mirror_ci/jic23/iio/testing. There a lot of direct actionable auto-checker that needs to be addressed Some annotations shows in the File changed tab too; but is limited to the N-first warnings, are there are more. check the ci/cd output |
LLM reviewThis series adds the MAX77978 USB Type-C CC/PD controller driver under run: 28953806165
|
b75697e to
4e928e1
Compare
d4244f5 to
7b56c2d
Compare
831d618 to
a942294
Compare
5ee97a9 to
e7148e3
Compare
6c4206e to
177ff1f
Compare
c3dd66c to
84198ca
Compare
Signed-off-by: Park, Sean <Sean.Park@analog.com>
Signed-off-by: Park, Sean <Sean.Park@analog.com>
Signed-off-by: Park, Sean <Sean.Park@analog.com>
e7148e3 to
53976aa
Compare
gastmaier
left a comment
There was a problem hiding this comment.
Hi Sean, I broke down the single commit into three commits:
- sample defconfig
- dt-bindings
- driver
Only dt-bindings and driver commit are meaningful for upstream.
On submission, a series is composed of multiple commits, each adding a change "adds documentation", "adds dt-bindings", "adds driver"
For now, let's focus in the dt-bindings, once you are finished, let me know.
| max77978: usb-typec@25 { | ||
| compatible = "adi,max77978"; | ||
| reg = <0x25>; | ||
| irq-gpios = <&gpio 27 IRQ_TYPE_LEVEL_LOW>; |
There was a problem hiding this comment.
irq-gpio uses GPIO specifiers, not IRQ_*; BUT see my interrupt comment [1]
| interrupts: | ||
| maxItems: 1 |
There was a problem hiding this comment.
[1]
This is never used by the driver and seems to be duplication from irq-gpios, which is actually used at max77978-core.c#362 .
BUT the preferable approach is to use interrupts, with irq-gpios you are saying that your device must use a interrupt from a gpio, which is untrue.
The correct semantic is the user sets interrupt-parent pointing to who provides the interrupt, in this case a gpio controller:
max77978: usb-typec@25 {
// [ ... ]
interrupt-parent = <&gpio>;
interrupts = <0 0 IRQ_TYPE_LEVEL_LOW>;
interrupt-names = "intb";
};
example: https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/iio/adc/adi%2Cad4062.yaml#L28-L46
or any ti,tps6598x.yaml, nxp,ptn5110.yaml, maxim,max33359.yaml
Also, I named intb in the example, due to page 18 of
https://www.analog.com/media/en/technical-documentation/data-sheets/max77789.pdf
Active-Low, Open-Drain Interrupt Output. Connect a pullup resistor to the pullup power source.
which matches IRQ_TYPE_LEVEL_LOW
DO:
- Use
interruptsonly, noirq-gpiosat all.
|
|
||
| connector: | ||
| $ref: /schemas/connector/usb-connector.yaml# | ||
| unevaluatedProperties: false |
There was a problem hiding this comment.
| unevaluatedProperties: false | |
| connector: | |
| type: object | |
| $ref: /schemas/connector/usb-connector.yaml# | |
| unevaluatedProperties: false | |
nit: just to match other bindings
|
|
||
| wakeup-source: true | ||
|
|
||
| connector: |
There was a problem hiding this comment.
Can you also describe the capabilities (power-role, data-role, ...)?
see fcs,fusb302.yaml, nxp,ptn5110.yaml, analogix,anx7411.yaml, maxim,max33359.yaml
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
|
|
||
| max77978: usb-typec@25 { |
There was a problem hiding this comment.
Can you add a child example?
see maxim,max33359.yaml
connector {
compatible = "usb-c-connector";
label = "USB-C";
/ [...]
| description: | ||
| GPIO connected to the interrupt line of the MAX77978. | ||
|
|
||
| wakeup-source: true |
There was a problem hiding this comment.
Driver reads wakeup not wakeup-source please identify the appropriate and update the mismatch.
max77978-core.c#367
PR Description
necessary to understand them. List any dependencies required for this change.
any space), or simply check them after publishing the PR.
description and try to push all related PRs simultaneously.
PR Type
PR Checklist