devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: Alexey Firago <alexey_firago@mentor.com>,
	mturquette@baylibre.com, sboyd@codeaurora.org,
	robh+dt@kernel.org, geert@linux-m68k.org,
	linux-clk@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v3 1/3] clk: vc5: Add structure to describe particular chip features
Date: Thu, 6 Apr 2017 16:54:02 +0200	[thread overview]
Message-ID: <d461ac7d-4081-4444-6875-de4d8013dec3@gmail.com> (raw)
In-Reply-To: <1491470130-6655-2-git-send-email-alexey_firago@mentor.com>

On 04/06/2017 11:15 AM, Alexey Firago wrote:
> Introduce vc5_chip_info structure to describe features of a particular
> VC5 chip (id, number of FODs, number of outputs, flags).
> For now flags are only used to indicate if chip has internal XTAL.
> vc5_chip_info is set on probe from the matched of_device_id->data.
> 
> Also add defines to specify maximum number of FODs and clock outputs
> supported by the driver.
> 
> With these changes it should be easier to extend driver to support
> more VC5 models.
> 
> Signed-off-by: Alexey Firago <alexey_firago@mentor.com>

Reviewed-by: Marek Vasut <marek.vasut@gmail.com>

> ---
>  drivers/clk/clk-versaclock5.c | 65 +++++++++++++++++++++++++++++++------------
>  1 file changed, 47 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/clk/clk-versaclock5.c b/drivers/clk/clk-versaclock5.c
> index 56741f3..4e81fb1 100644
> --- a/drivers/clk/clk-versaclock5.c
> +++ b/drivers/clk/clk-versaclock5.c
> @@ -113,12 +113,30 @@
>  #define VC5_MUX_IN_XIN		BIT(0)
>  #define VC5_MUX_IN_CLKIN	BIT(1)
>  
> +/* Maximum number of clk_out supported by this driver */
> +#define VC5_MAX_CLK_OUT_NUM	3
> +
> +/* Maximum number of FODs supported by this driver */
> +#define VC5_MAX_FOD_NUM	2
> +
> +/* flags to describe chip features */
> +/* chip has built-in oscilator */
> +#define VC5_HAS_INTERNAL_XTAL	BIT(0)
> +
>  /* Supported IDT VC5 models. */
>  enum vc5_model {
>  	IDT_VC5_5P49V5923,
>  	IDT_VC5_5P49V5933,
>  };
>  
> +/* Structure to describe features of a particular VC5 model */
> +struct vc5_chip_info {
> +	const enum vc5_model	model;
> +	const unsigned int	clk_fod_cnt;
> +	const unsigned int	clk_out_cnt;
> +	u32			flags;

Shouldn't this also be const ?

> +};

[...]

-- 
Best regards,
Marek Vasut

  reply	other threads:[~2017-04-06 14:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-06  9:15 [PATCH v3 0/3] clk: Add support for IDT 5P49V5935 Alexey Firago
2017-04-06  9:15 ` [PATCH v3 1/3] clk: vc5: Add structure to describe particular chip features Alexey Firago
2017-04-06 14:54   ` Marek Vasut [this message]
2017-04-06 15:45     ` Alexey Firago
2017-04-06  9:15 ` [PATCH v3 2/3] clk: vc5: Add bindings for IDT VersaClock 5P49V5935 Alexey Firago
2017-04-06  9:15 ` [PATCH v3 3/3] clk: vc5: Add support " Alexey Firago
     [not found]   ` <1491470130-6655-4-git-send-email-alexey_firago-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
2017-04-06 14:56     ` Marek Vasut

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=d461ac7d-4081-4444-6875-de4d8013dec3@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=alexey_firago@mentor.com \
    --cc=devicetree@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@codeaurora.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 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).