All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	linux-clk <linux-clk@vger.kernel.org>
Subject: Re: [bug report] clk: uniphier: add core support code for UniPhier clock driver
Date: Thu, 27 Oct 2016 18:28:44 -0700	[thread overview]
Message-ID: <20161028012844.GT26139@codeaurora.org> (raw)
In-Reply-To: <CAK7LNAQ9=SZMCwoEFasULX4arqkxqOMpREUn6GLtqTdXik5=3w@mail.gmail.com>

On 10/13, Masahiro Yamada wrote:
> 2016-10-12 18:34 GMT+09:00 Dan Carpenter <dan.carpenter@oracle.com>:
> >
> > We can't return -EINVAL as a u8.
> >
> >     57  }
> 
> 
> 
> I think we should change the return type of .get_parent() callback to "int"
> so we can handle error code.
> (perhaps, the argument of .set_parent() as well for consistency?)

Yeah we've been thinking of changing get_parent() to return a
struct clk_hw pointer (or an error pointer). That would simplify
things by avoiding lots of remapping. But to do that immediately
we would need to convert all of the drivers. I guess we could
have a get_parent_hw() op for that and convert everyone slowly.

Should we make the set_parent op take a hw pointer too? I'm not
sure about it. It would be nice to have some generic way to map
the hw pointer to a hw index for a clock. Having the tables of
parent pointers in the core and making the drivers know about
that order and how it relates to the values they program into the
hardware is awkward sometimes.

> 
> [1]
> I guess regmap_read() is often involved in .get_parent()
> and it may return a negative value on failure.
> 
> [2]
> On boot-up, the register my be read as
> a value that is not covered by the clk driver.
> 

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2016-10-28  1:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-12  9:34 [bug report] clk: uniphier: add core support code for UniPhier clock driver Dan Carpenter
2016-10-13  5:47 ` Masahiro Yamada
2016-10-28  1:28   ` Stephen Boyd [this message]
2016-11-01  6:50     ` Masahiro Yamada

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=20161028012844.GT26139@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=yamada.masahiro@socionext.com \
    /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.