All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Daniel Mack <daniel@zonque.org>
Cc: "jeffrey.lin" <yajohn@gmail.com>,
	rydberg@euromail.se, bleung@chromium.org, dh.herrmann@gmail.com,
	charliemooney@chromium.org, floe@butterbrot.org,
	jeffrey.lin@rad-ic.com, roger.yang@rad-ic.com, KP.li@rad-ic.com,
	linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
	"jeffrey.lin" <jeffrey.lin@gmail.com>
Subject: Re: [PATCH] driver: input: touchscreen:  add Raydium i2c touchscreen driver
Date: Wed, 19 Nov 2014 10:06:39 -0800	[thread overview]
Message-ID: <20141119180639.GD37989@dtor-ws> (raw)
In-Reply-To: <546CC900.8000506@zonque.org>

On Wed, Nov 19, 2014 at 05:44:48PM +0100, Daniel Mack wrote:
> On 11/19/2014 04:30 PM, jeffrey.lin wrote:
> > From: "jeffrey.lin" <jeffrey.lin@gmail.com>
> > 
> > this patch is porting Raydium I2C touch driver. Developer can enable
> > raydium touch driver by modifying define "CONFIG_TOUCHSCREEN_RM_TS".
> > 
> > BUG: None
> > TEST: built and test with peppy
> > 
> > Signed-off-by: jeffrey.lin@rad-ic.com
> > Change-Id: I05d54e5ef29249d2a6eae97222c90bed11e839f9
> > ---
> 
> Just some general remarks that IMO need to be addressed before a more
> thorough review can happen:
> 
> 
> * Please remove all dead code, such as code in comments and in #if 0
>   blocks.
> 
> * Use the regmap framework to abstract the hardware access on the I2C
>   layer (see drivers/input/keyboard/cap1106.c and many other drivers
>   as an example, and check include/linux/regmap.h). That makes the code
>   a lot shorter and more comprehensible to read.
> 
> * By using request_threaded_irq(), you don't have to manually control
>   your worker and can simplify your code quite a bit.
> 
> * See if you can claim all the resources the driver needs by using
>   devm_* variants.
> 
> * Don't use uppercase names for filenames, structs, functions and IDs
> 
> * Why do you need a miscdevice for this? Isn't the input event layer
>   enough?
> 
> * Also, run scripts/checkpatch.pl on the new patch, which will help
>   you find some more typical pitfalls.

Also please convert driver to MT-B (slotted) protocol (you are currently
using MT-Ai version).

And please remove join_bytes(). It is called get_unaligned_le16().

Most of the things that need fixing have already been listed in response
to your original submission, please do address them before posting the
driver again.

Thanks.

-- 
Dmitry

  reply	other threads:[~2014-11-19 18:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19 15:30 [PATCH] driver: input: touchscreen: add Raydium i2c touchscreen driver jeffrey.lin
2014-11-19 16:44 ` Daniel Mack
2014-11-19 18:06   ` Dmitry Torokhov [this message]
2014-11-19 18:05 ` Benson Leung
2014-11-19 18:08 ` Benson Leung
  -- strict thread matches above, loose matches on Subject: below --
2014-12-01 10:17 jeffrey.lin
2014-12-01 21:03 ` Benson Leung
2014-12-03  0:03 ` 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=20141119180639.GD37989@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=KP.li@rad-ic.com \
    --cc=bleung@chromium.org \
    --cc=charliemooney@chromium.org \
    --cc=daniel@zonque.org \
    --cc=dh.herrmann@gmail.com \
    --cc=floe@butterbrot.org \
    --cc=jeffrey.lin@gmail.com \
    --cc=jeffrey.lin@rad-ic.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roger.yang@rad-ic.com \
    --cc=rydberg@euromail.se \
    --cc=yajohn@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.