lkml.org 
[lkml]   [2020]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 06/11] firmware: arm_scmi: add support for protocol modularization
On Tue, Oct 20, 2020 at 10:47:28PM -0400, Thara Gopinath wrote:
>
>
> On 10/14/20 11:05 AM, Cristian Marussi wrote:
> > Modify protocol initialization callback adding a new parameter representing
> > a reference to the available xfer core operations and introduce a macro to
> > simply register with the core new protocols as loadable drivers.
> > Keep standard protocols as builtin.
> >
> > Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
> > ---
> > drivers/firmware/arm_scmi/base.c | 56 ++++++++++--------
> > drivers/firmware/arm_scmi/bus.c | 14 ++++-
> > drivers/firmware/arm_scmi/clock.c | 56 +++++++++---------
> > drivers/firmware/arm_scmi/common.h | 42 +++++++++-----
> > drivers/firmware/arm_scmi/driver.c | 50 ++++++++++------
> > drivers/firmware/arm_scmi/perf.c | 88 +++++++++++++++--------------
> > drivers/firmware/arm_scmi/power.c | 46 ++++++++-------
> > drivers/firmware/arm_scmi/reset.c | 46 ++++++++-------
> > drivers/firmware/arm_scmi/sensors.c | 52 +++++++++--------
> > drivers/firmware/arm_scmi/system.c | 16 ++++--
> > include/linux/scmi_protocol.h | 18 +++++-
> > 11 files changed, 288 insertions(+), 196 deletions(-)
> >
> > diff --git a/drivers/firmware/arm_scmi/base.c b/drivers/firmware/arm_scmi/base.c
> > index f40821eeb103..8d7214fd2187 100644
> > --- a/drivers/firmware/arm_scmi/base.c
> > +++ b/drivers/firmware/arm_scmi/base.c
> > @@ -15,6 +15,8 @@
> > #define SCMI_BASE_NUM_SOURCES 1
> > #define SCMI_BASE_MAX_CMD_ERR_COUNT 1024
> > +static const struct scmi_xfer_ops *ops;
>
> Minor nit. I would consider renaming ops to something more
> meaningful like xfer_ops (or anything that makes sense). ops by
> itself leads to confusion with ops in scmo_protocol and in
> scmi_protocol_events.
>
> Same suggestion for all other declarations of ops in this patch.
>
I agree, but I'm in fact reworking deeply the interface for protocols
initialization (following some idea from Florian) in order to pass down
a protocol object including the xfer_ops instead of a handle+ops like
now, so this hopefully will solve also this concern.

Thanks

Cristian
> --
> Warm Regards
> Thara

\
 
 \ /
  Last update: 2020-10-21 12:30    [W:0.185 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site