From: Sasha Levin <Alexander.Levin@microsoft.com>
To: "stable@vger.kernel.org" <stable@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Mark Brown <broonie@kernel.org>,
Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
Sasha Levin <Alexander.Levin@microsoft.com>
Subject: [PATCH AUTOSEL 4.9 33/62] tpm_tis_spi: Pass the SPI IRQ down to the driver
Date: Sun, 2 Sep 2018 13:14:45 +0000 [thread overview]
Message-ID: <20180902131411.183978-23-alexander.levin@microsoft.com> (raw)
In-Reply-To: <20180902131411.183978-1-alexander.levin@microsoft.com>
From: Linus Walleij <linus.walleij@linaro.org>
[ Upstream commit 1a339b658d9dbe1471f67b78237cf8fa08bbbeb5 ]
An SPI TPM device managed directly on an embedded board using
the SPI bus and some GPIO or similar line as IRQ handler will
pass the IRQn from the TPM device associated with the SPI
device. This is already handled by the SPI core, so make sure
to pass this down to the core as well.
(The TPM core habit of using -1 to signal no IRQ is dubious
(as IRQ 0 is NO_IRQ) but I do not want to mess with that
semantic in this patch.)
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
---
drivers/char/tpm/tpm_tis_spi.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/char/tpm/tpm_tis_spi.c b/drivers/char/tpm/tpm_tis_spi.c
index 01eccb193b5a..950c2d28d81d 100644
--- a/drivers/char/tpm/tpm_tis_spi.c
+++ b/drivers/char/tpm/tpm_tis_spi.c
@@ -189,6 +189,7 @@ static const struct tpm_tis_phy_ops tpm_spi_phy_ops = {
static int tpm_tis_spi_probe(struct spi_device *dev)
{
struct tpm_tis_spi_phy *phy;
+ int irq;
phy = devm_kzalloc(&dev->dev, sizeof(struct tpm_tis_spi_phy),
GFP_KERNEL);
@@ -201,7 +202,13 @@ static int tpm_tis_spi_probe(struct spi_device *dev)
if (!phy->iobuf)
return -ENOMEM;
- return tpm_tis_core_init(&dev->dev, &phy->priv, -1, &tpm_spi_phy_ops,
+ /* If the SPI device has an IRQ then use that */
+ if (dev->irq > 0)
+ irq = dev->irq;
+ else
+ irq = -1;
+
+ return tpm_tis_core_init(&dev->dev, &phy->priv, irq, &tpm_spi_phy_ops,
NULL);
}
--
2.17.1
next prev parent reply other threads:[~2018-09-02 17:30 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-02 13:14 [PATCH AUTOSEL 4.9 11/62] uio: potential double frees if __uio_register_device() fails Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 12/62] tty: rocket: Fix possible buffer overwrite on register_PCI Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 13/62] f2fs: do not set free of current section Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 14/62] perf tools: Allow overriding MAX_NR_CPUS at compile time Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 15/62] NFSv4.0 fix client reference leak in callback Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 16/62] fbdev/core: Disable console-lock warnings when fb.lockless_register_fb is set Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 17/62] macintosh/via-pmu: Add missing mmio accessors Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 18/62] ath9k: report tx status on EOSP Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 19/62] ath9k_hw: fix channel maximum power level test Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 20/62] ath10k: prevent active scans on potential unusable channels Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 21/62] wlcore: Set rx_status boottime_ns field on rx Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 22/62] MIPS: Fix ISA virt/bus conversion for non-zero PHYS_OFFSET Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 23/62] ata: libahci: Correct setting of DEVSLP register Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 24/62] scsi: 3ware: fix return 0 on the error path of probe Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 25/62] ath10k: disable bundle mgmt tx completion event support Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 26/62] Bluetooth: hidp: Fix handling of strncpy for hid->name information Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 27/62] x86/mm: Remove in_nmi() warning from vmalloc_fault() Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 28/62] x86/kexec: Allocate 8k PGDs for PTI Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 29/62] gpio: ml-ioh: Fix buffer underwrite on probe error path Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 30/62] net: mvneta: fix mtu change on port without link Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 31/62] f2fs: try grabbing node page lock aggressively in sync scenario Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 32/62] f2fs: fix to skip GC if type in SSA and SIT is inconsistent Sasha Levin
2018-09-02 13:14 ` Sasha Levin [this message]
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 34/62] tpm/tpm_i2c_infineon: switch to i2c_lock_bus(..., I2C_LOCK_SEGMENT) Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 35/62] f2fs: fix to do sanity check with reserved blkaddr of inline inode Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 36/62] MIPS: Octeon: add missing of_node_put() Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 37/62] MIPS: generic: fix " Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 38/62] iio: ad9523: Fix return value for ad952x_store() Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 39/62] net: dcb: For wild-card lookups, use priority -1, not 0 Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 40/62] Input: atmel_mxt_ts - only use first T9 instance Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 41/62] iommu/dma: Respect bus DMA limit for IOVAs Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 42/62] media: s5p-mfc: Fix buffer look up in s5p_mfc_handle_frame_{new, copy_time} functions Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 43/62] partitions/aix: append null character to print data from disk Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 44/62] partitions/aix: fix usage of uninitialized lv_info and lvname structures Sasha Levin
2018-09-02 13:14 ` [PATCH AUTOSEL 4.9 45/62] media: helene: fix xtal frequency setting at power on Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.9 46/62] f2fs: Fix uninitialized return in f2fs_ioc_shutdown() Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.9 47/62] media: em28xx: Fix DualHD disconnect oops Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.9 48/62] iommu/ipmmu-vmsa: Fix allocation in atomic context Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.9 49/62] mfd: ti_am335x_tscadc: Fix struct clk memory leak Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.9 50/62] f2fs: fix to do sanity check with {sit,nat}_ver_bitmap_bytesize Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.9 51/62] ALSA: riptide: Properly endian notations Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.9 52/62] ALSA: wss: Fix sparse warning wrt PCM format type Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.9 53/62] ALSA: sb: Fix PCM format bit calculation Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.9 54/62] ALSA: asihpi: Fix PCM format notations Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.9 55/62] ALSA: ad1816a: Fix sparse warning wrt PCM format type Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.9 56/62] ALSA: hda: Fix implicit PCM format type conversion Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.9 57/62] ALSA: au88x0: Fix sparse warning wrt PCM format type Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.9 58/62] ALSA: sb: " Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.9 59/62] NFSv4.1: Fix a potential layoutget/layoutrecall deadlock Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.9 60/62] MIPS: WARN_ON invalid DMA cache maintenance, not BUG_ON Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.9 61/62] RDMA/cma: Do not ignore net namespace for unbound cm_id Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.9 62/62] fuse: Add missed unlock_page() to fuse_readpages_fill() Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180902131411.183978-23-alexander.levin@microsoft.com \
--to=alexander.levin@microsoft.com \
--cc=broonie@kernel.org \
--cc=jarkko.sakkinen@linux.intel.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).