On 29.01.2025 16:07, Andy Shevchenko wrote:
>> [...]
> Meanwhile, can you test this patch (on top of non-working case)?
>
> diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
> index 2314744201b4..f799a7a80231 100644
> --- a/drivers/base/regmap/regmap.c
> +++ b/drivers/base/regmap/regmap.c
> @@ -1553,8 +1553,19 @@ static int _regmap_select_page(struct regmap *map, 
> unsigned int *reg,
>                * virtual copy as well.
>                */
>               if (page_chg &&
> -                 in_range(range->selector_reg, range->window_start, 
> range->window_len))
> +                 in_range(range->selector_reg, range->window_start, 
> range->window_len)) {
> +                     bool bypass, cache_only;
> +
> +                     bypass = map->cache_bypass;
> +                     cache_only = map->cache_only;
> +                     map->cache_bypass = false;
> +                     map->cache_only = true;
> +
>                       _regmap_update_bits(map, sel_register, mask, val, NULL, 
> false);
> +
> +                     map->cache_bypass = bypass;
> +                     map->cache_only = cache_only;
> +             }
>       }
>   
>       *reg = range->window_start + win_offset;
>
> If I understood the case, the affected driver doesn't use case and we actually
> write to the selector register twice which most likely messes up the things.
> But this is only a theory (since we don't have the traces yet).

Bingo! This patch (on top of current linux-next) fixed the probe issue. 
Feel free to add:

Reported-by: Marek Szyprowski <m.szyprow...@samsung.com>
Tested-by: Marek Szyprowski <m.szyprow...@samsung.com>

(although I'm not sure if this is a fix for the generic case or just 
this driver)

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

Reply via email to