Re: [PATCH 1/2] Input: Add driver for Cypress Generation 5 touchscreen

2017-06-07 Thread Maxime Ripard
On Tue, Jun 06, 2017 at 04:32:46PM +0200, Mylene Josserand wrote: > > > Notice that the DT parsing uses a sysinfo's variable (si->num_btns) > > > which is retrieved in the startup function (thanks to > > > get_sysinfo). So, currently, it is not possible to move the startup > > > function after the

Re: [PATCH 1/2] Input: Add driver for Cypress Generation 5 touchscreen

2017-06-06 Thread Mylene Josserand
Maxime, On 06/06/2017 14:04, Maxime Ripard wrote: On Tue, Jun 06, 2017 at 10:03:48AM +0200, Mylene Josserand wrote: +static int cyttsp5_hid_output_bl_launch_app(struct cyttsp5 *ts) +{ + int rc, t; + u8 cmd[HID_OUTPUT_BL_LAUNCH_APP]; + u16 crc; + + mutex_lock(&ts->system_

Re: [PATCH 1/2] Input: Add driver for Cypress Generation 5 touchscreen

2017-06-06 Thread Mylene Josserand
Hello Thomas, On 30/05/2017 10:43, Thomas Petazzoni wrote: Hello, A few more comments :) Thank you for the review! On Mon, 29 May 2017 16:45:37 +0200, Mylène Josserand wrote: +struct cyttsp5 { + struct device *dev; + struct mutex system_lock; + struct mutex btn_lock; +

Re: [PATCH 1/2] Input: Add driver for Cypress Generation 5 touchscreen

2017-06-06 Thread Maxime Ripard
On Tue, Jun 06, 2017 at 10:03:48AM +0200, Mylene Josserand wrote: > > > +static int cyttsp5_validate_cmd_response(struct cyttsp5 *ts, u8 code) > > > +{ > > > + u16 size, crc; > > > + u8 status, offset; > > > + int command_code; > > > + > > > + size = get_unaligned_le16(&ts->response_buf[0]); > > >

Re: [PATCH 1/2] Input: Add driver for Cypress Generation 5 touchscreen

2017-06-06 Thread Mylene Josserand
Hello Maxime, Thank you for the review! On 30/05/2017 10:02, Maxime Ripard wrote: Hi Mylene, On Mon, May 29, 2017 at 04:45:37PM +0200, Mylène Josserand wrote: +static int cyttsp5_read(struct cyttsp5 *ts, u8 *buf, u32 max) +{ + int rc; + u32 size; + + if (!buf) +

Re: [PATCH 1/2] Input: Add driver for Cypress Generation 5 touchscreen

2017-05-30 Thread Thomas Petazzoni
Hello, A few more comments :) On Mon, 29 May 2017 16:45:37 +0200, Mylène Josserand wrote: > +struct cyttsp5 { > + struct device *dev; > + struct mutex system_lock; > + struct mutex btn_lock; > + struct mutex mt_lock; Three mutexes for such a driver is probably excessive, especial

Re: [PATCH 1/2] Input: Add driver for Cypress Generation 5 touchscreen

2017-05-30 Thread Thomas Petazzoni
Hello, Couple more comments in addition to the more extensive review done by Maxime. On Mon, 29 May 2017 16:45:37 +0200, Mylène Josserand wrote: > +static int cyttsp5_startup(struct cyttsp5 *ts) > +{ > + int rc; > + > + rc = cyttsp5_deassert_int(ts); > + if (rc) { > + dev_

Re: [PATCH 1/2] Input: Add driver for Cypress Generation 5 touchscreen

2017-05-30 Thread Maxime Ripard
Hi Mylene, On Mon, May 29, 2017 at 04:45:37PM +0200, Mylène Josserand wrote: > +static int cyttsp5_read(struct cyttsp5 *ts, u8 *buf, u32 max) > +{ > + int rc; > + u32 size; > + > + if (!buf) > + return -EINVAL; > + > + /* Read the frame to retrieve the size */ > + r

Re: [PATCH 1/2] Input: Add driver for Cypress Generation 5 touchscreen

2017-05-29 Thread kbuild test robot
Hi Mylène, [auto build test WARNING on input/next] [also build test WARNING on v4.12-rc3 next-20170529] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Myl-ne-Josserand/Input-Add-Cypress-Gen5-Tou