All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukasz Majewski <lukma@denx.de>
To: Joe Perches <joe@perches.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
	Sascha Hauer <s.hauer@pengutronix.de>
Subject: Re: [PATCH 2/2] input: touchscreen mc13xxx: Add mc34708 support
Date: Thu, 12 Apr 2018 16:45:35 +0200	[thread overview]
Message-ID: <20180412164535.324a218a@jawa> (raw)
In-Reply-To: <4690e30b3c4b97847123295f1994c6eafe4e0cbb.camel@perches.com>

[-- Attachment #1: Type: text/plain, Size: 1335 bytes --]

On Wed, 11 Apr 2018 09:01:01 -0700
Joe Perches <joe@perches.com> wrote:

> On Wed, 2018-04-11 at 16:13 +0200, Lukasz Majewski wrote:
> > From: Sascha Hauer <s.hauer@pengutronix.de>
> > 
> > The mc34708 has a different bit to enable pen detection. This
> > adds the driver data and devtype necessary to probe the device
> > and to distinguish between the mc13783 and the mc34708.  
> 
> style trivia:
> 
> > diff --git a/drivers/input/touchscreen/mc13783_ts.c
> > b/drivers/input/touchscreen/mc13783_ts.c  
> []
> > @@ -96,6 +135,10 @@ static void mc13783_ts_report_sample(struct
> > mc13783_ts_priv *priv) 
> >  	cr0 = (cr0 + cr1) / 2;
> >  
> > +	if (priv->drvdata->type == MC13XXX_TYPE_MC34708)
> > +		if (cr0 > 4080)
> > +			cr0 = 0;  
> 
> For easy of reading, this multiple if block should either
> use braces around the first if like:
> 
> 	if (foo) {
> 		if (bar)
> 			single_statement;
> 	}
> 
> or be written
> 
> 	if (foo && bar)
> 		single_statement;
> 
> I generally prefer the latter style.
> 

+1.

I will fix it in v2.


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2018-04-12 14:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-11 14:13 [PATCH 1/2] input: touchscreen mc13xxx: Make platform data optional Lukasz Majewski
2018-04-11 14:13 ` [PATCH 2/2] input: touchscreen mc13xxx: Add mc34708 support Lukasz Majewski
2018-04-11 16:01   ` Joe Perches
2018-04-12 14:45     ` Lukasz Majewski [this message]
2018-04-13 22:27   ` Dmitry Torokhov

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=20180412164535.324a218a@jawa \
    --to=lukma@denx.de \
    --cc=dmitry.torokhov@gmail.com \
    --cc=joe@perches.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    /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.