linux/drivers/pwm/pwm-adp5585.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Analog Devices ADP5585 PWM driver
 *
 * Copyright 2022 NXP
 * Copyright 2024 Ideas on Board Oy
 *
 * Limitations:
 * - The .apply() operation executes atomically, but may not wait for the
 *   period to complete (this is not documented and would need to be tested).
 * - Disabling the PWM drives the output pin to a low level immediately.
 * - The hardware can only generate normal polarity output.
 */

#include <asm/byteorder.h>

#include <linux/device.h>
#include <linux/err.h>
#include <linux/math64.h>
#include <linux/mfd/adp5585.h>
#include <linux/minmax.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pwm.h>
#include <linux/regmap.h>
#include <linux/time.h>
#include <linux/types.h>

#define ADP5585_PWM_CHAN_NUM

#define ADP5585_PWM_OSC_FREQ_HZ
#define ADP5585_PWM_MIN_PERIOD_NS
#define ADP5585_PWM_MAX_PERIOD_NS

static int pwm_adp5585_request(struct pwm_chip *chip, struct pwm_device *pwm)
{}

static void pwm_adp5585_free(struct pwm_chip *chip, struct pwm_device *pwm)
{}

static int pwm_adp5585_apply(struct pwm_chip *chip,
			     struct pwm_device *pwm,
			     const struct pwm_state *state)
{}

static int pwm_adp5585_get_state(struct pwm_chip *chip,
				 struct pwm_device *pwm,
				 struct pwm_state *state)
{}

static const struct pwm_ops adp5585_pwm_ops =;

static int adp5585_pwm_probe(struct platform_device *pdev)
{}

static const struct platform_device_id adp5585_pwm_id_table[] =;
MODULE_DEVICE_TABLE(platform, adp5585_pwm_id_table);

static struct platform_driver adp5585_pwm_driver =;
module_platform_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();