summaryrefslogtreecommitdiffstats
path: root/include/linux/platform_data/x86/pwm-lpss.h
blob: c852fe24fe2a3e7575406b9e1fa4639be71a3bad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* SPDX-License-Identifier: GPL-2.0-only */
/* Intel Low Power Subsystem PWM controller driver */

#ifndef __PLATFORM_DATA_X86_PWM_LPSS_H
#define __PLATFORM_DATA_X86_PWM_LPSS_H

#include <linux/types.h>

struct device;

struct pwm_lpss_chip;

struct pwm_lpss_boardinfo {
	unsigned long clk_rate;
	unsigned int npwm;
	unsigned long base_unit_bits;
	/*
	 * Some versions of the IP may stuck in the state machine if enable
	 * bit is not set, and hence update bit will show busy status till
	 * the reset. For the rest it may be otherwise.
	 */
	bool bypass;
	/*
	 * On some devices the _PS0/_PS3 AML code of the GPU (GFX0) device
	 * messes with the PWM0 controllers state,
	 */
	bool other_devices_aml_touches_pwm_regs;
};

struct pwm_lpss_chip *devm_pwm_lpss_probe(struct device *dev, void __iomem *base,
					  const struct pwm_lpss_boardinfo *info);

#endif	/* __PLATFORM_DATA_X86_PWM_LPSS_H */