Skip to content
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

Merged
merged 4 commits into from
Nov 16, 2017

Conversation

JamesH65
Copy link
Contributor

@JamesH65 JamesH65 commented Sep 4, 2017

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.

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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You missed one.

touchscreen-size-x = <800>;
touchscreen-size-y = <600>;
touchscreen-inverted-x = <0>;
touchscreen-inverted-y = <0>;
Copy link
Contributor

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);
Copy link
Contributor

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.

Copy link
Contributor

@pelwell pelwell left a 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...

@JamesH65
Copy link
Contributor Author

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.

@pelwell
Copy link
Contributor

pelwell commented Oct 25, 2017

Looks good to me.

@JamesH65
Copy link
Contributor Author

JamesH65 commented Nov 2, 2017

@popcornmix @pelwell @6by9

Now updated to top of tree and can now be merged, if reviews OK.

@pelwell
Copy link
Contributor

pelwell commented Nov 2, 2017

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.

Copy link
Contributor

@6by9 6by9 left a 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",
Copy link
Contributor

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.

popcornmix pushed a commit that referenced this pull request Jan 22, 2019
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>
popcornmix pushed a commit that referenced this pull request Jan 22, 2019
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>
popcornmix pushed a commit that referenced this pull request Jan 23, 2019
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>
popcornmix pushed a commit that referenced this pull request Jan 24, 2019
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>
popcornmix pushed a commit that referenced this pull request Feb 4, 2019
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>
popcornmix pushed a commit that referenced this pull request Feb 4, 2019
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>
popcornmix pushed a commit that referenced this pull request Feb 12, 2019
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>
popcornmix pushed a commit that referenced this pull request Feb 12, 2019
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>
popcornmix pushed a commit that referenced this pull request Feb 18, 2019
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>
popcornmix pushed a commit that referenced this pull request Feb 18, 2019
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>
popcornmix pushed a commit that referenced this pull request Feb 22, 2019
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>
popcornmix pushed a commit that referenced this pull request Feb 24, 2019
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>
popcornmix pushed a commit that referenced this pull request Mar 6, 2019
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>
popcornmix pushed a commit that referenced this pull request Mar 6, 2019
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>
popcornmix pushed a commit that referenced this pull request Mar 12, 2019
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>
popcornmix pushed a commit that referenced this pull request Mar 12, 2019
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>
popcornmix pushed a commit that referenced this pull request Mar 15, 2019
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>
popcornmix pushed a commit that referenced this pull request Mar 15, 2019
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>
popcornmix pushed a commit that referenced this pull request Mar 21, 2019
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>
popcornmix pushed a commit that referenced this pull request Apr 2, 2019
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>
popcornmix pushed a commit that referenced this pull request Apr 2, 2019
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>
popcornmix pushed a commit that referenced this pull request Apr 8, 2019
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>
Gadgetoid pushed a commit to Gadgetoid/linux that referenced this pull request Apr 10, 2019
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>
popcornmix pushed a commit that referenced this pull request Apr 23, 2019
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>
popcornmix pushed a commit that referenced this pull request Apr 30, 2019
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>
popcornmix pushed a commit that referenced this pull request Apr 30, 2019
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>
popcornmix pushed a commit that referenced this pull request May 7, 2019
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>
popcornmix pushed a commit that referenced this pull request May 13, 2019
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>
TiejunChina pushed a commit that referenced this pull request Jun 19, 2019
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>
TiejunChina pushed a commit that referenced this pull request Jul 23, 2019
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants