-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drivers: gpio: max22190: Add MAX22190 octal input with diagnostics #71141
base: main
Are you sure you want to change the base?
Conversation
5ac5f2c
to
823f4da
Compare
823f4da
to
82aeb3f
Compare
d903a24
to
1aa75d3
Compare
type: phandle-array | ||
max22190-mode: | ||
type: int | ||
default: 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default value requires justification in description (same for other properties)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, I add clarification for all. Could you take a look if it is enough ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for the mode you should just remove the default value, it needs to be specified in the board DT, it is hardwired signals on the board after all, needs to be described
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I specified default value because this was mode set on the devkit it self, but it make sens to have it in DT.
1aa75d3
to
f589043
Compare
type: phandle-array | ||
max22190-mode: | ||
type: int | ||
default: 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for the mode you should just remove the default value, it needs to be specified in the board DT, it is hardwired signals on the board after all, needs to be described
description: | | ||
Wire break functionality is enabled by default on all channels. | ||
WBE bit in all Filter registers stand for wire break enable on each | ||
channel, so to enable WB functionality set 1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should clarify that this default value is not the default value of the hardware
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is better all filter-wbes , filter-fbps and filter-delays to have for default values from datasheet.
This mean:
- wire break - 0 disable
- fbps - 1 bypass
- delays - 50
Value which was set is the one which is in use in case WBE is 1. In that case delays is 20000.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, but now the description seems wrong, it still says set 1? is it intentional, it seems unclear at best
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe my language here is not quiet clear. I want to state that by default every channel is with disabled Wire Break functionality - WBEx bit = 0.
To enable specific channel Wire Break functionality WBEx bit = 1.
Example for channel first 4 channels enabled WB and last 4 disabled WB
[ 1, 1, 1, 1, 0, 0, 0, 0]
If you have some suggestions how to make it clearer please share it.
type: array | ||
default: [1, 1, 1, 1, 1, 1, 1, 1] | ||
description: | | ||
By default all channels are set to bypass mode from documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
word this more like "The default value corresponds to the default value of the hardware"
type: array | ||
default: [20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000] | ||
description: | | ||
Default value in documentation is 20ms which corespond to 200000us. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similar comment as above
f589043
to
b154371
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add to drivers/build_all/gpio/app.overlay
b154371
to
b5cbd91
Compare
21d8d38
to
36b0edc
Compare
36b0edc
to
d27c10b
Compare
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
ca56cbb
to
95c8873
Compare
95c8873
to
7bb5258
Compare
7bb5258
to
5a5e7b5
Compare
5a5e7b5
to
fdcc0f6
Compare
Thanks @MaureenHelm ,typos are fixed and branch is rebased on latest main |
27326ae
to
58a384e
Compare
Add max22190 gpio driver with input functionality, since device support only input without output. Implemented diagnostic funcionality for all 8 channels which include various check to over/under voltage and wire break. Filtering configuration is done from devicetree on per channel bases and is configured on chip start. In case of some fault condition occure FAULT pin drive LOW which prop to FAULT registers to be read. Data is stored in data structure for furter analizes and ERR message is prited in console. Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
58a384e
to
7791270
Compare
Add max22190 gpio driver with input functionality, since device support only input with output.
Implemented diagnostic funcionality for all 8 channels which include various check to over/under voltage and wire break. Filtering configuration is done from devicetree on per channel bases and is configured on chip start.
In case of some fault condition occure FAULT pin drive LOW which prop to FAULT registers to be read. Data is stored in data structure for furter analizes and ERR message is prited in console.