mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 00:21:59 +00:00
d2912cb15b
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
44 lines
1013 B
C
44 lines
1013 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Intel Low Power Subsystem PWM controller driver
|
|
*
|
|
* Copyright (C) 2014, Intel Corporation
|
|
*
|
|
* Derived from the original pwm-lpss.c
|
|
*/
|
|
|
|
#ifndef __PWM_LPSS_H
|
|
#define __PWM_LPSS_H
|
|
|
|
#include <linux/device.h>
|
|
#include <linux/pwm.h>
|
|
|
|
#define MAX_PWMS 4
|
|
|
|
struct pwm_lpss_chip {
|
|
struct pwm_chip chip;
|
|
void __iomem *regs;
|
|
const struct pwm_lpss_boardinfo *info;
|
|
u32 saved_ctrl[MAX_PWMS];
|
|
};
|
|
|
|
struct pwm_lpss_boardinfo {
|
|
unsigned long clk_rate;
|
|
unsigned int npwm;
|
|
unsigned long base_unit_bits;
|
|
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 *pwm_lpss_probe(struct device *dev, struct resource *r,
|
|
const struct pwm_lpss_boardinfo *info);
|
|
int pwm_lpss_remove(struct pwm_lpss_chip *lpwm);
|
|
int pwm_lpss_suspend(struct device *dev);
|
|
int pwm_lpss_resume(struct device *dev);
|
|
|
|
#endif /* __PWM_LPSS_H */
|