* [PATCH 1/4] pwm: meson: Drop always false check from .request()
@ 2021-11-08 13:46 ` Uwe Kleine-König
0 siblings, 0 replies; 18+ messages in thread
From: Uwe Kleine-König @ 2021-11-08 13:46 UTC (permalink / raw)
To: Thierry Reding, Lee Jones
Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
linux-pwm, linux-amlogic, kernel
In .request() pwm_get_chip_data() returns NULL always since commit
e926b12c611c ("pwm: Clear chip_data in pwm_put()"). (And if it didn't
returning 0 would be wrong because then .request() wouldn't reenable
the clk which the other driver code depends on.)
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/pwm/pwm-meson.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index 3cf3bcf5ddfc..be3c806b57e4 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -120,16 +120,10 @@ static inline struct meson_pwm *to_meson_pwm(struct pwm_chip *chip)
static int meson_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm)
{
struct meson_pwm *meson = to_meson_pwm(chip);
- struct meson_pwm_channel *channel;
+ struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm];
struct device *dev = chip->dev;
int err;
- channel = pwm_get_chip_data(pwm);
- if (channel)
- return 0;
-
- channel = &meson->channels[pwm->hwpwm];
-
if (channel->clk_parent) {
err = clk_set_parent(channel->clk, channel->clk_parent);
if (err < 0) {
base-commit: 6b75d88fa81b122cce37ebf17428a849ccd3d0f1
--
2.30.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 1/4] pwm: meson: Drop always false check from .request()
@ 2021-11-08 13:46 ` Uwe Kleine-König
0 siblings, 0 replies; 18+ messages in thread
From: Uwe Kleine-König @ 2021-11-08 13:46 UTC (permalink / raw)
To: Thierry Reding, Lee Jones
Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
linux-pwm, linux-amlogic, kernel
In .request() pwm_get_chip_data() returns NULL always since commit
e926b12c611c ("pwm: Clear chip_data in pwm_put()"). (And if it didn't
returning 0 would be wrong because then .request() wouldn't reenable
the clk which the other driver code depends on.)
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/pwm/pwm-meson.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index 3cf3bcf5ddfc..be3c806b57e4 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -120,16 +120,10 @@ static inline struct meson_pwm *to_meson_pwm(struct pwm_chip *chip)
static int meson_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm)
{
struct meson_pwm *meson = to_meson_pwm(chip);
- struct meson_pwm_channel *channel;
+ struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm];
struct device *dev = chip->dev;
int err;
- channel = pwm_get_chip_data(pwm);
- if (channel)
- return 0;
-
- channel = &meson->channels[pwm->hwpwm];
-
if (channel->clk_parent) {
err = clk_set_parent(channel->clk, channel->clk_parent);
if (err < 0) {
base-commit: 6b75d88fa81b122cce37ebf17428a849ccd3d0f1
--
2.30.2
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/4] pwm: meson: Drop useless check for channel data being NULL
2021-11-08 13:46 ` Uwe Kleine-König
@ 2021-11-08 13:46 ` Uwe Kleine-König
-1 siblings, 0 replies; 18+ messages in thread
From: Uwe Kleine-König @ 2021-11-08 13:46 UTC (permalink / raw)
To: Thierry Reding, Lee Jones
Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
linux-pwm, linux-amlogic, kernel
In meson_pwm_free() the function pwm_get_chip_data() always returns a
non-NULL pointer because it's only called when the request callback
succeeded and this callback calls pwm_set_chip_data() in this case.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/pwm/pwm-meson.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index be3c806b57e4..1fbe54a2abfe 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -148,8 +148,7 @@ static void meson_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm)
{
struct meson_pwm_channel *channel = pwm_get_chip_data(pwm);
- if (channel)
- clk_disable_unprepare(channel->clk);
+ clk_disable_unprepare(channel->clk);
}
static int meson_pwm_calc(struct meson_pwm *meson, struct pwm_device *pwm,
--
2.30.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/4] pwm: meson: Drop useless check for channel data being NULL
@ 2021-11-08 13:46 ` Uwe Kleine-König
0 siblings, 0 replies; 18+ messages in thread
From: Uwe Kleine-König @ 2021-11-08 13:46 UTC (permalink / raw)
To: Thierry Reding, Lee Jones
Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
linux-pwm, linux-amlogic, kernel
In meson_pwm_free() the function pwm_get_chip_data() always returns a
non-NULL pointer because it's only called when the request callback
succeeded and this callback calls pwm_set_chip_data() in this case.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/pwm/pwm-meson.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index be3c806b57e4..1fbe54a2abfe 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -148,8 +148,7 @@ static void meson_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm)
{
struct meson_pwm_channel *channel = pwm_get_chip_data(pwm);
- if (channel)
- clk_disable_unprepare(channel->clk);
+ clk_disable_unprepare(channel->clk);
}
static int meson_pwm_calc(struct meson_pwm *meson, struct pwm_device *pwm,
--
2.30.2
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 3/4] pwm: meson: Simplify duplicated per-channel tracking
2021-11-08 13:46 ` Uwe Kleine-König
@ 2021-11-08 13:46 ` Uwe Kleine-König
-1 siblings, 0 replies; 18+ messages in thread
From: Uwe Kleine-König @ 2021-11-08 13:46 UTC (permalink / raw)
To: Thierry Reding, Lee Jones
Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
linux-pwm, linux-amlogic, kernel
The driver tracks per-channel data via struct pwm_device::chip_data and
struct meson_pwm::channels[]. The latter holds the actual data, the former
is only a pointer to the latter. So simplify by using struct
meson_pwm::channels[] consistently.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/pwm/pwm-meson.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index 1fbe54a2abfe..908e314c7c00 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -141,12 +141,13 @@ static int meson_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm)
return err;
}
- return pwm_set_chip_data(pwm, channel);
+ return 0;
}
static void meson_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm)
{
- struct meson_pwm_channel *channel = pwm_get_chip_data(pwm);
+ struct meson_pwm *meson = to_meson_pwm(chip);
+ struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm];
clk_disable_unprepare(channel->clk);
}
@@ -154,7 +155,7 @@ static void meson_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm)
static int meson_pwm_calc(struct meson_pwm *meson, struct pwm_device *pwm,
const struct pwm_state *state)
{
- struct meson_pwm_channel *channel = pwm_get_chip_data(pwm);
+ struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm];
unsigned int duty, period, pre_div, cnt, duty_cnt;
unsigned long fin_freq;
@@ -217,7 +218,7 @@ static int meson_pwm_calc(struct meson_pwm *meson, struct pwm_device *pwm,
static void meson_pwm_enable(struct meson_pwm *meson, struct pwm_device *pwm)
{
- struct meson_pwm_channel *channel = pwm_get_chip_data(pwm);
+ struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm];
struct meson_pwm_channel_data *channel_data;
unsigned long flags;
u32 value;
@@ -260,8 +261,8 @@ static void meson_pwm_disable(struct meson_pwm *meson, struct pwm_device *pwm)
static int meson_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
const struct pwm_state *state)
{
- struct meson_pwm_channel *channel = pwm_get_chip_data(pwm);
struct meson_pwm *meson = to_meson_pwm(chip);
+ struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm];
int err = 0;
if (!state)
--
2.30.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 3/4] pwm: meson: Simplify duplicated per-channel tracking
@ 2021-11-08 13:46 ` Uwe Kleine-König
0 siblings, 0 replies; 18+ messages in thread
From: Uwe Kleine-König @ 2021-11-08 13:46 UTC (permalink / raw)
To: Thierry Reding, Lee Jones
Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
linux-pwm, linux-amlogic, kernel
The driver tracks per-channel data via struct pwm_device::chip_data and
struct meson_pwm::channels[]. The latter holds the actual data, the former
is only a pointer to the latter. So simplify by using struct
meson_pwm::channels[] consistently.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/pwm/pwm-meson.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index 1fbe54a2abfe..908e314c7c00 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -141,12 +141,13 @@ static int meson_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm)
return err;
}
- return pwm_set_chip_data(pwm, channel);
+ return 0;
}
static void meson_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm)
{
- struct meson_pwm_channel *channel = pwm_get_chip_data(pwm);
+ struct meson_pwm *meson = to_meson_pwm(chip);
+ struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm];
clk_disable_unprepare(channel->clk);
}
@@ -154,7 +155,7 @@ static void meson_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm)
static int meson_pwm_calc(struct meson_pwm *meson, struct pwm_device *pwm,
const struct pwm_state *state)
{
- struct meson_pwm_channel *channel = pwm_get_chip_data(pwm);
+ struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm];
unsigned int duty, period, pre_div, cnt, duty_cnt;
unsigned long fin_freq;
@@ -217,7 +218,7 @@ static int meson_pwm_calc(struct meson_pwm *meson, struct pwm_device *pwm,
static void meson_pwm_enable(struct meson_pwm *meson, struct pwm_device *pwm)
{
- struct meson_pwm_channel *channel = pwm_get_chip_data(pwm);
+ struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm];
struct meson_pwm_channel_data *channel_data;
unsigned long flags;
u32 value;
@@ -260,8 +261,8 @@ static void meson_pwm_disable(struct meson_pwm *meson, struct pwm_device *pwm)
static int meson_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
const struct pwm_state *state)
{
- struct meson_pwm_channel *channel = pwm_get_chip_data(pwm);
struct meson_pwm *meson = to_meson_pwm(chip);
+ struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm];
int err = 0;
if (!state)
--
2.30.2
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 4/4] pwm: meson: Drop always false check from .apply()
2021-11-08 13:46 ` Uwe Kleine-König
@ 2021-11-08 13:46 ` Uwe Kleine-König
-1 siblings, 0 replies; 18+ messages in thread
From: Uwe Kleine-König @ 2021-11-08 13:46 UTC (permalink / raw)
To: Thierry Reding, Lee Jones
Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
linux-pwm, linux-amlogic, kernel
The pwm core only calls the apply callback with a valid state pointer,
so don't repeat this check already done in the core.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/pwm/pwm-meson.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index 908e314c7c00..57112f438c6d 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -265,9 +265,6 @@ static int meson_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm];
int err = 0;
- if (!state)
- return -EINVAL;
-
if (!state->enabled) {
if (state->polarity == PWM_POLARITY_INVERSED) {
/*
--
2.30.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 4/4] pwm: meson: Drop always false check from .apply()
@ 2021-11-08 13:46 ` Uwe Kleine-König
0 siblings, 0 replies; 18+ messages in thread
From: Uwe Kleine-König @ 2021-11-08 13:46 UTC (permalink / raw)
To: Thierry Reding, Lee Jones
Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
linux-pwm, linux-amlogic, kernel
The pwm core only calls the apply callback with a valid state pointer,
so don't repeat this check already done in the core.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/pwm/pwm-meson.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index 908e314c7c00..57112f438c6d 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -265,9 +265,6 @@ static int meson_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm];
int err = 0;
- if (!state)
- return -EINVAL;
-
if (!state->enabled) {
if (state->polarity == PWM_POLARITY_INVERSED) {
/*
--
2.30.2
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 1/4] pwm: meson: Drop always false check from .request()
2021-11-08 13:46 ` Uwe Kleine-König
@ 2021-11-20 23:34 ` Martin Blumenstingl
-1 siblings, 0 replies; 18+ messages in thread
From: Martin Blumenstingl @ 2021-11-20 23:34 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Thierry Reding, Lee Jones, Neil Armstrong, Kevin Hilman,
Jerome Brunet, linux-pwm, linux-amlogic, kernel
On Mon, Nov 8, 2021 at 2:46 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> In .request() pwm_get_chip_data() returns NULL always since commit
> e926b12c611c ("pwm: Clear chip_data in pwm_put()"). (And if it didn't
> returning 0 would be wrong because then .request() wouldn't reenable
> the clk which the other driver code depends on.)
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/4] pwm: meson: Drop always false check from .request()
@ 2021-11-20 23:34 ` Martin Blumenstingl
0 siblings, 0 replies; 18+ messages in thread
From: Martin Blumenstingl @ 2021-11-20 23:34 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Thierry Reding, Lee Jones, Neil Armstrong, Kevin Hilman,
Jerome Brunet, linux-pwm, linux-amlogic, kernel
On Mon, Nov 8, 2021 at 2:46 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> In .request() pwm_get_chip_data() returns NULL always since commit
> e926b12c611c ("pwm: Clear chip_data in pwm_put()"). (And if it didn't
> returning 0 would be wrong because then .request() wouldn't reenable
> the clk which the other driver code depends on.)
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/4] pwm: meson: Drop useless check for channel data being NULL
2021-11-08 13:46 ` Uwe Kleine-König
@ 2021-11-20 23:34 ` Martin Blumenstingl
-1 siblings, 0 replies; 18+ messages in thread
From: Martin Blumenstingl @ 2021-11-20 23:34 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Thierry Reding, Lee Jones, Neil Armstrong, Kevin Hilman,
Jerome Brunet, linux-pwm, linux-amlogic, kernel
On Mon, Nov 8, 2021 at 2:46 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> In meson_pwm_free() the function pwm_get_chip_data() always returns a
> non-NULL pointer because it's only called when the request callback
> succeeded and this callback calls pwm_set_chip_data() in this case.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/4] pwm: meson: Drop useless check for channel data being NULL
@ 2021-11-20 23:34 ` Martin Blumenstingl
0 siblings, 0 replies; 18+ messages in thread
From: Martin Blumenstingl @ 2021-11-20 23:34 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Thierry Reding, Lee Jones, Neil Armstrong, Kevin Hilman,
Jerome Brunet, linux-pwm, linux-amlogic, kernel
On Mon, Nov 8, 2021 at 2:46 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> In meson_pwm_free() the function pwm_get_chip_data() always returns a
> non-NULL pointer because it's only called when the request callback
> succeeded and this callback calls pwm_set_chip_data() in this case.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/4] pwm: meson: Simplify duplicated per-channel tracking
2021-11-08 13:46 ` Uwe Kleine-König
@ 2021-11-20 23:35 ` Martin Blumenstingl
-1 siblings, 0 replies; 18+ messages in thread
From: Martin Blumenstingl @ 2021-11-20 23:35 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Thierry Reding, Lee Jones, Neil Armstrong, Kevin Hilman,
Jerome Brunet, linux-pwm, linux-amlogic, kernel
On Mon, Nov 8, 2021 at 2:46 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> The driver tracks per-channel data via struct pwm_device::chip_data and
> struct meson_pwm::channels[]. The latter holds the actual data, the former
> is only a pointer to the latter. So simplify by using struct
> meson_pwm::channels[] consistently.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
note to self: this patch is complete because the first patch in this
series already removes one usage of pwm_get_chip_data
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/4] pwm: meson: Simplify duplicated per-channel tracking
@ 2021-11-20 23:35 ` Martin Blumenstingl
0 siblings, 0 replies; 18+ messages in thread
From: Martin Blumenstingl @ 2021-11-20 23:35 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Thierry Reding, Lee Jones, Neil Armstrong, Kevin Hilman,
Jerome Brunet, linux-pwm, linux-amlogic, kernel
On Mon, Nov 8, 2021 at 2:46 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> The driver tracks per-channel data via struct pwm_device::chip_data and
> struct meson_pwm::channels[]. The latter holds the actual data, the former
> is only a pointer to the latter. So simplify by using struct
> meson_pwm::channels[] consistently.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
note to self: this patch is complete because the first patch in this
series already removes one usage of pwm_get_chip_data
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 4/4] pwm: meson: Drop always false check from .apply()
2021-11-08 13:46 ` Uwe Kleine-König
@ 2021-11-20 23:35 ` Martin Blumenstingl
-1 siblings, 0 replies; 18+ messages in thread
From: Martin Blumenstingl @ 2021-11-20 23:35 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Thierry Reding, Lee Jones, Neil Armstrong, Kevin Hilman,
Jerome Brunet, linux-pwm, linux-amlogic, kernel
On Mon, Nov 8, 2021 at 2:46 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> The pwm core only calls the apply callback with a valid state pointer,
> so don't repeat this check already done in the core.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 4/4] pwm: meson: Drop always false check from .apply()
@ 2021-11-20 23:35 ` Martin Blumenstingl
0 siblings, 0 replies; 18+ messages in thread
From: Martin Blumenstingl @ 2021-11-20 23:35 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Thierry Reding, Lee Jones, Neil Armstrong, Kevin Hilman,
Jerome Brunet, linux-pwm, linux-amlogic, kernel
On Mon, Nov 8, 2021 at 2:46 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> The pwm core only calls the apply callback with a valid state pointer,
> so don't repeat this check already done in the core.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/4] pwm: meson: Drop always false check from .request()
2021-11-08 13:46 ` Uwe Kleine-König
@ 2022-02-01 7:47 ` Thierry Reding
-1 siblings, 0 replies; 18+ messages in thread
From: Thierry Reding @ 2022-02-01 7:47 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Lee Jones, Neil Armstrong, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl, linux-pwm, linux-amlogic, kernel
[-- Attachment #1: Type: text/plain, Size: 555 bytes --]
On Mon, Nov 08, 2021 at 02:46:24PM +0100, Uwe Kleine-König wrote:
> In .request() pwm_get_chip_data() returns NULL always since commit
> e926b12c611c ("pwm: Clear chip_data in pwm_put()"). (And if it didn't
> returning 0 would be wrong because then .request() wouldn't reenable
> the clk which the other driver code depends on.)
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> drivers/pwm/pwm-meson.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
All four patches applied, thanks.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/4] pwm: meson: Drop always false check from .request()
@ 2022-02-01 7:47 ` Thierry Reding
0 siblings, 0 replies; 18+ messages in thread
From: Thierry Reding @ 2022-02-01 7:47 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Lee Jones, Neil Armstrong, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl, linux-pwm, linux-amlogic, kernel
[-- Attachment #1.1: Type: text/plain, Size: 555 bytes --]
On Mon, Nov 08, 2021 at 02:46:24PM +0100, Uwe Kleine-König wrote:
> In .request() pwm_get_chip_data() returns NULL always since commit
> e926b12c611c ("pwm: Clear chip_data in pwm_put()"). (And if it didn't
> returning 0 would be wrong because then .request() wouldn't reenable
> the clk which the other driver code depends on.)
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> drivers/pwm/pwm-meson.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
All four patches applied, thanks.
Thierry
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2022-02-01 7:48 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-08 13:46 [PATCH 1/4] pwm: meson: Drop always false check from .request() Uwe Kleine-König
2021-11-08 13:46 ` Uwe Kleine-König
2021-11-08 13:46 ` [PATCH 2/4] pwm: meson: Drop useless check for channel data being NULL Uwe Kleine-König
2021-11-08 13:46 ` Uwe Kleine-König
2021-11-20 23:34 ` Martin Blumenstingl
2021-11-20 23:34 ` Martin Blumenstingl
2021-11-08 13:46 ` [PATCH 3/4] pwm: meson: Simplify duplicated per-channel tracking Uwe Kleine-König
2021-11-08 13:46 ` Uwe Kleine-König
2021-11-20 23:35 ` Martin Blumenstingl
2021-11-20 23:35 ` Martin Blumenstingl
2021-11-08 13:46 ` [PATCH 4/4] pwm: meson: Drop always false check from .apply() Uwe Kleine-König
2021-11-08 13:46 ` Uwe Kleine-König
2021-11-20 23:35 ` Martin Blumenstingl
2021-11-20 23:35 ` Martin Blumenstingl
2021-11-20 23:34 ` [PATCH 1/4] pwm: meson: Drop always false check from .request() Martin Blumenstingl
2021-11-20 23:34 ` Martin Blumenstingl
2022-02-01 7:47 ` Thierry Reding
2022-02-01 7:47 ` Thierry Reding
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.