[PATCH v6 2/5] pwm: Add Apple PWM controller

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Fri Jan 13 10:39:01 PST 2023


On Fri, Jan 13, 2023 at 09:25:08PM +0300, Sasha Finkelstein wrote:
> On Wed, 11 Jan 2023 at 02:06, Uwe Kleine-König
> <u.kleine-koenig at pengutronix.de> wrote:
> > > + * Limitations:
> > > + * - The writes to cycle registers are shadowed until a write to
> > > + *   the control register.
> > > + * - If both OFF_CYCLES and ON_CYCLES are set to 0, the output
> > > + *   is a constant off signal.
> >
> > How does the PWM behave with *APPLE_PWM_CTRLAPPLE_PWM_CTRL = 0?
> > (typically: drives constant low)
> >
> APPLE_PWM_CTRL = 0 implies that the APPLE_CTRL_ENABLE bit is set low, which
> turns off the pwm signal (constant low). I do not think that it is
> necessary to explicitly
> specify that case in the comments.

This is an information that I want to have available. Ideally easily
greppable by using the format that other drivers use for that, too.
(The command I usually use is:

	sed -rn '/Limitations:/,/\*\/?$/p' drivers/pwm/*.c

so if you make sure your info is added accordingly that would be good.)

This is useful to answer questions like: Can I reasonably expect that a
disabled PWM respects the configured polarity.

> > Can you please rename such that the (maybe new) name for APPLE_PWM_CTRL
> > is a prefix for the (maybe new) APPLE_CTRL_ENABLE and the other register
> > bit definitions?
> To make sure, you want the register named APPLE_PWM_CTRL, and the bits named
> APPLE_PWM_CTRL_ENABLE, APPLE_PWM_CTRL_MODE and so on?

Yes.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20230113/77d53abd/attachment.sig>


More information about the linux-arm-kernel mailing list