All of lore.kernel.org
 help / color / mirror / Atom feed
From: jic23@kernel.org (Jonathan Cameron)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH 1/1] iio: adc: meson-saradc: fix internal clock names
Date: Sun, 25 Nov 2018 10:43:20 +0000	[thread overview]
Message-ID: <20181125104320.06d65625@archlinux> (raw)
In-Reply-To: <20181122220111.28808-2-martin.blumenstingl@googlemail.com>

On Thu, 22 Nov 2018 23:01:11 +0100
Martin Blumenstingl <martin.blumenstingl@googlemail.com> wrote:

> Before this patch we are registering the internal clocks (for example on
> Meson8b, where the SAR ADC IP block implements the divider and gate
> clocks) with the following names:
> - /soc/cbus at c1100000/adc at 8680#adc_div
> - /soc/cbus at c1100000/adc at 8680#adc_en
> 
> This is bad because the common clock framework uses the clock to create
> a directory in <debugfs>/clk. With such name, the directory creation
> (silently) fails and the debugfs entry ends up being created at the
> debugfs root.
> 
> With this change, the new clock names are:
> - c1108680.adc#adc_div
> - c1108680.adc#adc_en
> 
> This matches the clock naming scheme used in the PWM, Ethernet and MMC
> drivers. It also fixes the problem with debugfs.
> The idea is shamelessly taken from commit b96e9eb62841c5 ("pwm: meson:
> Fix mux clock names").
> 
> Fixes: 3921db46a8c5bc ("iio: Convert to using %pOF instead of full_name")
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
As this is debugfs I am not going to push this through the fast path.

Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to play with it.

Thanks,

Jonathan

> ---
>  drivers/iio/adc/meson_saradc.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c
> index 6155d26091eb..729becb2d3d9 100644
> --- a/drivers/iio/adc/meson_saradc.c
> +++ b/drivers/iio/adc/meson_saradc.c
> @@ -656,8 +656,8 @@ static int meson_sar_adc_clk_init(struct iio_dev *indio_dev,
>  	struct clk_init_data init;
>  	const char *clk_parents[1];
>  
> -	init.name = devm_kasprintf(&indio_dev->dev, GFP_KERNEL, "%pOF#adc_div",
> -				   indio_dev->dev.of_node);
> +	init.name = devm_kasprintf(&indio_dev->dev, GFP_KERNEL, "%s#adc_div",
> +				   dev_name(indio_dev->dev.parent));
>  	if (!init.name)
>  		return -ENOMEM;
>  
> @@ -678,8 +678,8 @@ static int meson_sar_adc_clk_init(struct iio_dev *indio_dev,
>  	if (WARN_ON(IS_ERR(priv->adc_div_clk)))
>  		return PTR_ERR(priv->adc_div_clk);
>  
> -	init.name = devm_kasprintf(&indio_dev->dev, GFP_KERNEL, "%pOF#adc_en",
> -				   indio_dev->dev.of_node);
> +	init.name = devm_kasprintf(&indio_dev->dev, GFP_KERNEL, "%s#adc_en",
> +				   dev_name(indio_dev->dev.parent));
>  	if (!init.name)
>  		return -ENOMEM;
>  

WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23@kernel.org>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net,
	linux-iio@vger.kernel.org, linux-amlogic@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] iio: adc: meson-saradc: fix internal clock names
Date: Sun, 25 Nov 2018 10:43:20 +0000	[thread overview]
Message-ID: <20181125104320.06d65625@archlinux> (raw)
In-Reply-To: <20181122220111.28808-2-martin.blumenstingl@googlemail.com>

On Thu, 22 Nov 2018 23:01:11 +0100
Martin Blumenstingl <martin.blumenstingl@googlemail.com> wrote:

> Before this patch we are registering the internal clocks (for example on
> Meson8b, where the SAR ADC IP block implements the divider and gate
> clocks) with the following names:
> - /soc/cbus@c1100000/adc@8680#adc_div
> - /soc/cbus@c1100000/adc@8680#adc_en
> 
> This is bad because the common clock framework uses the clock to create
> a directory in <debugfs>/clk. With such name, the directory creation
> (silently) fails and the debugfs entry ends up being created at the
> debugfs root.
> 
> With this change, the new clock names are:
> - c1108680.adc#adc_div
> - c1108680.adc#adc_en
> 
> This matches the clock naming scheme used in the PWM, Ethernet and MMC
> drivers. It also fixes the problem with debugfs.
> The idea is shamelessly taken from commit b96e9eb62841c5 ("pwm: meson:
> Fix mux clock names").
> 
> Fixes: 3921db46a8c5bc ("iio: Convert to using %pOF instead of full_name")
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
As this is debugfs I am not going to push this through the fast path.

Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to play with it.

Thanks,

Jonathan

> ---
>  drivers/iio/adc/meson_saradc.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c
> index 6155d26091eb..729becb2d3d9 100644
> --- a/drivers/iio/adc/meson_saradc.c
> +++ b/drivers/iio/adc/meson_saradc.c
> @@ -656,8 +656,8 @@ static int meson_sar_adc_clk_init(struct iio_dev *indio_dev,
>  	struct clk_init_data init;
>  	const char *clk_parents[1];
>  
> -	init.name = devm_kasprintf(&indio_dev->dev, GFP_KERNEL, "%pOF#adc_div",
> -				   indio_dev->dev.of_node);
> +	init.name = devm_kasprintf(&indio_dev->dev, GFP_KERNEL, "%s#adc_div",
> +				   dev_name(indio_dev->dev.parent));
>  	if (!init.name)
>  		return -ENOMEM;
>  
> @@ -678,8 +678,8 @@ static int meson_sar_adc_clk_init(struct iio_dev *indio_dev,
>  	if (WARN_ON(IS_ERR(priv->adc_div_clk)))
>  		return PTR_ERR(priv->adc_div_clk);
>  
> -	init.name = devm_kasprintf(&indio_dev->dev, GFP_KERNEL, "%pOF#adc_en",
> -				   indio_dev->dev.of_node);
> +	init.name = devm_kasprintf(&indio_dev->dev, GFP_KERNEL, "%s#adc_en",
> +				   dev_name(indio_dev->dev.parent));
>  	if (!init.name)
>  		return -ENOMEM;
>  

WARNING: multiple messages have this Message-ID (diff)
From: jic23@kernel.org (Jonathan Cameron)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/1] iio: adc: meson-saradc: fix internal clock names
Date: Sun, 25 Nov 2018 10:43:20 +0000	[thread overview]
Message-ID: <20181125104320.06d65625@archlinux> (raw)
In-Reply-To: <20181122220111.28808-2-martin.blumenstingl@googlemail.com>

On Thu, 22 Nov 2018 23:01:11 +0100
Martin Blumenstingl <martin.blumenstingl@googlemail.com> wrote:

> Before this patch we are registering the internal clocks (for example on
> Meson8b, where the SAR ADC IP block implements the divider and gate
> clocks) with the following names:
> - /soc/cbus at c1100000/adc at 8680#adc_div
> - /soc/cbus at c1100000/adc at 8680#adc_en
> 
> This is bad because the common clock framework uses the clock to create
> a directory in <debugfs>/clk. With such name, the directory creation
> (silently) fails and the debugfs entry ends up being created at the
> debugfs root.
> 
> With this change, the new clock names are:
> - c1108680.adc#adc_div
> - c1108680.adc#adc_en
> 
> This matches the clock naming scheme used in the PWM, Ethernet and MMC
> drivers. It also fixes the problem with debugfs.
> The idea is shamelessly taken from commit b96e9eb62841c5 ("pwm: meson:
> Fix mux clock names").
> 
> Fixes: 3921db46a8c5bc ("iio: Convert to using %pOF instead of full_name")
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
As this is debugfs I am not going to push this through the fast path.

Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to play with it.

Thanks,

Jonathan

> ---
>  drivers/iio/adc/meson_saradc.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c
> index 6155d26091eb..729becb2d3d9 100644
> --- a/drivers/iio/adc/meson_saradc.c
> +++ b/drivers/iio/adc/meson_saradc.c
> @@ -656,8 +656,8 @@ static int meson_sar_adc_clk_init(struct iio_dev *indio_dev,
>  	struct clk_init_data init;
>  	const char *clk_parents[1];
>  
> -	init.name = devm_kasprintf(&indio_dev->dev, GFP_KERNEL, "%pOF#adc_div",
> -				   indio_dev->dev.of_node);
> +	init.name = devm_kasprintf(&indio_dev->dev, GFP_KERNEL, "%s#adc_div",
> +				   dev_name(indio_dev->dev.parent));
>  	if (!init.name)
>  		return -ENOMEM;
>  
> @@ -678,8 +678,8 @@ static int meson_sar_adc_clk_init(struct iio_dev *indio_dev,
>  	if (WARN_ON(IS_ERR(priv->adc_div_clk)))
>  		return PTR_ERR(priv->adc_div_clk);
>  
> -	init.name = devm_kasprintf(&indio_dev->dev, GFP_KERNEL, "%pOF#adc_en",
> -				   indio_dev->dev.of_node);
> +	init.name = devm_kasprintf(&indio_dev->dev, GFP_KERNEL, "%s#adc_en",
> +				   dev_name(indio_dev->dev.parent));
>  	if (!init.name)
>  		return -ENOMEM;
>  

  reply	other threads:[~2018-11-25 10:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-22 22:01 [PATCH 0/1] meson-saradc: fix internal clock names Martin Blumenstingl
2018-11-22 22:01 ` Martin Blumenstingl
2018-11-22 22:01 ` Martin Blumenstingl
2018-11-22 22:01 ` [PATCH 1/1] iio: adc: " Martin Blumenstingl
2018-11-22 22:01   ` Martin Blumenstingl
2018-11-22 22:01   ` Martin Blumenstingl
2018-11-25 10:43   ` Jonathan Cameron [this message]
2018-11-25 10:43     ` Jonathan Cameron
2018-11-25 10:43     ` Jonathan Cameron

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=20181125104320.06d65625@archlinux \
    --to=jic23@kernel.org \
    --cc=linus-amlogic@lists.infradead.org \
    /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 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.