Re: [RFCv4 06/11] misc: Introduce Nokia CMT driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux