All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerhard Sittig <gsi@denx.de>
To: Marek Vasut <marex@denx.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-input@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org,
	Chao Xie <xiechao.mail@gmail.com>, Arnd Bergmann <arnd@arndb.de>,
	Sekhar Nori <nsekhar@ti.com>, Tony Lindgren <tony@atomide.com>,
	Eric Miao <eric.y.miao@gmail.com>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Ralf Baechle <ralf@linux-mips.org>,
	Anatolij Gustschin <agust@denx.de>, Detlev Zundel <dzu@denx.de>
Subject: Re: [PATCH v1 12/12] input: matrix-keypad: add diagnostics in probe()
Date: Sat, 22 Jun 2013 10:30:44 +0200	[thread overview]
Message-ID: <20130622083044.GD24305@book.gsilab.sittig.org> (raw)
In-Reply-To: <201306220428.44614.marex@denx.de>

On Sat, Jun 22, 2013 at 04:28 +0200, Marek Vasut wrote:
> 
> Dear Gerhard Sittig,
> 
> > optionally dump relevant configuration of pins, matrix lines,
> > and delay/interval times at the very end of the probe routine
> > (development feature, silent by default)
> > 
> > Signed-off-by: Gerhard Sittig <gsi@denx.de>
> > ---
> >  drivers/input/keyboard/matrix_keypad.c |   18 ++++++++++++++++++
> >  1 file changed, 18 insertions(+)
> > 
> > diff --git a/drivers/input/keyboard/matrix_keypad.c
> > b/drivers/input/keyboard/matrix_keypad.c index 275b157..69b15720 100644
> > --- a/drivers/input/keyboard/matrix_keypad.c
> > +++ b/drivers/input/keyboard/matrix_keypad.c
> > @@ -800,6 +800,24 @@ static int matrix_keypad_probe(struct platform_device
> > *pdev) device_init_wakeup(&pdev->dev, pdata->wakeup);
> >  	platform_set_drvdata(pdev, keypad);
> > 
> > +	dev_dbg(&pdev->dev, "gpios col num[%u] lvl[%s] drv[%s] enc[%s]\n",
> > +		pdata->num_col_gpios,
> > +		pdata->col_gpios_active_low ? "low" : "high",
> > +		pdata->col_gpios_push_pull ? "pp" : "od",
> > +		pdata->col_gpios_binary_encoded ? "bin" : "1-1");
> > +	dev_dbg(&pdev->dev, "gpios row num[%u] lvl[%s]\n",
> > +		pdata->num_row_gpios,
> > +		pdata->row_gpios_active_low ? "low" : "high");
> > +	dev_dbg(&pdev->dev, "matrix cols[%u] rows[%u] code shift[%u]\n",
> > +		pdata->num_matrix_cols,
> > +		pdata->num_matrix_rows,
> > +		keypad->row_shift);
> > +	dev_dbg(&pdev->dev, "times scan[%u-%u] bounce[%u] switch[%u]\n",
> > +		pdata->col_scan_delay_us,
> > +		pdata->col_scan_delay_us_max,
> > +		pdata->debounce_ms,
> > +		pdata->col_switch_delay_ms);
> > +
> 
> It's a bit hard to understand this kind of debug output. Besides, we already 
> have all the DT props in /proc/device-tree where you can check them , do we 
> really need this patch then ?

This output shall reflect not only what was provided to the
driver as input, but as well what the driver made of it (that is,
some of the values get derived from others, some underwent
normalization).

The terse format mostly is a consequence of the 80 columns line
length limit, and the output being for debugging purposes
exclusively.  But I understand that one needs to know the
driver's internal working before one can read this output.  And I
felt that this is the only situation where one would enable
debugging for the driver.

That patch might as well get dropped, I have no strong feelings
about it.  Actually I put it at the end of the series such that
nothing else builds on top of it and that it doesn't change the
context of anything else, so that dropping it doesn't matter
anyway.


virtually yours
Gerhard Sittig
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office@denx.de

WARNING: multiple messages have this Message-ID (diff)
From: gsi@denx.de (Gerhard Sittig)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v1 12/12] input: matrix-keypad: add diagnostics in probe()
Date: Sat, 22 Jun 2013 10:30:44 +0200	[thread overview]
Message-ID: <20130622083044.GD24305@book.gsilab.sittig.org> (raw)
In-Reply-To: <201306220428.44614.marex@denx.de>

On Sat, Jun 22, 2013 at 04:28 +0200, Marek Vasut wrote:
> 
> Dear Gerhard Sittig,
> 
> > optionally dump relevant configuration of pins, matrix lines,
> > and delay/interval times at the very end of the probe routine
> > (development feature, silent by default)
> > 
> > Signed-off-by: Gerhard Sittig <gsi@denx.de>
> > ---
> >  drivers/input/keyboard/matrix_keypad.c |   18 ++++++++++++++++++
> >  1 file changed, 18 insertions(+)
> > 
> > diff --git a/drivers/input/keyboard/matrix_keypad.c
> > b/drivers/input/keyboard/matrix_keypad.c index 275b157..69b15720 100644
> > --- a/drivers/input/keyboard/matrix_keypad.c
> > +++ b/drivers/input/keyboard/matrix_keypad.c
> > @@ -800,6 +800,24 @@ static int matrix_keypad_probe(struct platform_device
> > *pdev) device_init_wakeup(&pdev->dev, pdata->wakeup);
> >  	platform_set_drvdata(pdev, keypad);
> > 
> > +	dev_dbg(&pdev->dev, "gpios col num[%u] lvl[%s] drv[%s] enc[%s]\n",
> > +		pdata->num_col_gpios,
> > +		pdata->col_gpios_active_low ? "low" : "high",
> > +		pdata->col_gpios_push_pull ? "pp" : "od",
> > +		pdata->col_gpios_binary_encoded ? "bin" : "1-1");
> > +	dev_dbg(&pdev->dev, "gpios row num[%u] lvl[%s]\n",
> > +		pdata->num_row_gpios,
> > +		pdata->row_gpios_active_low ? "low" : "high");
> > +	dev_dbg(&pdev->dev, "matrix cols[%u] rows[%u] code shift[%u]\n",
> > +		pdata->num_matrix_cols,
> > +		pdata->num_matrix_rows,
> > +		keypad->row_shift);
> > +	dev_dbg(&pdev->dev, "times scan[%u-%u] bounce[%u] switch[%u]\n",
> > +		pdata->col_scan_delay_us,
> > +		pdata->col_scan_delay_us_max,
> > +		pdata->debounce_ms,
> > +		pdata->col_switch_delay_ms);
> > +
> 
> It's a bit hard to understand this kind of debug output. Besides, we already 
> have all the DT props in /proc/device-tree where you can check them , do we 
> really need this patch then ?

This output shall reflect not only what was provided to the
driver as input, but as well what the driver made of it (that is,
some of the values get derived from others, some underwent
normalization).

The terse format mostly is a consequence of the 80 columns line
length limit, and the output being for debugging purposes
exclusively.  But I understand that one needs to know the
driver's internal working before one can read this output.  And I
felt that this is the only situation where one would enable
debugging for the driver.

That patch might as well get dropped, I have no strong feelings
about it.  Actually I put it at the end of the series such that
nothing else builds on top of it and that it doesn't change the
context of anything else, so that dropping it doesn't matter
anyway.


virtually yours
Gerhard Sittig
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de

  reply	other threads:[~2013-06-22  8:30 UTC|newest]

Thread overview: 90+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-21 18:09 [PATCH v1 00/12] input: keypad-matrix: doc update, hw separation, polling, binary columns Gerhard Sittig
2013-06-21 18:09 ` Gerhard Sittig
2013-06-21 18:09 ` [PATCH v1 01/12] input: matrix-keypad: update devicetree binding doc Gerhard Sittig
2013-06-21 18:09   ` Gerhard Sittig
2013-06-21 21:31   ` Stephen Warren
2013-06-21 21:31     ` Stephen Warren
2013-06-22  9:23     ` Gerhard Sittig
2013-06-22  9:23       ` Gerhard Sittig
2013-06-24 22:00       ` Stephen Warren
2013-06-24 22:00         ` Stephen Warren
2013-06-28  8:24         ` Gerhard Sittig
2013-06-28  8:24           ` Gerhard Sittig
2013-06-28 14:50           ` Stephen Warren
2013-06-28 14:50             ` Stephen Warren
2013-06-30 11:04             ` Gerhard Sittig
2013-06-30 11:04               ` Gerhard Sittig
2013-06-21 18:09 ` [PATCH v1 02/12] input: matrix-keymap: func call coding style nit Gerhard Sittig
2013-06-21 18:09   ` Gerhard Sittig
2013-06-22  2:18   ` Marek Vasut
2013-06-22  2:18     ` Marek Vasut
2013-06-22  8:22     ` Gerhard Sittig
2013-06-22  8:22       ` Gerhard Sittig
2013-06-22 13:23       ` Marek Vasut
2013-06-22 13:23         ` Marek Vasut
2013-06-21 18:09 ` [PATCH v1 03/12] input: matrix-keypad: rename variables and funcs Gerhard Sittig
2013-06-21 18:09   ` Gerhard Sittig
2013-06-21 18:09 ` [PATCH v1 04/12] input: matrix-keypad: push/pull, separate polarity Gerhard Sittig
2013-06-21 18:09   ` Gerhard Sittig
2013-06-21 21:34   ` Stephen Warren
2013-06-21 21:34     ` Stephen Warren
2013-06-22  9:36     ` Gerhard Sittig
2013-06-22  9:36       ` Gerhard Sittig
2013-06-24 23:14       ` Stephen Warren
2013-06-24 23:14         ` Stephen Warren
2013-06-28  8:33         ` Gerhard Sittig
2013-06-28  8:33           ` Gerhard Sittig
2013-06-28 15:01           ` Stephen Warren
2013-06-28 15:01             ` Stephen Warren
2013-06-30 11:43             ` Gerhard Sittig
2013-06-30 11:43               ` Gerhard Sittig
2013-06-21 18:09 ` [PATCH v1 05/12] input: matrix-keypad: update comments, diagnostics Gerhard Sittig
2013-06-21 18:09   ` Gerhard Sittig
2013-06-22  2:23   ` Marek Vasut
2013-06-22  2:23     ` Marek Vasut
2013-06-21 18:09 ` [PATCH v1 06/12] input: keypad-matrix: refactor matrix scan logic Gerhard Sittig
2013-06-21 18:09   ` Gerhard Sittig
2013-06-21 18:09 ` [PATCH v1 07/12] input: keypad-matrix: introduce polling support Gerhard Sittig
2013-06-21 18:09   ` Gerhard Sittig
2013-06-21 21:38   ` Stephen Warren
2013-06-21 21:38     ` Stephen Warren
2013-06-22  9:50     ` Gerhard Sittig
2013-06-22  9:50       ` Gerhard Sittig
2013-06-24 23:18       ` Stephen Warren
2013-06-24 23:18         ` Stephen Warren
2013-06-21 18:09 ` [PATCH v1 08/12] input: keypad-matrix: tell GPIO pins from matrix lines Gerhard Sittig
2013-06-21 18:09   ` Gerhard Sittig
2013-06-21 21:41   ` Stephen Warren
2013-06-21 21:41     ` Stephen Warren
2013-06-22 10:00     ` Gerhard Sittig
2013-06-22 10:00       ` Gerhard Sittig
2013-06-24 23:26       ` Stephen Warren
2013-06-24 23:26         ` Stephen Warren
2013-06-28  7:52         ` Gerhard Sittig
2013-06-28  7:52           ` Gerhard Sittig
2013-06-28 14:35           ` Stephen Warren
2013-06-28 14:35             ` Stephen Warren
2013-06-28 18:25             ` Dmitry Torokhov
2013-06-28 18:25               ` Dmitry Torokhov
2013-06-30 12:03               ` Gerhard Sittig
2013-06-30 12:03                 ` Gerhard Sittig
2013-06-21 18:09 ` [PATCH v1 09/12] input: matrix-keypad: add binary column encoding Gerhard Sittig
2013-06-21 18:09   ` Gerhard Sittig
2013-06-21 21:58   ` Stephen Warren
2013-06-21 21:58     ` Stephen Warren
2013-06-21 18:09 ` [PATCH v1 10/12] input: keypad_matrix: use usleep_range() for scan delay Gerhard Sittig
2013-06-21 18:09   ` Gerhard Sittig
2013-06-21 22:00   ` Stephen Warren
2013-06-21 22:00     ` Stephen Warren
2013-06-22 10:17     ` Gerhard Sittig
2013-06-22 10:17       ` Gerhard Sittig
2013-06-24 23:27       ` Stephen Warren
2013-06-24 23:27         ` Stephen Warren
2013-06-21 18:09 ` [PATCH v1 11/12] input: keypad-matrix: AC14xx device tree update Gerhard Sittig
2013-06-21 18:09   ` Gerhard Sittig
2013-06-21 18:09 ` [PATCH v1 12/12] input: matrix-keypad: add diagnostics in probe() Gerhard Sittig
2013-06-21 18:09   ` Gerhard Sittig
2013-06-22  2:28   ` Marek Vasut
2013-06-22  2:28     ` Marek Vasut
2013-06-22  8:30     ` Gerhard Sittig [this message]
2013-06-22  8:30       ` Gerhard Sittig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130622083044.GD24305@book.gsilab.sittig.org \
    --to=gsi@denx.de \
    --cc=agust@denx.de \
    --cc=arnd@arndb.de \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dzu@denx.de \
    --cc=eric.y.miao@gmail.com \
    --cc=haojian.zhuang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=nsekhar@ti.com \
    --cc=ralf@linux-mips.org \
    --cc=tony@atomide.com \
    --cc=xiechao.mail@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.