-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Driver sitronix CF1133 controller touchscreen #68321
Conversation
Hello @clemdy, and thank you very much for your first pull request to the Zephyr project! |
4a17f25
to
36b66aa
Compare
Seems your email is not setup in git properly, try:
|
Yes my author name in the commit was bad i've corrected 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.
Hi, initial round of comment, mostly styling things, thanks!
drivers/input/input_cf1133.c
Outdated
|
||
gpio_init_callback(&(data->int_gpio_cb), cf1133_isr_handler, BIT(config->int_gpio.pin)); | ||
|
||
r = gpio_add_callback(config->int_gpio.port, &(data->int_gpio_cb)); |
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.
r = gpio_add_callback(config->int_gpio.port, &(data->int_gpio_cb)); | |
r = gpio_add_callback(config->int_gpio.port, &data->int_gpio_cb); |
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 done
drivers/input/Kconfig.cf1133
Outdated
|
||
if INPUT_CF1133 | ||
|
||
config INPUT_CF1133_PERIOD |
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.
config INPUT_CF1133_PERIOD | |
config INPUT_CF1133_PERIOD_MS |
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 done
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.
Thanks, few more comments, also could you add this to https://github.com/zephyrproject-rtos/zephyr/blob/main/tests/drivers/build_all/input/app.overlay#L185 so it gets built in CI?
By the way, thank you very much Fabio for you advices and patience ;-) |
e703433
to
46470c7
Compare
Hey, you bet! Keep an eye out for compliance errors, since this is your first PR for the project we have to approve the run manually for every push but you can also run it locally using |
Hey i think i have it, my tab size was 4 in my code editor instead of 8 by default for Gitlab that's why i have those issues. ^^ |
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.
Cool, one more round of comments, mostly styling related.
@danieldegrasse can you do another review pass? |
@clemdy sorry this needs a rebase now, could you rebase and force push again please? You'll probably have to tweak the address in the i2c tests as well. Thanks for your patience. |
@clemdy sorry we don't take merge commits, just rebase it so there's a single commit on top of the current main. |
de33716
to
acc443f
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.
Only found some stylistic inconsistencies. Good stuff 👍
drivers/input/input_cf1133.c
Outdated
return 0; | ||
} | ||
|
||
static int cf1133_get_protocol_type(struct cf1133_data *data, const struct cf1133_config *config) |
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 its a preference thing, but there are some methods that take the deconstructed data and config and some take the entire device.
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.
@clemdy I would recommend just passing dev
to all internal functions and then get data and config internally, there's no performance penalties (the compiler optimizes all the pointer arithmetic out I think), you save a tiny bit of stack (only on pointer to pass) and you don't have to update the function signature if you need more stuff. I see at a bit like a self
of Zephyr drivers.
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.
Updating the Kconfig help field is important IMO as it can lead to a non trivial build error
87978a9
to
9d71a4d
Compare
@clemdy there's a build error, plus I think one unaddressed stylistic comment (that I very much agree with). Thanks for your patience! |
The driver allows to use CF1133 controller touchscreen (I2C) Signed-off-by: Clement Dysli <clementdy@kickmaker.net>
Sorry @fabiobaltieri didn't want to re request your review i was aiming for @bjarki-trackunit (my page didn't refresh fast 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.
Looks good :)
Hi @clemdy! To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge. Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁 |
Add a new out of tree driver that support sitronix CF1133 controller touchscreen (I2C). Can be multitouch if needed.
Clément Dysli / clementdy@kickmaker.net
Fixes #68306