linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Cc: linux-kernel@vger.kernel.org,
	Support Opensource <support.opensource@diasemi.com>
Subject: Re: [RESEND PATCH 1/2] mfd: da9063: Fix revision handling to correctly select reg tables
Date: Mon, 24 Feb 2020 09:56:54 +0000	[thread overview]
Message-ID: <20200224095654.GI3494@dell> (raw)
In-Reply-To: <c75e6e04281fd8da78cd209a888664c35a6fb8c1.1579864546.git.Adam.Thomson.Opensource@diasemi.com>

On Fri, 24 Jan 2020, Adam Thomson wrote:

> The current implementation performs checking in the i2c_probe()
> function of the variant_code but does this immediately after the
> containing struct has been initialised as all zero. This means the
> check for variant code will always default to using the BB tables
> and will never select AD. The variant code is subsequently set
> by device_init() and later used by the RTC so really it's a little
> fortunate this mismatch works.
> 
> This update creates an initial temporary regmap instantiation to
> simply read the chip and variant/revision information (common to
> all revisions) so that it can subsequently correctly choose the
> proper regmap tables for real initialisation.

IIUC, you have a dependency issue whereby the device type is required
before you can select the correct Regmap configuration.  Is that
correct?

If so, using Regmap for the initial register reads sounds like
over-kill.  What's stopping you simply using raw reads before the
Regmap is instantiated?

> Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
> ---
>  drivers/mfd/da9063-core.c            |  31 -------
>  drivers/mfd/da9063-i2c.c             | 167 +++++++++++++++++++++++++++++++----
>  include/linux/mfd/da9063/registers.h |  15 ++--
>  3 files changed, 160 insertions(+), 53 deletions(-)

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2020-02-24  9:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-24 11:25 [RESEND PATCH 0/2] Resolve revision handling and add support for DA silicon Adam Thomson
2020-01-24 11:25 ` [RESEND PATCH 1/2] mfd: da9063: Fix revision handling to correctly select reg tables Adam Thomson
2020-02-24  9:56   ` Lee Jones [this message]
2020-02-24 11:08     ` Adam Thomson
2020-02-24 11:27       ` Lee Jones
2020-02-24 12:11         ` Adam Thomson
2020-02-25  9:00           ` Lee Jones
2020-02-25 10:08             ` Adam Thomson
2020-01-24 11:25 ` [RESEND PATCH 2/2] mfd: da9063: Add support for latest DA silicon revision Adam Thomson
2020-02-24  9:58   ` 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=20200224095654.GI3494@dell \
    --to=lee.jones@linaro.org \
    --cc=Adam.Thomson.Opensource@diasemi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=support.opensource@diasemi.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 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).