[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131216183448.GA10614@earth.universe>
Date: Mon, 16 Dec 2013 19:34:50 +0100
From: Sebastian Reichel <sre@...g0.de>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Shubhrajyoti Datta <omaplinuxkernel@...il.com>,
Carlos Chinea <cch.devel@...il.com>,
Tony Lindgren <tony@...mide.com>,
Grant Likely <grant.likely@...aro.org>,
Rob Herring <rob.herring@...xeda.com>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Stephen Warren <swarren@...dotorg.org>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Rob Landley <rob@...dley.net>,
Benoît Cousson <bcousson@...libre.com>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Linux-OMAP <linux-omap@...r.kernel.org>,
Pali Rohár <pali.rohar@...il.com>,
Ивайло Димитров
<freemangordon@....bg>,
Joni Lapilainen <joni.lapilainen@...il.com>,
Aaro Koskinen <aaro.koskinen@....fi>
Subject: Re: [RFCv4 06/11] misc: Introduce Nokia CMT driver
Hi,
On Mon, Dec 16, 2013 at 02:31:53PM +0100, Linus Walleij wrote:
> I am very reluctant in letting device trees specify exports of GPIOs
> to userspace, not so much because it's Linux-specific but for
> the fact that people are doing things in userspace that should not
> be done in userspace.
>
> Last time it was proposed I asked to the specific usecase,
> exactly why userspace needed this handle on a physical
> GPIO line, and why it can't use another userspace interface
> (example: leds, keys etc.)
There are a couple of lines ("cmt_apeslpx", "cmt_rst_rq", "cmt_en",
"cmt_rst", "cmt_bsi"), which are handled by ofono to do the correct
power sequence for the modem. The relevant ofono code is here:
https://git.kernel.org/cgit/network/ofono/ofono.git/tree/plugins/nokia-gpio.c
In MeeGo etc. they have a little board specific init script, which
exports the gpio lines and setups some symlinks. IMHO at least the
board specific stuff should be handled by the kernel, thus I added
this code to the driver. I guess you prefer to move the power
sequencing completly to the kernel?
> > What do you think about the following?
> >
> > /*
> > * driver, which provides generic reset notifications
> > */
> > cmt_reset: reset-notifier {
> > compatible = "linux,reset-notification";
> >
> > interrupts = <gpio>;
> > };
>
> Looks good to me.
Ok :) I will prepare something for the next patch.
> > /*
> > * driver, which exports the specified gpios in sysfs with the
> > * supplied names. The device will be named according to the
> > * label
> > */
> > cmt_gpios: gpio-sysfs-export {
> > compatible = "linux,gpio-sysfs-export";
> > label = "nokia-cmt";
> >
> > gpios = <A>, <B>, ...;
> > gpio-names = "A", "B", ...;
> > };
>
> Please follow the discussion on this topic:
> http://marc.info/?l=linux-gpio&m=138201170431416&w=2
Ok.
> >> Why are you using a tasklet rather than a work
> >> for this?
> >
> > No particular reason. I just took this over from Nokia's code.
>
> Can you try to use a work instead?
Yes. I will have a look at this.
-- Sebastian
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists