[PATCH] mfd: twl-core: export twl_get_regmap

Nicolae Rosia nicolae.rosia.oss at gmail.com
Sun Nov 20 04:54:25 PST 2016


On Fri, Nov 18, 2016 at 8:55 PM, Lee Jones <lee.jones at linaro.org> wrote:
> On Sat, 12 Nov 2016, Nicolae Rosia wrote:
>
>> We want to get rid of global twl_i2c_{write/read}.
>> As a first step, allow clients to get the regmap and write directly
>
> What's stopping you from passing it through device data?
>
Could you elaborate a bit?
The regmaps are stored in struct twl_client [0], stored in struct
twl_private [1], both structs are defined in the source file, not in
header.
I could however just fix the problem by reworking the struct, exposing
it and use mfd_add_device as real mfd drivers do.

[0] http://lxr.free-electrons.com/source/drivers/mfd/twl-core.c#L152
[1] http://lxr.free-electrons.com/source/drivers/mfd/twl-core.c#L163



More information about the linux-arm-kernel mailing list