Re: [PATCH v8 04/17] spi: offload-trigger: add PWM trigger driver

From: Andy Shevchenko
Date: Mon Feb 10 2025 - 11:54:40 EST


On Fri, Feb 07, 2025 at 02:09:01PM -0600, David Lechner wrote:
> Add a new driver for a generic PWM trigger for SPI offloads.

...

> +#include <linux/platform_device.h>
> +#include <linux/pwm.h>
> +#include <linux/mod_devicetable.h>
> +#include <linux/spi/offload/provider.h>
> +#include <linux/types.h>

You probably want also to have (in the comments the examples of the users)
device.h // dev_*(), devm_kzalloc()
err.h // EINVAL, PTR_ERR(), ...
math.h // DIV_ROUND_UP_ULL()
module.h // MODULE_*()
property.h // dev_fwnode()
time.h // NSEC_PER_SEC

> +struct spi_offload_trigger_pwm_state {
> + struct device *dev;
> + struct pwm_device *pwm;
> +};

--
With Best Regards,
Andy Shevchenko