Skip to content

Tidy up of the ft5406 driver to use DT - #2189

Merged
pelwell merged 4 commits into
raspberrypi:rpi-4.13.yfrom
JamesH65:ft5604_tidy
Nov 16, 2017
Merged

pelwell merged 4 commits into
raspberrypi:rpi-4.13.yfrom
JamesH65:ft5604_tidy

Conversation

@JamesH65

@JamesH65 JamesH65 commented Sep 4, 2017

Copy link
Copy Markdown
Contributor

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.

Comment thread drivers/input/touchscreen/rpi-ft5406.c Outdated
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
Copy Markdown
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
Copy Markdown
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.

Comment thread drivers/input/touchscreen/rpi-ft5406.c Outdated

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
Copy Markdown
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.

@pelwell pelwell left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

pelwell commented Oct 25, 2017

Copy link
Copy Markdown
Contributor

Looks good to me.

@JamesH65

JamesH65 commented Nov 2, 2017

Copy link
Copy Markdown
Contributor Author

@popcornmix @pelwell @6by9

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

@pelwell

pelwell commented Nov 2, 2017

Copy link
Copy Markdown
Contributor

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.

@6by9 6by9 left a comment

Copy link
Copy Markdown
Contributor

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)

Comment thread drivers/input/touchscreen/rpi-ft5406.c Outdated
&touchbuf, sizeof(touchbuf));
dev_warn(dev,
"set failed, trying get"
" (err:%d touchbuf:%x virt:%p bus:%x)\n",

Copy link
Copy Markdown
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
popcornmix force-pushed the rpi-4.13.y branch 2 times, most recently from 59341bd to de48202 Compare November 10, 2017 14:14
popcornmix pushed a commit that referenced this pull request Dec 29, 2017
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 Dec 31, 2017
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 2, 2018
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 8, 2018
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 8, 2018
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 10, 2018
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 15, 2018
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 17, 2018
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, 2018
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 25, 2018
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 29, 2018
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 31, 2018
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 to TiejunChina/linux that referenced this pull request Feb 2, 2018
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 5, 2018
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 5, 2018
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 5, 2018
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 9, 2018
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, 2018
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 13, 2018
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 to TiejunChina/linux that referenced this pull request Feb 14, 2018
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 19, 2018
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 20, 2018
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 23, 2018
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 26, 2018
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 26, 2018
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 5, 2018
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 8, 2018
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 13, 2018
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 14, 2018
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 16, 2018
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