lkml.org 
[lkml]   [2020]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RESEND PATCH v3 1/2] mfd: da9063: Fix revision handling to correctly select reg tables
On Mon, 13 Jul 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 adds raw I2C read access functionality to 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.
>
> Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
> ---
>
> v3:
> - Replaced magic numbers around I2C paged access code with enums and defines
> - Small style tidy ups as requested by Lee Jones
>
> v2:
> - Use raw I2C read access instead of a temporary regmap to interrogate chip and
> variant id registers
>
> drivers/mfd/da9063-core.c | 31 ------
> drivers/mfd/da9063-i2c.c | 184 +++++++++++++++++++++++++++++++----
> include/linux/mfd/da9063/registers.h | 15 ++-
> 3 files changed, 177 insertions(+), 53 deletions(-)

Applied, thanks.

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

\
 
 \ /
  Last update: 2020-07-16 17:07    [W:0.067 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site