linux-embedded.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier.adi@gmail.com>
To: Bill Gatliff <bgat@billgatliff.com>
Cc: linux-embedded@vger.kernel.org
Subject: Re: [PWM v4 2/3] PWM: GPIO+hrtimer device emulation
Date: Sat, 12 Feb 2011 21:53:37 -0500	[thread overview]
Message-ID: <AANLkTimNuz245U64MBzGNpop7oVVnVpZ04UUA=7p5CLj@mail.gmail.com> (raw)
In-Reply-To: <1297563323-24074-3-git-send-email-bgat@billgatliff.com>

On Sat, Feb 12, 2011 at 21:15, Bill Gatliff wrote:
> --- a/drivers/pwm/Kconfig
> +++ b/drivers/pwm/Kconfig
> +config GPIO_PWM
> +       tristate "GPIO+hrtimer PWM device emulation"
> +       depends on GENERIC_PWM
> +       help
> +         This option enables code that emulates a single-channel
> +         PWM device using a high-resolution timer and a GPIO
> +         pin.  The PWM framework allows you to create as many
> +         of these devices as desired, subject to CPU overhead
> +         and GPIO pin availability.  If unsure, say N.

document the module name in the help ?

> --- /dev/null
> +++ b/drivers/pwm/gpio-pwm.c
> +#define DRIVER_NAME "gpio-pwm"

use KBUILD_MODNAME instead ?

> +static void gpio_pwm_work (struct work_struct *work)

no space before the "("

> +static struct pwm_device_ops gpio_pwm_device_ops = {
> +       .config         = gpio_pwm_config,
> +       .config_nosleep = gpio_pwm_config_nosleep,
> +       .request        = gpio_pwm_request,
> +};

is this struct not constified ?  same for some of the other structs in
this file ...

> +       gp = kzalloc(sizeof(*gp), GFP_KERNEL);
> +       if (IS_ERR_OR_NULL(gp))

i dont think the kmalloc funcs return a pointer error.  it's either
NULL or it's a valid pointer.  this comes up a few times ...

> +EXPORT_SYMBOL(gpio_pwm_create);
> +EXPORT_SYMBOL(gpio_pwm_destroy);

are people expected to call these directly ?  is that useful if they
cant call any of the config funcs ?
-mike

  parent reply	other threads:[~2011-02-13  2:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-13  2:15 [PWM v4 0/3] Implement a generic PWM framework Bill Gatliff
2011-02-13  2:15 ` [PWM v4 1/3] PWM: " Bill Gatliff
2011-02-13  2:15 ` [PWM v4 2/3] PWM: GPIO+hrtimer device emulation Bill Gatliff
2011-02-13  2:43   ` Bill Gatliff
2011-02-13  2:53   ` Mike Frysinger [this message]
2011-02-13  4:28     ` Bill Gatliff
2011-02-13  4:41       ` Mike Frysinger
2011-02-13  4:52         ` Bill Gatliff
2011-02-13  2:15 ` [PWM v4 3/3] PWM: Atmel PWMC driver Bill Gatliff

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='AANLkTimNuz245U64MBzGNpop7oVVnVpZ04UUA=7p5CLj@mail.gmail.com' \
    --to=vapier.adi@gmail.com \
    --cc=bgat@billgatliff.com \
    --cc=linux-embedded@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 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).