Re: [PWM v4 2/3] PWM: GPIO+hrtimer device emulation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Gstreamer Embedded]     [Linux MMC Devel]     [U-Boot V2]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux ARM Kernel]     [Linux OMAP]     [Linux SCSI]

  Powered by Linux