public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Dan Williams <dan.j.williams@intel.com>
Cc: gregkh@linuxfoundation.org, Stephen Warren <swarren@nvidia.com>,
	linux-kernel@vger.kernel.org,
	Grant Likely <grant.likely@secretlab.ca>,
	linux-serial@vger.kernel.org, Colin Cross <ccross@android.com>,
	Olof Johansson <olof@lixom.net>,
	alan@linux.intel.com
Subject: Re: [PATCH v2 1/4] of_serial: add support for setup quirks
Date: Mon, 9 Apr 2012 18:49:20 +0000	[thread overview]
Message-ID: <201204091849.20705.arnd@arndb.de> (raw)
In-Reply-To: <20120409182203.317.81835.stgit@dwillia2-linux.jf.intel.com>

On Monday 09 April 2012, Dan Williams wrote:
> Benign conversion of of_serial.c to offer the option of 'setup' quirks
> similar to how 8250_pci.c houses the pci-serial-device quirks.
> 
> A setup quirk allows custom uart_port ops to specified in the
> of_serial_info data fed to each serial of_device_id.
> 
> Tegra's 'break' quirk is the target consumer.
> 
> Cc: Colin Cross <ccross@android.com>
> Cc: Olof Johansson <olof@lixom.net>
> Cc: Stephen Warren <swarren@nvidia.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
>  drivers/tty/serial/of_serial.c |   68 ++++++++++++++++++++++++++++------------
>  1 files changed, 47 insertions(+), 21 deletions(-)

I don't think this is a good idea. Aside from the bug that you introduce
(you can no longer have multiple ports of the same type because of overwrite
the static info->line number), it seems an unnecessary complication.
Either just add the quirk to the of_serial file based on the compatible value,
or do a trivial new driver that has a subset of the existing one you need,
plus the quirk.

	Arnd 

  reply	other threads:[~2012-04-09 18:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-09 18:21 [PATCH v2 0/4] rework quirks for the "kt" serial port Dan Williams
2012-04-09 18:22 ` [PATCH v2 1/4] of_serial: add support for setup quirks Dan Williams
2012-04-09 18:49   ` Arnd Bergmann [this message]
2012-04-09 19:15     ` Williams, Dan J
2012-04-09 18:22 ` [PATCH v2 2/4] tegra, serial8250: add ->handle_break() uart_port op Dan Williams
2012-04-09 18:22 ` [PATCH v2 3/4] serial/8250_pci: Clear FIFOs for Intel ME Serial Over Lan device on BI Dan Williams
2012-04-09 18:22 ` [PATCH v2 4/4] serial/8250_pci: fix suspend/resume vs init/exit quirks Dan Williams

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=201204091849.20705.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=alan@linux.intel.com \
    --cc=ccross@android.com \
    --cc=dan.j.williams@intel.com \
    --cc=grant.likely@secretlab.ca \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=swarren@nvidia.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