linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Nikita Shubin <nikita.shubin@maquefel.me>,
	Alexander Sverdlin <alexander.sverdlin@gmail.com>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: [PATCH 5.10 005/104] gpio: ep93xx: Fix single irqchip with multi gpiochips
Date: Mon, 15 Feb 2021 16:26:18 +0100	[thread overview]
Message-ID: <20210215152719.643118977@linuxfoundation.org> (raw)
In-Reply-To: <20210215152719.459796636@linuxfoundation.org>

From: Nikita Shubin <nikita.shubin@maquefel.me>

commit 28dc10eb77a2db7681b08e3b109764bbe469e347 upstream.

Fixes the following warnings which results in interrupts disabled on
port B/F:

gpio gpiochip1: (B): detected irqchip that is shared with multiple gpiochips: please fix the driver.
gpio gpiochip5: (F): detected irqchip that is shared with multiple gpiochips: please fix the driver.

- added separate irqchip for each interrupt capable gpiochip
- provided unique names for each irqchip

Fixes: d2b091961510 ("gpio: ep93xx: Pass irqchip when adding gpiochip")
Cc: <stable@vger.kernel.org>
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpio/gpio-ep93xx.c |   30 +++++++++++++++++++-----------
 1 file changed, 19 insertions(+), 11 deletions(-)

--- a/drivers/gpio/gpio-ep93xx.c
+++ b/drivers/gpio/gpio-ep93xx.c
@@ -38,6 +38,7 @@
 #define EP93XX_GPIO_F_IRQ_BASE 80
 
 struct ep93xx_gpio_irq_chip {
+	struct irq_chip ic;
 	u8 irq_offset;
 	u8 int_unmasked;
 	u8 int_enabled;
@@ -263,15 +264,6 @@ static int ep93xx_gpio_irq_type(struct i
 	return 0;
 }
 
-static struct irq_chip ep93xx_gpio_irq_chip = {
-	.name		= "GPIO",
-	.irq_ack	= ep93xx_gpio_irq_ack,
-	.irq_mask_ack	= ep93xx_gpio_irq_mask_ack,
-	.irq_mask	= ep93xx_gpio_irq_mask,
-	.irq_unmask	= ep93xx_gpio_irq_unmask,
-	.irq_set_type	= ep93xx_gpio_irq_type,
-};
-
 /*************************************************************************
  * gpiolib interface for EP93xx on-chip GPIOs
  *************************************************************************/
@@ -331,6 +323,15 @@ static int ep93xx_gpio_f_to_irq(struct g
 	return EP93XX_GPIO_F_IRQ_BASE + offset;
 }
 
+static void ep93xx_init_irq_chip(struct device *dev, struct irq_chip *ic)
+{
+	ic->irq_ack = ep93xx_gpio_irq_ack;
+	ic->irq_mask_ack = ep93xx_gpio_irq_mask_ack;
+	ic->irq_mask = ep93xx_gpio_irq_mask;
+	ic->irq_unmask = ep93xx_gpio_irq_unmask;
+	ic->irq_set_type = ep93xx_gpio_irq_type;
+}
+
 static int ep93xx_gpio_add_bank(struct ep93xx_gpio_chip *egc,
 				struct platform_device *pdev,
 				struct ep93xx_gpio *epg,
@@ -352,6 +353,8 @@ static int ep93xx_gpio_add_bank(struct e
 
 	girq = &gc->irq;
 	if (bank->has_irq || bank->has_hierarchical_irq) {
+		struct irq_chip *ic;
+
 		gc->set_config = ep93xx_gpio_set_config;
 		egc->eic = devm_kcalloc(dev, 1,
 					sizeof(*egc->eic),
@@ -359,7 +362,12 @@ static int ep93xx_gpio_add_bank(struct e
 		if (!egc->eic)
 			return -ENOMEM;
 		egc->eic->irq_offset = bank->irq;
-		girq->chip = &ep93xx_gpio_irq_chip;
+		ic = &egc->eic->ic;
+		ic->name = devm_kasprintf(dev, GFP_KERNEL, "gpio-irq-%s", bank->label);
+		if (!ic->name)
+			return -ENOMEM;
+		ep93xx_init_irq_chip(dev, ic);
+		girq->chip = ic;
 	}
 
 	if (bank->has_irq) {
@@ -401,7 +409,7 @@ static int ep93xx_gpio_add_bank(struct e
 			gpio_irq = EP93XX_GPIO_F_IRQ_BASE + i;
 			irq_set_chip_data(gpio_irq, &epg->gc[5]);
 			irq_set_chip_and_handler(gpio_irq,
-						 &ep93xx_gpio_irq_chip,
+						 girq->chip,
 						 handle_level_irq);
 			irq_clear_status_flags(gpio_irq, IRQ_NOREQUEST);
 		}



  parent reply	other threads:[~2021-02-15 16:28 UTC|newest]

Thread overview: 121+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-15 15:26 [PATCH 5.10 000/104] 5.10.17-rc1 review Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 001/104] objtool: Fix seg fault with Clang non-section symbols Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 002/104] Revert "dts: phy: add GPIO number and active state used for phy reset" Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 003/104] gpio: mxs: GPIO_MXS should not default to y unconditionally Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 004/104] gpio: ep93xx: fix BUG_ON port F usage Greg Kroah-Hartman
2021-02-15 15:26 ` Greg Kroah-Hartman [this message]
2021-02-15 15:26 ` [PATCH 5.10 006/104] tracing: Do not count ftrace events in top level enable output Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 007/104] tracing: Check length before giving out the filter buffer Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 008/104] drm/i915: Fix overlay frontbuffer tracking Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 009/104] arm/xen: Dont probe xenbus as part of an early initcall Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 010/104] cgroup: fix psi monitor for root cgroup Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 011/104] Revert "drm/amd/display: Update NV1x SR latency values" Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 012/104] drm/i915/tgl+: Make sure TypeC FIA is powered up when initializing it Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 013/104] drm/dp_mst: Dont report ports connected if nothing is attached to them Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 014/104] dmaengine: move channel device_node deletion to driver Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 015/104] tmpfs: disallow CONFIG_TMPFS_INODE64 on s390 Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 016/104] tmpfs: disallow CONFIG_TMPFS_INODE64 on alpha Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 017/104] soc: ti: omap-prm: Fix boot time errors for rst_map_012 bits 0 and 1 Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 018/104] arm64: dts: rockchip: Fix PCIe DT properties on rk3399 Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 019/104] arm64: dts: qcom: sdm845: Reserve LPASS clocks in gcc Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 020/104] ARM: OMAP2+: Fix suspcious RCU usage splats for omap_enter_idle_coupled Greg Kroah-Hartman
2021-02-19 21:14   ` Pavel Machek
2021-02-19 21:26     ` Paul E. McKenney
2021-02-15 15:26 ` [PATCH 5.10 021/104] arm64: dts: rockchip: remove interrupt-names property from rk3399 vdec node Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 022/104] kbuild: simplify GCC_PLUGINS enablement in dummy-tools/gcc Greg Kroah-Hartman
2021-02-17  9:08   ` Pavel Machek
2021-02-17  9:28     ` Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 023/104] platform/x86: hp-wmi: Disable tablet-mode reporting by default Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 024/104] arm64: dts: rockchip: Disable display for NanoPi R2S Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 025/104] ovl: perform vfs_getxattr() with mounter creds Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 026/104] cap: fix conversions on getxattr Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 027/104] ovl: skip getxattr of security labels Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 028/104] scsi: lpfc: Fix EEH encountering oops with NVMe traffic Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 029/104] x86/split_lock: Enable the split lock feature on another Alder Lake CPU Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 030/104] nvme-pci: ignore the subsysem NQN on Phison E16 Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 031/104] drm/amd/display: Fix DPCD translation for LTTPR AUX_RD_INTERVAL Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 032/104] drm/amd/display: Add more Clock Sources to DCN2.1 Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 033/104] drm/amd/display: Release DSC before acquiring Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 034/104] drm/amd/display: Fix dc_sink kref count in emulated_link_detect Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 035/104] drm/amd/display: Free atomic state after drm_atomic_commit Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 036/104] drm/amd/display: Decrement refcount of dc_sink before reassignment Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 037/104] riscv: virt_addr_valid must check the address belongs to linear mapping Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 038/104] bfq-iosched: Revert "bfq: Fix computation of shallow depth" Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 039/104] ARM: dts: lpc32xx: Revert set default clock rate of HCLK PLL Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 040/104] kallsyms: fix nonconverging kallsyms table with lld Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 041/104] ARM: ensure the signal page contains defined contents Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 042/104] ARM: kexec: fix oops after TLB are invalidated Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 043/104] kasan: add explicit preconditions to kasan_report() Greg Kroah-Hartman
2021-02-16 11:50   ` Pavel Machek
2021-02-17  9:26     ` Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 044/104] ubsan: implement __ubsan_handle_alignment_assumption Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 045/104] Revert "lib: Restrict cpumask_local_spread to houskeeping CPUs" Greg Kroah-Hartman
2021-02-15 15:26 ` [PATCH 5.10 046/104] x86/efi: Remove EFI PGD build time checks Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 047/104] lkdtm: dont move ctors to .rodata Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 048/104] KVM: x86: cleanup CR3 reserved bits checks Greg Kroah-Hartman
2021-02-15 18:46   ` Pavel Machek
2021-02-15 19:04     ` Paolo Bonzini
2021-02-15 15:27 ` [PATCH 5.10 049/104] cgroup-v1: add disabled controller check in cgroup1_parse_param() Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 050/104] dmaengine: idxd: fix misc interrupt completion Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 051/104] ath9k: fix build error with LEDS_CLASS=m Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 052/104] mt76: dma: fix a possible memory leak in mt76_add_fragment() Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 053/104] drm/vc4: hvs: Fix buffer overflow with the dlist handling Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 054/104] dmaengine: idxd: check device state before issue command Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 055/104] bpf: Unbreak BPF_PROG_TYPE_KPROBE when kprobe is called via do_int3 Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 056/104] bpf: Check for integer overflow when using roundup_pow_of_two() Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 057/104] netfilter: xt_recent: Fix attempt to update deleted entry Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 058/104] selftests: netfilter: fix current year Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 059/104] netfilter: nftables: fix possible UAF over chains from packet path in netns Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 060/104] netfilter: flowtable: fix tcp and udp header checksum update Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 061/104] xen/netback: avoid race in xenvif_rx_ring_slots_available() Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 062/104] net: hdlc_x25: Return meaningful error code in x25_open Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 063/104] net: ipa: set error code in gsi_channel_setup() Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 064/104] hv_netvsc: Reset the RSC count if NVSP_STAT_FAIL in netvsc_receive() Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 065/104] net: enetc: initialize the RFS and RSS memories Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 066/104] selftests: txtimestamp: fix compilation issue Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 067/104] net: stmmac: set TxQ mode back to DCB after disabling CBS Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 068/104] ibmvnic: Clear failover_pending if unable to schedule Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 069/104] netfilter: conntrack: skip identical origin tuple in same zone only Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 070/104] scsi: scsi_debug: Fix a memory leak Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 071/104] x86/build: Disable CET instrumentation in the kernel for 32-bit too Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 072/104] net: dsa: felix: implement port flushing on .phylink_mac_link_down Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 073/104] net: hns3: add a check for queue_id in hclge_reset_vf_queue() Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 074/104] net: hns3: add a check for tqp_index in hclge_get_ring_chain_from_mbx() Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 075/104] net: hns3: add a check for index in hclge_get_rss_key() Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 076/104] firmware_loader: align .builtin_fw to 8 Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 077/104] drm/sun4i: tcon: set sync polarity for tcon1 channel Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 078/104] drm/sun4i: dw-hdmi: always set clock rate Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 079/104] drm/sun4i: Fix H6 HDMI PHY configuration Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 080/104] drm/sun4i: dw-hdmi: Fix max. frequency for H6 Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 081/104] clk: sunxi-ng: mp: fix parent rate change flag check Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 082/104] i2c: stm32f7: fix configuration of the digital filter Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 083/104] h8300: fix PREEMPTION build, TI_PRE_COUNT undefined Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 084/104] scripts: set proper OpenSSL include dir also for sign-file Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 085/104] x86/pci: Create PCI/MSI irqdomain after x86_init.pci.arch_init() Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 086/104] arm64: mte: Allow PTRACE_PEEKMTETAGS access to the zero page Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 087/104] rxrpc: Fix clearance of Tx/Rx ring when releasing a call Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 088/104] udp: fix skb_copy_and_csum_datagram with odd segment sizes Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 089/104] net: dsa: call teardown method on probe failure Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 090/104] cpufreq: ACPI: Extend frequency tables to cover boost frequencies Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 091/104] cpufreq: ACPI: Update arch scale-invariance max perf ratio if CPPC is not there Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 092/104] net: gro: do not keep too many GRO packets in napi->rx_list Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 093/104] net: fix iteration for sctp transport seq_files Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 094/104] net/vmw_vsock: fix NULL pointer dereference Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 095/104] net/vmw_vsock: improve locking in vsock_connect_timeout() Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 096/104] net: watchdog: hold device global xmit lock during tx disable Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 097/104] bridge: mrp: Fix the usage of br_mrp_port_switchdev_set_state Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 098/104] switchdev: mrp: Remove SWITCHDEV_ATTR_ID_MRP_PORT_STAT Greg Kroah-Hartman
2021-02-16 21:35   ` Pavel Machek
2021-02-16 22:08     ` Horatiu Vultur
2021-02-17 19:27       ` Pavel Machek
2021-02-15 15:27 ` [PATCH 5.10 099/104] vsock/virtio: update credit only if socket is not closed Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 100/104] vsock: fix locking in vsock_shutdown() Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 101/104] net/rds: restrict iovecs length for RDS_CMSG_RDMA_ARGS Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 102/104] net/qrtr: restrict user-controlled length in qrtr_tun_write_iter() Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 103/104] ovl: expand warning in ovl_d_real() Greg Kroah-Hartman
2021-02-15 15:27 ` [PATCH 5.10 104/104] kcov, usb: only collect coverage from __usb_hcd_giveback_urb in softirq Greg Kroah-Hartman
2021-02-15 20:29 ` [PATCH 5.10 000/104] 5.10.17-rc1 review Pavel Machek
2021-02-16  4:08 ` Naresh Kamboju
2021-02-16 18:50 ` Guenter Roeck
2021-02-16 22:28 ` Shuah Khan
2021-02-17  1:19 ` Ross Schmidt

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=20210215152719.643118977@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=alexander.sverdlin@gmail.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nikita.shubin@maquefel.me \
    --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).