-
Notifications
You must be signed in to change notification settings - Fork 8.3k
boards: shields: Add support for Adafruit AW9523 board #80112
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
Conversation
b0fe39e to
5f6de7a
Compare
ea2446a to
5066d2c
Compare
5bd20ee to
e282c3f
Compare
53a81fa to
375316d
Compare
kartben
left a comment
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.
Haven't reviewed the driver yet
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 appreciate you taking the time to document this "convenience shortcut" you took but I think you would actually need to define a proper connector + conventional aliases for Qwiic since otherwise this will be problematic for people trying to use this shield on board that has both types of connectors IMO
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 wholly revisited the description of the connector.
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.
Use webp format please. Bonus points if you can find a version with transparent background (not mandatory, but nice to have)
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 changed the format to webp. I think the photos on the developer's page have the least copyright issues to quote, but unfortunately there were no photos with a white background here. Therefore, I did not change this.
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.
| This shield can only be used with a board which provides a configuration for | |
| STEMMA QT/Qwiic or Grove. | |
| This shield can only be used with a board which provides a configuration for | |
| STEMMA QT/Qwiic. |
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.
Fixed it.
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.
What is this supposed to mean? Maybe a copy paste error?
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.
Yes, that is correct.
375316d to
ded48eb
Compare
|
@erwango can you take a look at the shield part of this? |
8d41b9f to
c528068
Compare
89152c8 to
c0d8a8c
Compare
176202d to
17be358
Compare
fabiobaltieri
left a comment
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.
good stuff, few more comments
drivers/gpio/gpio_aw9523b.c
Outdated
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 don't think you need to generate this, can you do
static __maybe_unused void gpio_aw9523b_int_handler(const struct device *gpio_dev,
struct gpio_callback *cb,
uint32_t pins)
{
struct gpio_aw9523b_data *data = CONTAINER_OF(
cb, struct gpio_aw9523b_data, gpio_callback);
k_work_submit(&data->intr_worker);
}instead? (copied it from input_paw32xx.c)
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 worried about whether __maybe_unused can be used. It is standardized in C23, not C99.
If I can use it, it is better to use it.
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.
It's pretty widely used in the code base, I wouldn't worry about that, just use it.
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 got it. I applied your suggestion.
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.
ok I see you added it on other callbacks but would you not use it to replace gpio_aw9523b_int_cb##inst with a common one as well? that was my main suggestion, this does not have to be generated, nothing wrong with it but it seems like unnecessary extra complexity
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.
Ah, I misunderstood what you said.
This is better. I've addressed it.
17be358 to
fbb5d99
Compare
ddf6b2c to
c20cd23
Compare
Add a definition of a STEMMA QT connector to which I2C
devices can be connected.
Since STEMMA-QT does not specify uses other than I2C,
this is just a formal definition.
(It may be helpful when using this connector as a GPIO,
which is not defined in STEMMA-QT)
Maybe in usual need to define i2c alias such like as,
```
stemma_qt_i2c: &i2c0 { }
```
Signed-off-by: TOKITA Hiroshi <[email protected]>
Co-authored-by: Benjamin Cabé <[email protected]>
Add support for GPIO controller feature of AW9523B. Signed-off-by: TOKITA Hiroshi <[email protected]> Co-authored-by: Benjamin Cabé <[email protected]>
Add support for Adafruit AW9523 GPIO Expander/LED Controller Co-authored-by: Benjamin Cabé <[email protected]> Signed-off-by: TOKITA Hiroshi <[email protected]>
Add test configuration for Awinic AW9523B. This device is a GPIO Expander, and no boards currently implement it. Define the connection that connects it via the Arduino header and define a fixture to enable it. This has been confirmed with nucleo_h503rb. Signed-off-by: TOKITA Hiroshi <[email protected]>
Add test configuration for Awinic AW9523B. This device is a GPIO Expander, and no boards currently implement it. Define the connection that connects it via the Arduino header and define a fixture to enable it. This has been confirmed with nucleo_h503rb. Signed-off-by: TOKITA Hiroshi <[email protected]>
Add test configuration for "awinic,aw9523b". Signed-off-by: TOKITA Hiroshi <[email protected]>
c20cd23 to
a27d303
Compare
Add support for Adafruit AW9523 GPIO Expander/LED Controller
I have checked this PR with nulceo_h503rb using the equivalent board as a circuit (https://www.waveshare.com/wiki/AW9523B_IO_Expansion_Board) to Adafruit AW9523.