From: Wenhua Lin <Wenhua.Lin@unisoc.com>
To: Linus Walleij <linus.walleij@linaro.org>,
Andy Shevchenko <andy@kernel.org>,
Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Orson Zhai <orsonzhai@gmail.com>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
Chunyan Zhang <zhang.lyra@gmail.com>,
<linux-gpio@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
wenhua lin <wenhua.lin1994@gmail.com>,
Wenhua Lin <Wenhua.Lin@unisoc.com>,
Xiongpeng Wu <xiongpeng.wu@unisoc.com>
Subject: [PATCH V2 2/2] gpio: pmic-eic-sprd: Add can_sleep flag for PMIC EIC chip
Date: Thu, 21 Sep 2023 20:25:27 +0800 [thread overview]
Message-ID: <20230921122527.15261-3-Wenhua.Lin@unisoc.com> (raw)
In-Reply-To: <20230921122527.15261-1-Wenhua.Lin@unisoc.com>
The drivers uses a mutex and I2C bus access in its PMIC EIC chip
get implementation. This means these functions can sleep and the PMIC EIC
chip should set the can_sleep property to true.
This will ensure that a warning is printed when trying to get the
value from a context that potentially can't sleep.
Signed-off-by: Wenhua Lin <Wenhua.Lin@unisoc.com>
---
drivers/gpio/gpio-pmic-eic-sprd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpio/gpio-pmic-eic-sprd.c b/drivers/gpio/gpio-pmic-eic-sprd.c
index 442968bb2490..f04a40288638 100644
--- a/drivers/gpio/gpio-pmic-eic-sprd.c
+++ b/drivers/gpio/gpio-pmic-eic-sprd.c
@@ -353,6 +353,7 @@ static int sprd_pmic_eic_probe(struct platform_device *pdev)
pmic_eic->chip.set_config = sprd_pmic_eic_set_config;
pmic_eic->chip.set = sprd_pmic_eic_set;
pmic_eic->chip.get = sprd_pmic_eic_get;
+ pmic_eic->chip.can_sleep = true;
irq = &pmic_eic->chip.irq;
gpio_irq_chip_set_chip(irq, &pmic_eic_irq_chip);
--
2.17.1
next prev parent reply other threads:[~2023-09-21 19:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-21 12:25 [PATCH V2 0/2] gpio: pmic-eic-sprd: Modification of UNISOC Platform PMIC EIC Driver Wenhua Lin
2023-09-21 12:25 ` [PATCH V2 1/2] gpio: pmic-eic-sprd: Two-dimensional arrays maintain pmic eic Wenhua Lin
2023-09-27 7:21 ` Bartosz Golaszewski
2023-09-27 9:04 ` Baolin Wang
2023-09-27 9:24 ` Chunyan Zhang
2023-09-27 9:49 ` Baolin Wang
2023-09-28 9:00 ` Chunyan Zhang
2024-01-02 7:29 ` wenhua lin
2023-09-21 12:25 ` Wenhua Lin [this message]
2023-09-21 15:39 ` [PATCH V2 2/2] gpio: pmic-eic-sprd: Add can_sleep flag for PMIC EIC chip Andy Shevchenko
2023-09-27 7:13 ` Bartosz Golaszewski
2023-09-27 9:05 ` Baolin Wang
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=20230921122527.15261-3-Wenhua.Lin@unisoc.com \
--to=wenhua.lin@unisoc.com \
--cc=andy@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=orsonzhai@gmail.com \
--cc=wenhua.lin1994@gmail.com \
--cc=xiongpeng.wu@unisoc.com \
--cc=zhang.lyra@gmail.com \
/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
all inboxes | Powered by JetHome®