From: Thierry Reding <thierry.reding@gmail.com>
To: Sean Young <sean@mess.org>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Shawn Guo" <shawnguo@kernel.org>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Fabio Estevam" <festevam@gmail.com>,
"NXP Linux Team" <linux-imx@nxp.com>,
"Vladimir Zapolskiy" <vz@mleia.com>,
"Conor Dooley" <conor.dooley@microchip.com>,
"Daire McNamara" <daire.mcnamara@microchip.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Fabrice Gasnier" <fabrice.gasnier@foss.st.com>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
"Ivaylo Dimitrov" <ivo.g.dimitrov.75@gmail.com>,
linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-riscv@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com
Subject: Re: [PATCH 1/2] pwm: make it possible to apply pwm changes in atomic context
Date: Fri, 6 Oct 2023 12:29:34 +0200 [thread overview]
Message-ID: <ZR_hjjS1VMAPLYVI@orome.fritz.box> (raw)
In-Reply-To: <1bd5241d584ceb4d6b731c4dc3203fb9686ee1d1.1696156485.git.sean@mess.org>
[-- Attachment #1.1: Type: text/plain, Size: 1515 bytes --]
On Sun, Oct 01, 2023 at 11:40:29AM +0100, Sean Young wrote:
[...]
> diff --git a/include/linux/pwm.h b/include/linux/pwm.h
> index d2f9f690a9c1..c94894ffa4c4 100644
> --- a/include/linux/pwm.h
> +++ b/include/linux/pwm.h
> @@ -287,6 +287,7 @@ struct pwm_ops {
> * @ops: callbacks for this PWM controller
> * @base: number of first PWM controlled by this chip
> * @npwm: number of PWMs controlled by this chip
> + * @can_sleep: can the driver sleep in pwm_apply_state
> * @of_xlate: request a PWM device given a device tree PWM specifier
> * @of_pwm_n_cells: number of cells expected in the device tree PWM specifier
> * @list: list node for internal use
> @@ -297,6 +298,7 @@ struct pwm_chip {
> const struct pwm_ops *ops;
> int base;
> unsigned int npwm;
> + bool can_sleep;
Can we please call this "might_sleep"?
>
> struct pwm_device * (*of_xlate)(struct pwm_chip *chip,
> const struct of_phandle_args *args);
> @@ -380,6 +382,18 @@ static inline void pwm_disable(struct pwm_device *pwm)
> pwm_apply_state(pwm, &state);
> }
>
> +/**
> + * pwm_can_sleep() - can a pwm driver sleep in pwm_apply_state()
> + * @pwm: PWM device
> + *
> + * Returns: true if the driver may sleep, false if pwm_apply_state()
> + * can be called from atomic context.
> + */
> +static inline bool pwm_can_sleep(struct pwm_device *pwm)
And this one pwm_might_sleep()? I don't see why we need to deviate from
the nomenclature that the core introduced.
Thierry
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2023-10-06 10:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1696156485.git.sean@mess.org>
2023-10-01 10:40 ` [PATCH 1/2] pwm: make it possible to apply pwm changes in atomic context Sean Young
2023-10-01 14:43 ` kernel test robot
2023-10-01 16:07 ` kernel test robot
2023-10-01 17:21 ` Sean Young
2023-10-04 9:59 ` Uwe Kleine-König
2023-10-05 8:30 ` Sean Young
2023-10-05 9:17 ` Uwe Kleine-König
2023-10-06 10:27 ` Thierry Reding
2023-10-06 14:44 ` Uwe Kleine-König
2023-10-06 10:29 ` Thierry Reding [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=ZR_hjjS1VMAPLYVI@orome.fritz.box \
--to=thierry.reding@gmail.com \
--cc=alexandre.torgue@foss.st.com \
--cc=conor.dooley@microchip.com \
--cc=daire.mcnamara@microchip.com \
--cc=fabrice.gasnier@foss.st.com \
--cc=festevam@gmail.com \
--cc=ivo.g.dimitrov.75@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=s.hauer@pengutronix.de \
--cc=sean@mess.org \
--cc=shawnguo@kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
--cc=vz@mleia.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;
as well as URLs for NNTP newsgroup(s).