[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141024164523.GH28611@sonymobile.com>
Date: Fri, 24 Oct 2014 09:45:24 -0700
From: Bjorn Andersson <bjorn.andersson@...ymobile.com>
To: Lee Jones <lee.jones@...aro.org>
CC: Kumar Gala <galak@...eaurora.org>,
Andy Gross <agross@...eaurora.org>,
Arnd Bergmann <arnd@...db.de>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-arm-msm@...r.kernel.org" <linux-arm-msm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Grant Likely <grant.likely@...aro.org>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Pawel Moll <pawel.moll@....com>,
Rob Herring <robh+dt@...nel.org>,
Samuel Ortiz <sameo@...ux.intel.com>
Subject: Re: [RFC 6/7] mfd: qcom-smd-rpm: Driver for the Qualcomm RPM over SMD
On Mon 20 Oct 00:22 PDT 2014, Lee Jones wrote:
> On Fri, 17 Oct 2014, Bjorn Andersson wrote:
> > On Wed 08 Oct 01:40 PDT 2014, Lee Jones wrote:
>
> [...]
>
> > > > +static struct qcom_smd_driver qcom_smd_rpm_driver = {
> > > > + .probe = qcom_smd_rpm_probe,
> > > > + .remove = qcom_smd_rpm_remove,
> > > > + .callback = qcom_smd_rpm_callback,
> > > > + .driver = {
> > > > + .name = "qcom_smd_rpm",
> > > > + .owner = THIS_MODULE,
> > > > + .of_match_table = qcom_smd_rpm_of_match,
> > > > + },
> > > > +};
> > > > +
> > > > +module_qcom_smd_driver(qcom_smd_rpm_driver);
> > >
> > > I don't like this. What's wrong with the existing platform driver
> > > code?
> > >
> >
> > I started off with having smd child devices as platform drivers and had some
> > accessor functions to find the open handles that triggered the probe() and
> > register the callback with those. But this didn't feel very sane, so I did
> > implemented a custom driver struct and probe prototype to simplify writing
> > drivers.
> >
> > May I ask why you dislike this? This is how it's done in so many other places
> > in the kernel...
>
> I don't believe that's the case. All owners of their own
> module_*_driver() registration calls are busses (see below), whereas
> 'qcom_smd' is just a driver. Things would soon get out of control if
> we allowed every driver in the kernel to supply their own driver
> registration information variants.
>
I modelled this after rpmsg, with the intention of having qcom_smd provide a
"smd bus" and all client drivers sitting on that bus being probed and removed
as the remote services appear and disappear.
I'm afraid I don't understand what part I missed that makes my smd driver "just
a driver". I will reread the documentation and try to figure out what I might
have missed.
Regards,
Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists