On Thu, Apr 17, 2025 at 08:16:11PM +0200, Uwe Kleine-König wrote: > Add Return and (where interesting) Context sections, fix some formatting > and drop documenting the internal function __pwm_apply(). > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxx> I found a few more things that are rendered non-optimal. To reduce the noise I will squash the following change in the original commit and not create a very similar second patch: diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index 70ec6430edfe..e0a90c4cd723 100644 --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c @@ -216,8 +216,8 @@ static int __pwm_write_waveform(struct pwm_chip *chip, struct pwm_device *pwm, c * * Typically a given waveform cannot be implemented exactly by hardware, e.g. * because hardware only supports coarse period resolution or no duty_offset. - * This function returns the actually implemented waveform if you pass wf to - * pwm_set_waveform_might_sleep now. + * This function returns the actually implemented waveform if you pass @wf to + * pwm_set_waveform_might_sleep() now. * * Note however that the world doesn't stop turning when you call it, so when * doing:: @@ -403,13 +403,13 @@ static int __pwm_set_waveform(struct pwm_device *pwm, * * Typically a requested waveform cannot be implemented exactly, e.g. because * you requested .period_length_ns = 100 ns, but the hardware can only set - * periods that are a multiple of 8.5 ns. With that hardware passing exact = + * periods that are a multiple of 8.5 ns. With that hardware passing @exact = * true results in pwm_set_waveform_might_sleep() failing and returning 1. If - * exact = false you get a period of 93.5 ns (i.e. the biggest period not bigger + * @exact = false you get a period of 93.5 ns (i.e. the biggest period not bigger * than the requested value). - * Note that even with exact = true, some rounding by less than 1 is + * Note that even with @exact = true, some rounding by less than 1 ns is * possible/needed. In the above example requesting .period_length_ns = 94 and - * exact = true, you get the hardware configured with period = 93.5 ns. + * @exact = true, you get the hardware configured with period = 93.5 ns. * * Returns: 0 on success, 1 if was rounded up (if !@exact) or no perfect match was * possible (if @exact), or a negative errno Best regards Uwe
Attachment:
signature.asc
Description: PGP signature