* [PATCH] pwm: meson: fix mux clock names
@ 2018-08-01 10:57 Jerome Brunet
2018-08-01 10:59 ` Neil Armstrong
2018-08-20 9:32 ` Thierry Reding
0 siblings, 2 replies; 3+ messages in thread
From: Jerome Brunet @ 2018-08-01 10:57 UTC (permalink / raw)
To: linus-amlogic
Current clock name looks like this:
/soc/bus at ffd00000/pwm at 1b000#mux0
This is bad because CCF uses the clock to create a directory in clk debugfs.
With such name, the directory creation (silently) fails and the debugfs
entry end up being created at the debugfs root.
With this change, the clock name will now be:
ffd1b000.pwm#mux0
This matches the clock naming scheme used in the ethernet and mmc driver.
It also fixes the problem with debugfs.
Fixes: 36af66a79056 ("pwm: Convert to using %pOF instead of full_name")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
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 822860b4801a..c1ed641b3e26 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -458,7 +458,6 @@ static int meson_pwm_init_channels(struct meson_pwm *meson,
struct meson_pwm_channel *channels)
{
struct device *dev = meson->chip.dev;
- struct device_node *np = dev->of_node;
struct clk_init_data init;
unsigned int i;
char name[255];
@@ -467,7 +466,7 @@ static int meson_pwm_init_channels(struct meson_pwm *meson,
for (i = 0; i < meson->chip.npwm; i++) {
struct meson_pwm_channel *channel = &channels[i];
- snprintf(name, sizeof(name), "%pOF#mux%u", np, i);
+ snprintf(name, sizeof(name), "%s#mux%u", dev_name(dev), i);
init.name = name;
init.ops = &clk_mux_ops;
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] pwm: meson: fix mux clock names
2018-08-01 10:57 [PATCH] pwm: meson: fix mux clock names Jerome Brunet
@ 2018-08-01 10:59 ` Neil Armstrong
2018-08-20 9:32 ` Thierry Reding
1 sibling, 0 replies; 3+ messages in thread
From: Neil Armstrong @ 2018-08-01 10:59 UTC (permalink / raw)
To: linus-amlogic
On 01/08/2018 12:57, Jerome Brunet wrote:
> Current clock name looks like this:
> /soc/bus at ffd00000/pwm at 1b000#mux0
>
> This is bad because CCF uses the clock to create a directory in clk debugfs.
> With such name, the directory creation (silently) fails and the debugfs
> entry end up being created at the debugfs root.
>
> With this change, the clock name will now be:
> ffd1b000.pwm#mux0
>
> This matches the clock naming scheme used in the ethernet and mmc driver.
> It also fixes the problem with debugfs.
>
> Fixes: 36af66a79056 ("pwm: Convert to using %pOF instead of full_name")
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> ---
> 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 822860b4801a..c1ed641b3e26 100644
> --- a/drivers/pwm/pwm-meson.c
> +++ b/drivers/pwm/pwm-meson.c
> @@ -458,7 +458,6 @@ static int meson_pwm_init_channels(struct meson_pwm *meson,
> struct meson_pwm_channel *channels)
> {
> struct device *dev = meson->chip.dev;
> - struct device_node *np = dev->of_node;
> struct clk_init_data init;
> unsigned int i;
> char name[255];
> @@ -467,7 +466,7 @@ static int meson_pwm_init_channels(struct meson_pwm *meson,
> for (i = 0; i < meson->chip.npwm; i++) {
> struct meson_pwm_channel *channel = &channels[i];
>
> - snprintf(name, sizeof(name), "%pOF#mux%u", np, i);
> + snprintf(name, sizeof(name), "%s#mux%u", dev_name(dev), i);
>
> init.name = name;
> init.ops = &clk_mux_ops;
>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] pwm: meson: fix mux clock names
2018-08-01 10:57 [PATCH] pwm: meson: fix mux clock names Jerome Brunet
2018-08-01 10:59 ` Neil Armstrong
@ 2018-08-20 9:32 ` Thierry Reding
1 sibling, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2018-08-20 9:32 UTC (permalink / raw)
To: linus-amlogic
On Wed, Aug 01, 2018 at 12:57:20PM +0200, Jerome Brunet wrote:
> Current clock name looks like this:
> /soc/bus at ffd00000/pwm at 1b000#mux0
>
> This is bad because CCF uses the clock to create a directory in clk debugfs.
> With such name, the directory creation (silently) fails and the debugfs
> entry end up being created at the debugfs root.
>
> With this change, the clock name will now be:
> ffd1b000.pwm#mux0
>
> This matches the clock naming scheme used in the ethernet and mmc driver.
> It also fixes the problem with debugfs.
>
> Fixes: 36af66a79056 ("pwm: Convert to using %pOF instead of full_name")
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> ---
> drivers/pwm/pwm-meson.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Applied, thanks.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20180820/ac1cf1bd/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-20 9:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-01 10:57 [PATCH] pwm: meson: fix mux clock names Jerome Brunet
2018-08-01 10:59 ` Neil Armstrong
2018-08-20 9:32 ` Thierry Reding
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).