-
Notifications
You must be signed in to change notification settings - Fork 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
Tidy up of the ft5406 driver to use DT #2189
Conversation
7b93d49
to
5732e8a
Compare
if (of_property_read_u32(np, "touchscreen-inverted-y", &val) >= 0) | ||
ts->vflip = val; | ||
|
||
if (of_property_read_u32(np, "touchscreen-swapped-x-y", &val) >= 0) { |
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 missed one.
5732e8a
to
4a67afd
Compare
touchscreen-size-x = <800>; | ||
touchscreen-size-y = <600>; | ||
touchscreen-inverted-x = <0>; | ||
touchscreen-inverted-y = <0>; |
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.
git show is highlighting stray whitespace at the end of this line.
__set_bit(EV_KEY, ts->input_dev->evbit); | ||
__set_bit(EV_SYN, ts->input_dev->evbit); | ||
__set_bit(EV_ABS, ts->input_dev->evbit); | ||
|
||
input_set_abs_params(ts->input_dev, ABS_MT_POSITION_X, 0, | ||
SCREEN_WIDTH, 0, 0); | ||
ts->xyswap ? ts->max_y : ts->max_x, 0, 0); |
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.
The indentation on this and the next statement doesn't match the Linux style, which would use 3 TABs and 5 spaces.
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.
GitHub could do a better job with whitespace...
4a67afd
to
6024a53
Compare
c4aadf2
to
542d1c3
Compare
3353d4d
to
871ca96
Compare
cb6def4
to
0386d88
Compare
7f47540
to
f4b3ddd
Compare
f4b3ddd
to
ecbbac9
Compare
I've 'kernelified' this driver to coding standards (apart from a couple of warnings). I think this can be merged without the matching firmware change since any flips previously done automatically by the firmware side can now be achieved by using the device tree settings. |
Looks good to me. |
fec87ed
to
b76f96e
Compare
Now updated to top of tree and can now be merged, if reviews OK. |
Sorry James - I've just spotted that you need to document the parameters in the README. And your commit message has a few typos. Otherwise it still looks good. |
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.
One very minor nitpick, otherwise looks fine.
The driver ought to be updated to comply with the kernel coding style though (Mainly no C99 // commenting, and multi-line comments)
&touchbuf, sizeof(touchbuf)); | ||
dev_warn(dev, | ||
"set failed, trying get" | ||
" (err:%d touchbuf:%x virt:%p bus:%x)\n", |
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.
Checkpatch should have complained at that - strings presented to the user shouldn't be broken even if it does take the line over 80 chars.
59341bd
to
de48202
Compare
84cc9a9
to
2a25d75
Compare
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap features via device tree overlays. Adds overrides so the VC4 can adjust the DT parameters appropriately; there is a newer version of the VC4 side driver that can now set up the appropriate DT values if required. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Driver was using a fixed resolution, this commit
adds coordinate size, flip and swap features
via device tree.
Adds overrides so the VC4 can adjust the DT parameters
appropriately, there is a newer version of the VC4 side
driver that can now set up the appropriate DT values
if requried.