linux-pwm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Thierry Reding <thierry.reding@gmail.com>, linux-pwm@vger.kernel.org
Subject: Re: [PATCH 2/3] pwm: add a driver for the STMPE PWM
Date: Wed, 10 Feb 2016 16:06:12 +0000	[thread overview]
Message-ID: <20160210160612.GD26950@x1> (raw)
In-Reply-To: <1455094468-25521-3-git-send-email-linus.walleij@linaro.org>

On Wed, 10 Feb 2016, Linus Walleij wrote:

> This adds a driver for the STMPE 24xx series of multi-purpose
> I2C expanders. (I think STMPE means ST Microelectronics
> Multi-Purpose Expander.) This PWM was designed in accordance with
> Nokia specifications and is kind of weird and usually just
> switched between max and zero dutycycle. However it is indeed
> a PWM so it needs to live in the PWM subsystem.
> 
> This PWM is mostly used for white LED backlight.
> 
> Cc: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> Lee could you ACK the few lines added to drivers/mfd/stmpe.c
> so that the PWM maintainers can take this through their tree?

Hells no! ;)

> Thanks.
> ---
>  drivers/mfd/stmpe.c     |  37 ++++++
>  drivers/pwm/Kconfig     |   7 ++
>  drivers/pwm/Makefile    |   1 +
>  drivers/pwm/pwm-stmpe.c | 297 ++++++++++++++++++++++++++++++++++++++++++++++++

Any reason why you're bundling up changes in two subsystems?

>  4 files changed, 342 insertions(+)
>  create mode 100644 drivers/pwm/pwm-stmpe.c
> 
> diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
> index 8222e374e4b1..4eb08e0471f8 100644
> --- a/drivers/mfd/stmpe.c
> +++ b/drivers/mfd/stmpe.c
> @@ -333,6 +333,33 @@ static const struct mfd_cell stmpe_keypad_cell = {
>  	.num_resources	= ARRAY_SIZE(stmpe_keypad_resources),
>  };
>  
> +

Superflous '\n'.

> +/*
> + * PWM (1601, 2401, 2403)
> + */
> +static struct resource stmpe_pwm_resources[] = {
> +	{
> +		.name	= "PWM0",
> +		.flags	= IORESOURCE_IRQ,
> +	},
> +	{
> +		.name	= "PWM1",
> +		.flags	= IORESOURCE_IRQ,
> +	},
> +	{
> +		.name	= "PWM2",
> +		.flags	= IORESOURCE_IRQ,
> +	},
> +};

I prefer the DEFINE_RES_* stuff these days.

> +static const struct mfd_cell stmpe_pwm_cell = {
> +	.name		= "stmpe-pwm",
> +	.of_compatible  = "st,stmpe-pwm",
> +	.resources	= stmpe_pwm_resources,
> +	.num_resources	= ARRAY_SIZE(stmpe_pwm_resources),
> +};
> +
> +

What's with the '\n\n'?

>  /*
>   * STMPE801
>   */
> @@ -537,6 +564,11 @@ static struct stmpe_variant_block stmpe1601_blocks[] = {
>  		.irq	= STMPE1601_IRQ_KEYPAD,
>  		.block	= STMPE_BLOCK_KEYPAD,
>  	},
> +	{
> +		.cell	= &stmpe_pwm_cell,
> +		.irq	= STMPE1601_IRQ_PWM0,
> +		.block	= STMPE_BLOCK_PWM,
> +	},
>  };
>  
>  /* supported autosleep timeout delay (in msecs) */
> @@ -771,6 +803,11 @@ static struct stmpe_variant_block stmpe24xx_blocks[] = {
>  		.irq	= STMPE24XX_IRQ_KEYPAD,
>  		.block	= STMPE_BLOCK_KEYPAD,
>  	},
> +	{
> +		.cell	= &stmpe_pwm_cell,
> +		.irq	= STMPE24XX_IRQ_PWM0,
> +		.block	= STMPE_BLOCK_PWM,
> +	},
>  };

[...]

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2016-02-10 16:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-10  8:54 [PATCH 0/3] STMPE PWM driver Linus Walleij
2016-02-10  8:54 ` [PATCH 1/3] pwm: add DT bindings for the STMPE PWM Linus Walleij
2016-02-12 15:24   ` Rob Herring
2016-02-10  8:54 ` [PATCH 2/3] pwm: add a driver " Linus Walleij
2016-02-10 16:06   ` Lee Jones [this message]
2016-02-10  8:54 ` [PATCH 3/3] ARM: nomadik: add STMPE PWM to the NHK15 device tree Linus Walleij

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=20160210160612.GD26950@x1 \
    --to=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=thierry.reding@gmail.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).