Merge "pwm: pwm-qti-lpg: Fix pause_hi_count & pause_lo_count initialization"

This commit is contained in:
qctecmdr 2022-06-08 02:27:44 -07:00 committed by Gerrit - the friendly Code Review server
commit b7e16f10d2
4 changed files with 2089 additions and 0 deletions

View File

@ -432,6 +432,16 @@ config PWM_PXA
To compile this driver as a module, choose M here: the module
will be called pwm-pxa.
config PWM_QTI_LPG
tristate "Qualcomm Technologies, Inc. LPG driver"
depends on MFD_SPMI_PMIC && OF
help
This driver supports the LPG (Light Pulse Generator) module found in
Qualcomm Technologies, Inc. PMIC chips. Each LPG channel can be
configured to operate in PWM mode to output a fixed amplitude with
variable duty cycle or in LUT (Look up table) mode to output PWM
signal with a modulated amplitude.
config PWM_RASPBERRYPI_POE
tristate "Raspberry Pi Firwmware PoE Hat PWM support"
# Make sure not 'y' when RASPBERRYPI_FIRMWARE is 'm'. This can only

View File

@ -39,6 +39,7 @@ obj-$(CONFIG_PWM_NTXEC) += pwm-ntxec.o
obj-$(CONFIG_PWM_OMAP_DMTIMER) += pwm-omap-dmtimer.o
obj-$(CONFIG_PWM_PCA9685) += pwm-pca9685.o
obj-$(CONFIG_PWM_PXA) += pwm-pxa.o
obj-$(CONFIG_PWM_QTI_LPG) += pwm-qti-lpg.o
obj-$(CONFIG_PWM_RASPBERRYPI_POE) += pwm-raspberrypi-poe.o
obj-$(CONFIG_PWM_RCAR) += pwm-rcar.o
obj-$(CONFIG_PWM_RENESAS_TPU) += pwm-renesas-tpu.o

2036
drivers/pwm/pwm-qti-lpg.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,42 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
*/
#ifndef _QTI_PWM_H
#define _QTI_PWM_H
#include <linux/bitops.h>
#include <linux/errno.h>
#include <linux/pwm.h>
#include <linux/types.h>
/**
* enum pwm_output_type - output type of the PWM signal
* @PWM_OUTPUT_FIXED: PWM output is fixed until a change request
* @PWM_OUTPUT_MODULATED: PWM output is modulated in hardware
* autonomously with a predefined pattern
*/
enum pwm_output_type {
PWM_OUTPUT_FIXED = BIT(0),
PWM_OUTPUT_MODULATED = BIT(1),
};
#if IS_ENABLED(CONFIG_PWM_QTI_LPG)
int qpnp_lpg_pwm_get_output_types_supported(struct pwm_device *pwm);
int qpnp_lpg_pwm_set_output_type(struct pwm_device *pwm,
enum pwm_output_type output_type);
#else
static inline int
qpnp_lpg_pwm_get_output_types_supported(struct pwm_device *pwm)
{
return -EINVAL;
}
static inline int qpnp_lpg_pwm_set_output_type(struct pwm_device *pwm,
enum pwm_output_type output_type)
{
return -EINVAL;
}
#endif
#endif