All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Peter Ujfalusi <peter.ujfalusi-l0cyMroinI0@public.gmane.org>
Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] mfd: twl6040: Handle mclk used for HPPLL and optional internal clock source
Date: Mon, 20 Jun 2016 10:57:01 +0100	[thread overview]
Message-ID: <20160620095701.GF1465@dell> (raw)
In-Reply-To: <b4bd5fed-fd64-26b6-45ce-976169ec7208-l0cyMroinI0@public.gmane.org>

On Mon, 20 Jun 2016, Peter Ujfalusi wrote:

> On 06/16/2016 06:16 PM, Lee Jones wrote:
> > On Wed, 11 May 2016, Peter Ujfalusi wrote:
> > 
> >> On some boards, like omap5-uevm the MCLK is gated by default and in order
> >> to be able to use the High performance modes of twl6040 it need to be
> >> enabled by SW.
> >> Add support for handling the MCLK source clock via CCF.
> >> At the same time lover the print priority of the notification that the 32K
> > 
> > Mr Lover Lover!
> 
> Oh. :D
> 
> >>  	twl6040->supplies[0].supply = "vio";
> >> diff --git a/include/linux/mfd/twl6040.h b/include/linux/mfd/twl6040.h
> >> index 8f9fc3d26e6d..a7c50e54f3e0 100644
> >> --- a/include/linux/mfd/twl6040.h
> >> +++ b/include/linux/mfd/twl6040.h
> >> @@ -224,7 +224,8 @@ struct twl6040 {
> >>  	struct regmap *regmap;
> >>  	struct regmap_irq_chip_data *irq_data;
> >>  	struct regulator_bulk_data supplies[2]; /* supplies for vio, v2v1 */
> >> -	struct clk *clk32k;
> >> +	struct clk *clk32k_clk;
> >> +	struct clk *mclk_clk;
> >
> > Not sure I get the naming here.
> > 
> > What's wrong with clk32k and mclk?
> 
> The struct already have mclk (unsigned int) member to store the rate of the
> reference clock (32768 in case of LPPLL or the rate of the mclk clock in case
> of HPPLL). I could use clk32k and mclk for the clk and rename the current mclk
> to refclk_rate or something if that is better. This value is only important
> for the HPPLL usage, if I restructure the driver I might be able to rename it
> as mclk_rate and store only the MCLK freq there.

That would be less ambiguous, yes.

> >>  	struct mutex mutex;
> >>  	struct mutex irq_mutex;
> >>  	struct mfd_cell cells[TWL6040_CELLS];
> > 
> 
> 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones@linaro.org>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
	tony@atomide.com, devicetree@vger.kernel.org
Subject: Re: [PATCH] mfd: twl6040: Handle mclk used for HPPLL and optional internal clock source
Date: Mon, 20 Jun 2016 10:57:01 +0100	[thread overview]
Message-ID: <20160620095701.GF1465@dell> (raw)
In-Reply-To: <b4bd5fed-fd64-26b6-45ce-976169ec7208@ti.com>

On Mon, 20 Jun 2016, Peter Ujfalusi wrote:

> On 06/16/2016 06:16 PM, Lee Jones wrote:
> > On Wed, 11 May 2016, Peter Ujfalusi wrote:
> > 
> >> On some boards, like omap5-uevm the MCLK is gated by default and in order
> >> to be able to use the High performance modes of twl6040 it need to be
> >> enabled by SW.
> >> Add support for handling the MCLK source clock via CCF.
> >> At the same time lover the print priority of the notification that the 32K
> > 
> > Mr Lover Lover!
> 
> Oh. :D
> 
> >>  	twl6040->supplies[0].supply = "vio";
> >> diff --git a/include/linux/mfd/twl6040.h b/include/linux/mfd/twl6040.h
> >> index 8f9fc3d26e6d..a7c50e54f3e0 100644
> >> --- a/include/linux/mfd/twl6040.h
> >> +++ b/include/linux/mfd/twl6040.h
> >> @@ -224,7 +224,8 @@ struct twl6040 {
> >>  	struct regmap *regmap;
> >>  	struct regmap_irq_chip_data *irq_data;
> >>  	struct regulator_bulk_data supplies[2]; /* supplies for vio, v2v1 */
> >> -	struct clk *clk32k;
> >> +	struct clk *clk32k_clk;
> >> +	struct clk *mclk_clk;
> >
> > Not sure I get the naming here.
> > 
> > What's wrong with clk32k and mclk?
> 
> The struct already have mclk (unsigned int) member to store the rate of the
> reference clock (32768 in case of LPPLL or the rate of the mclk clock in case
> of HPPLL). I could use clk32k and mclk for the clk and rename the current mclk
> to refclk_rate or something if that is better. This value is only important
> for the HPPLL usage, if I restructure the driver I might be able to rename it
> as mclk_rate and store only the MCLK freq there.

That would be less ambiguous, yes.

> >>  	struct mutex mutex;
> >>  	struct mutex irq_mutex;
> >>  	struct mfd_cell cells[TWL6040_CELLS];
> > 
> 
> 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  parent reply	other threads:[~2016-06-20  9:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-11 11:13 [PATCH] mfd: twl6040: Handle mclk used for HPPLL and optional internal clock source Peter Ujfalusi
2016-05-11 11:13 ` Peter Ujfalusi
     [not found] ` <1462965209-6955-1-git-send-email-peter.ujfalusi-l0cyMroinI0@public.gmane.org>
2016-05-16 15:02   ` Rob Herring
2016-05-16 15:02     ` Rob Herring
2016-06-07  8:54     ` Peter Ujfalusi
2016-06-07  8:54       ` Peter Ujfalusi
2016-06-07  9:17       ` Lee Jones
2016-06-07  9:23         ` Peter Ujfalusi
2016-06-07  9:23           ` Peter Ujfalusi
2016-06-16 15:16 ` Lee Jones
2016-06-20  8:53   ` Peter Ujfalusi
2016-06-20  8:53     ` Peter Ujfalusi
     [not found]     ` <b4bd5fed-fd64-26b6-45ce-976169ec7208-l0cyMroinI0@public.gmane.org>
2016-06-20  9:57       ` Lee Jones [this message]
2016-06-20  9:57         ` Lee Jones

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=20160620095701.GF1465@dell \
    --to=lee.jones-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=peter.ujfalusi-l0cyMroinI0@public.gmane.org \
    --cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.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.