linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anatolij Gustschin <agust@denx.de>
To: Simon Budig <simon.budig@kernelconcepts.de>
Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com,
	Ilya Yanok <yanok@emcraft.com>
Subject: Re: [PATCH v2] Touchscreen driver for FT5x06 based EDT displays
Date: Fri, 16 Dec 2011 12:51:41 +0100	[thread overview]
Message-ID: <20111216125141.18920ac7@wker> (raw)
In-Reply-To: <4EE9F927.7070609@kernelconcepts.de>

Hi Simon,

On Thu, 15 Dec 2011 14:41:59 +0100
Simon Budig <simon.budig@kernelconcepts.de> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 12/15/2011 01:17 PM, agust@denx.de wrote:
> > My understanding is that CodingStyle insists on tabs for
> > indentation and tabs are always 8 characters wide. Additional
> > indentation for alignment of function arguments is done by
> > spaces, i.e.:
> > 
> > <tab>function(arg1,
> > <tab><tab>    arg2);
> 
> Hrm, in my perception arg2 should be on the same indentation level as
> function(, since it is within the same block.
> 
> Anyway, I'll ignore the whitespace complaints of checkpatch.pl for now.
> I am then down to three warnings about >80 character lines, which are
> not easy to fix.
> 
> However, when trying my patch against the latest mainline it complains
> about an implicit declaration of function irq_to_gpio().
> 
> I understand that irq_to_gpio() is a potentially nasty thing to do and
> that there has been some cleanup. But I am unsure how to fix this:
> 
> Currently I use the .irq field of the i2c_board_info struct to define
> the irq to respond to. I expect this to be a gpio irq and hence use
> irq_to_gpio to configure the resp. gpio as input.
> 
> If I am not supposed to use irq_to_gpio, then how do I solve this?
> 
> * expect the board file to set up the resp. GPIO direction?

That would mean that each board using the driver have to
add this code. I'd prefer to do it in the driver itself
to reduce code duplication.

> or
> 
> * use an entry in my platform data (next to the reset pin) for the gpio
> number and then try to map this to an irq number?

Since we already have platform data and can't get rid of it now,
adding gpio entry and mapping to irq would be better.

> or did I miss the best solution?

In the long term switching to device tree configuration would be
the right way to go, I think. But for now we have to wait until
arch/platform code is converted to device tree usage.

Thanks,
Anatoij

  reply	other threads:[~2011-12-16 11:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-29 15:52 [PATCH v2] Touchscreen driver for FT5x06 based EDT displays Simon Budig
2011-09-29 15:52 ` Simon Budig
2011-12-02 13:51   ` Anatolij Gustschin
2011-12-15 11:00     ` Simon Budig
2011-12-15 12:17       ` agust
2011-12-15 13:41         ` Simon Budig
2011-12-16 11:51           ` Anatolij Gustschin [this message]
2011-12-20 22:47           ` Ilya Yanok

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=20111216125141.18920ac7@wker \
    --to=agust@denx.de \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=simon.budig@kernelconcepts.de \
    --cc=yanok@emcraft.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).