Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed40970f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: sps: Add support to enable NO_SUSPEND interrupt option"

parents f3775b29 e2ef80a4
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
/* Copyright (c) 2011-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -274,6 +274,7 @@ int sps_bam_enable(struct sps_bam *dev)
	int result;
	int rc;
	int MTIenabled;
	unsigned long irq_arg = 0;

	/* Is this BAM enabled? */
	if ((dev->state & BAM_STATE_ENABLED))
@@ -285,6 +286,9 @@ int sps_bam_enable(struct sps_bam *dev)
		return SPS_ERROR;
	}

	if (dev->props.options & SPS_BAM_OPT_IRQ_NO_SUSPEND)
		irq_arg = IRQF_NO_SUSPEND;

	/* Set interrupt handling */
	if ((dev->props.options & SPS_BAM_OPT_IRQ_DISABLED) != 0 ||
	    dev->props.irq == SPS_IRQ_INVALID) {
@@ -297,14 +301,16 @@ int sps_bam_enable(struct sps_bam *dev)
			if (dev->props.options & SPS_BAM_RES_CONFIRM) {
				result = request_irq(dev->props.irq,
					(irq_handler_t) bam_isr,
					IRQF_TRIGGER_RISING, "sps", dev);
					(IRQF_TRIGGER_RISING | irq_arg),
					"sps", dev);
				SPS_DBG3(dev,
					"sps:BAM %pa uses edge for IRQ# %d\n",
					BAM_ID(dev), dev->props.irq);
			} else {
				result = request_irq(dev->props.irq,
					(irq_handler_t) bam_isr,
					IRQF_TRIGGER_HIGH, "sps", dev);
					(IRQF_TRIGGER_HIGH | irq_arg),
					"sps", dev);
				SPS_DBG3(dev,
					"sps:BAM %pa uses level for IRQ# %d\n",
					BAM_ID(dev), dev->props.irq);
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2016, 2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -119,6 +119,8 @@
#define SPS_BAM_CACHED_WP           (1UL << 10)
/* Reset BAM with pipes connected */
#define SPS_BAM_FORCE_RESET         (1UL << 11)
/* BAM IRQ is enabled with IRQF_NO_SUSPEND added*/
#define SPS_BAM_OPT_IRQ_NO_SUSPEND	(1UL << 12)

/* BAM device management flags */