Re: [PATCH 0/6] pwm: imx: Provide atomic operation for IMX PWM driver

From: Lukasz Majewski
Date: Mon Oct 24 2016 - 17:26:40 EST


Hi Boris,

> On Sun, 23 Oct 2016 23:45:40 +0200
> Lukasz Majewski <l.majewski@xxxxxxxxx> wrote:
>
> > This patch set brings atomic operation to i.MX's PWMv2 driver.
> >
> > This work has been supported and suggested by Boris Brezillon [1]
> > and Stefan Agner, by showing how simple the transition could be :-).
> >
> > It has been divided into several steps:
> > - Separate PWMv1 commits from "generic" and non atomic PWM code.
> >
> > NOTE: Since I do not have board with PWMv1, I would like to ask
> > somebody for testing
> >
> > - Move some imx_config_v2 code to separate functions
> >
> > - Provide PWM atomic implementation (the ->apply() driver) in a
> > single patch for better readability.
> >
> > - Remove redundant PWM code (disable, enable, config callbacks)
> >
> > - Clean up the driver infrastructure
> >
> > - Provide "polarity_supported" flag to indicate support for
> > polarity inversion
> >
> > This work should be applied on top of following commits:
> >
> > http://patchwork.ozlabs.org/patch/679706/
[2]

> > http://patchwork.ozlabs.org/patch/679707/
[3]

> > http://patchwork.ozlabs.org/patch/679680/
>
> I'm not sure I follow the logic here. Has patch [1] already been
> applied? If that's not the case, then you should just drop it and put
> your changes on top of mainline.
>
> [1]http://patchwork.ozlabs.org/patch/679680/

Patches [2] and [3] have been developed initially by Lothar and
subsequently picked up by Bhuvanchandra. There is no issue with them.

The patch [1] is a bit more tricky. The work has been done by
Bhuvanchandra, which adds DTS and core support for polarity inversion.

This code works and utilizes the "old" PWM API with enable, disable and
config. However, Stefan had some comments about the placement for the
polarity setting (in the .config_v2()) and proposed switch to atomic
API.

To make things easier and cleaner, I decided to put my atomic API
rework on top of those patches. In this way I can credit the previous
work and avoid rewriting DTS polarity inversion code already developed
and validated by Bhuvanchandra.



Best regards,
Åukasz Majewski




Attachment: pgpJJOkZ9IFnz.pgp
Description: OpenPGP digital signature