[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210526080124.GH4005783@dell>
Date: Wed, 26 May 2021 09:01:24 +0100
From: Lee Jones <lee.jones@...aro.org>
To: Min Li <min.li.xe@...esas.com>
Cc: "sameo@...ux.intel.com" <sameo@...ux.intel.com>,
"grant.likely@...aro.org" <grant.likely@...aro.org>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: Re: [PATCH mfd v1] mfd: Add Renesas Synchronization Management Unit
(SMU) support
On Tue, 25 May 2021, Min Li wrote:
> > Why do you need to track how many there are?
> >
> > We don't usually do that at all.
You've cut away all of the context.
Please keep all the context so that we and others know what we're
referencing.
> It is used to index the mfd_cell array, rsmu_cdev[RSMU_MAX_MFD_DEV]
Why do you need to index the array?
The devices look identical to me.
Just have one entry for each type and register them in a for() loop.
> The index is also used to enumerate the rsmu character device, say /dev/rsmu[0/1/2/3]
You should be able to use platform_id or a similar built-in counting
mechanism. There shouldn't be any requirement for you to hand-roll
your own device counting solution.
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
Powered by blists - more mailing lists