Re: [PATCH] gpio: pca953x: Add Maxim MAX7313 PWM support

From: Miquel Raynal
Date: Tue Oct 15 2019 - 10:31:00 EST


Hi Andy,

Thanks for the feedback.

Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote on Mon, 14 Oct 2019
20:59:01 +0300:

> On Mon, Oct 14, 2019 at 4:09 PM Miquel Raynal <miquel.raynal@xxxxxxxxxxx> wrote:
> >
> > The MAX7313 chip is fully compatible with the PCA9535 on its basic
> > functions but can also manage the intensity on each of its ports with
> > PWM. Each output is independent and may be tuned with 16 values (4
> > bits per output). The period is always 32kHz, only the duty-cycle may
> > be changed. One can use any output as GPIO or PWM.
>
> Can we rather not contaminate driver with this?
>
> Just register a separate PWM driver and export its functionality to
> GPIO, or other way around (in the latter case we actually have PCA8685
> which provides a GPIO fgunctionality).
>

I understand your concern but I am not sure to understand which
solution you have in mind. In the former case, could you explain a bit
more what you are thinking about? Would linking the PWM support with
the GPIO driver (code would be located in another .c file) work for
you? Or maybe you would prefer an MFD on top of the GPIO driver?

As for the later case, I am not willing to re-implement GPIO support in
an alternate driver for an already supported chip, it is too much work
for the time I can spend on it.


Thanks,
MiquÃl