Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Intel Low Power Subsystem PWM controller driver
0004  *
0005  * Copyright (C) 2014, Intel Corporation
0006  *
0007  * Derived from the original pwm-lpss.c
0008  */
0009 
0010 #ifndef __PWM_LPSS_H
0011 #define __PWM_LPSS_H
0012 
0013 #include <linux/device.h>
0014 #include <linux/pwm.h>
0015 
0016 #define MAX_PWMS            4
0017 
0018 struct pwm_lpss_chip {
0019     struct pwm_chip chip;
0020     void __iomem *regs;
0021     const struct pwm_lpss_boardinfo *info;
0022 };
0023 
0024 struct pwm_lpss_boardinfo {
0025     unsigned long clk_rate;
0026     unsigned int npwm;
0027     unsigned long base_unit_bits;
0028     bool bypass;
0029     /*
0030      * On some devices the _PS0/_PS3 AML code of the GPU (GFX0) device
0031      * messes with the PWM0 controllers state,
0032      */
0033     bool other_devices_aml_touches_pwm_regs;
0034 };
0035 
0036 struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, struct resource *r,
0037                      const struct pwm_lpss_boardinfo *info);
0038 
0039 #endif  /* __PWM_LPSS_H */