Thread (21 messages) 21 messages, 3 authors, 2022-09-23

Re: [PATCH v2 net-next 08/14] net: dsa: felix: update init_regmap to be string-based

flat view

From: Colin Foster <colin.foster@in-advantage.com>
Date: 2022-09-23 15:54:09
Also in: linux-devicetree, linux-gpio, lkml

On Thu, Sep 22, 2022 at 07:40:09PM -0700, Jakub Kicinski wrote:
On Thu, 22 Sep 2022 19:39:06 -0700 Jakub Kicinski wrote:
quoted
On Wed, 21 Sep 2022 21:00:56 -0700 Colin Foster wrote:
quoted
During development, it was believed that a wrapper for ocelot_regmap_init()
would be sufficient for the felix driver to work in non-mmio scenarios.
This was merged in during commit 242bd0c10bbd ("net: dsa: ocelot: felix:
add interface for custom regmaps")

As the external ocelot DSA driver grew closer to an acceptable state, it
was realized that most of the parameters that were passed in from struct
resource *res were useless and ignored. This is due to the fact that the
external ocelot DSA driver utilizes dev_get_regmap(dev, resource->name).

Instead of simply ignoring those parameters, refactor the API to only
require the name as an argument. MMIO scenarios this will reconstruct the
struct resource before calling ocelot_regmap_init(ocelot, resource). MFD
scenarios need only call dev_get_regmap(dev, name).
Ah, and the modpost:

ERROR: modpost: drivers/net/dsa/ocelot/mscc_seville: 'felix_init_regmap' exported twice. Previous export was in drivers/net/dsa/ocelot/mscc_felix.ko
Yep. Since felix.c gets compiled into both drivers I don't need to
export the symbol.

And there's the NULL assignment. That one I'm surprised doesn't throw a
warning... Looking forward to more feedback before I send out v3 next
week.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help