-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
input: pat912x: add a bunch of settings #69636
Conversation
c2163cf
Add devicetree based settings for resolution, axis inversion and sleep mode enable. Keep the resolution setting in its own function so it can be called by the application again in runtime if needed. Signed-off-by: Fabio Baltieri <[email protected]>
BUILD_ASSERT(IN_RANGE(DT_INST_PROP(n, res_x_cpi), 0, RES_MAX), \ | ||
"invalid res-x-cpy"); \ | ||
BUILD_ASSERT(IN_RANGE(DT_INST_PROP(n, res_y_cpi), 0, RES_MAX), \ | ||
"invalid res-y-cpy"); \ |
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 would be nice if a generous soul introduced min/max setting in our binding language. @fabiobaltieri maybe :-) ?
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.
You know what this project really needs? Interns.
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.
... or DT maintainers 👀
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.
You know what this project really needs? Interns.
You mean like .. Summer of Code? :)
Second and last round for this interesting device, adds support for axis inversion, resolution settings at init and runtime and sleep mode.
Oddly enough, according to the datasheet some of these registers should be write protected and need another register to be unlocked, but my device does not seem to be bothered, not too sure why but I think it's fine to leave it as is for the moment and keep the code a bit simpler.
Add devicetree based settings for resolution, axis inversion and sleep mode enable. Keep the resolution setting in its own function so it can be called by the application again in runtime if needed.