mirror of
https://github.com/torvalds/linux.git
synced 2026-07-30 19:21:28 +02:00
Merge "pwm: pwm-qti-lpg: Fix pause_hi_count & pause_lo_count initialization"
This commit is contained in:
commit
b7e16f10d2
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
2036
drivers/pwm/pwm-qti-lpg.c
Normal file
File diff suppressed because it is too large
Load Diff
42
include/linux/qpnp/qti-pwm.h
Normal file
42
include/linux/qpnp/qti-pwm.h
Normal 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
|
||||
Loading…
Reference in New Issue
Block a user