From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: Wenhua Lin <Wenhua.Lin@unisoc.com>,
Linus Walleij <linus.walleij@linaro.org>,
Andy Shevchenko <andy@kernel.org>,
Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Orson Zhai <orsonzhai@gmail.com>,
Chunyan Zhang <zhang.lyra@gmail.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
wenhua lin <wenhua.lin1994@gmail.com>,
Xiongpeng Wu <xiongpeng.wu@unisoc.com>
Subject: Re: [PATCH V2 2/2] gpio: pmic-eic-sprd: Add can_sleep flag for PMIC EIC chip
Date: Wed, 27 Sep 2023 17:05:10 +0800 [thread overview]
Message-ID: <fdf63e0d-e342-3506-e441-c898c29569c4@linux.alibaba.com> (raw)
In-Reply-To: <20230921122527.15261-3-Wenhua.Lin@unisoc.com>
On 9/21/2023 8:25 PM, Wenhua Lin wrote:
> 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.
LGTM.
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
> 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);
prev parent reply other threads:[~2023-09-27 9:05 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 ` [PATCH V2 2/2] gpio: pmic-eic-sprd: Add can_sleep flag for PMIC EIC chip Wenhua Lin
2023-09-21 15:39 ` Andy Shevchenko
2023-09-27 7:13 ` Bartosz Golaszewski
2023-09-27 9:05 ` Baolin Wang [this message]
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=fdf63e0d-e342-3506-e441-c898c29569c4@linux.alibaba.com \
--to=baolin.wang@linux.alibaba.com \
--cc=Wenhua.Lin@unisoc.com \
--cc=andy@kernel.org \
--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