lkml.org 
[lkml]   [2023]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 3/4] nvmem: mtk-efuse: replace driver with a generic MMIO one
Date
> From: Rafał Miłecki <rafal@milecki.pl>
>
> Mediatek EFUSE uses a simple MMIO that can be handled with a generic
> driver. Replace this driver to avoid code duplication.

I don't think this is the correct approach. You'll restrict that driver
to being read-only. I admit that right now, it's read only, but it can
be extended to also support efuse writing. With this changes, it's not
possible.

> static const struct of_device_id mmio_nvmem_of_match_table[] = {
> { .compatible = "mmio-nvmem", },
>+ /* Custom bindings that were introduced before the mmio one */
>+ { .compatible = "mediatek,mt8173-efuse", },
>+ { .compatible = "mediatek,efuse", },

Why do you assume that all mediatek efuses will be the same? This should
rather be something like (in the dts/binding):

compatible = "mediatek,mt8173-efuse", "mmio-nvmem";

So if there is no driver for the particular efuse, it will fall back to the
generic one.

-michael

\
 
 \ /
  Last update: 2023-03-27 00:04    [W:0.089 / U:0.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site