All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH] Add support for SMSC UFX6000/7000 USB display adapters
Date: Fri, 12 Aug 2011 15:56:02 +0000	[thread overview]
Message-ID: <20110812155602.GA11273@suse.de> (raw)
In-Reply-To: <1313150823-2527-1-git-send-email-steve.glendinning@smsc.com>

On Fri, Aug 12, 2011 at 01:07:03PM +0100, Steve Glendinning wrote:
> This patch adds framebuffer suport for SMSC's UFX6000 (USB 2.0) and
> UFX7000 (USB 3.0) display adapters.
> 
> Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>

Very nice job, I only have one very minor suggestion for this code from
a USB/driver core standpoint (I can't verify that the framebuffer api is
being used properly as I don't know that at all.):

> +/* sets analog bit PLL configuration values */
> +static int ufx_config_pix_clk(struct ufx_data *dev, u32 pixclock)
> +{
> +	struct pll_values asic_pll = {0};
> +	u32 value, clk_pixel, clk_pixel_pll;
> +	int status;
> +
> +	/* convert pixclock (in ps) to frequency (in Hz) */
> +	clk_pixel = PICOS2KHZ(pixclock) * 1000;
> +	pr_info("pixclock %d ps = clk_pixel %d Hz", pixclock, clk_pixel);

Use call pr_info() a bunch, (especially in your probe() call chain)
which will get noisy in the kernel log.  How about using dev_dbg()
instead, which allows you to dynamically turn on/off messages like this,
and it provides the needed information so that the reader of the
messages can tell exactly which device is sending the messages (very
helpful when you attach more than one.)

You can do the same for your calls to pr_debug() and other pr_* calls.
If you note in the header file for those functions, it suggests that
drivers should always call the dev_* versions instead of teh "raw" pr_*
functions, as you do have access to a struct device within your driver.

thanks,

greg k-h

  reply	other threads:[~2011-08-12 15:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-12 12:07 [PATCH] Add support for SMSC UFX6000/7000 USB display adapters Steve Glendinning
2011-08-12 15:56 ` Greg KH [this message]
2011-08-12 19:34 ` Greg KH
2011-08-16 10:17 ` Florian Tobias Schandinat
2011-08-16 16:53 ` Bernie Thompson
2011-08-16 17:32 ` Florian Tobias Schandinat
2011-08-18 14:20 ` Steve Glendinning
2011-09-05 17:07 ` Florian Tobias Schandinat

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=20110812155602.GA11273@suse.de \
    --to=gregkh@suse.de \
    --cc=linux-fbdev@vger.kernel.org \
    /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.