lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 17 Dec 2013 19:58:56 +0200
From:	Ivajlo Dimitrov <ivo.g.dimitrov.75@...il.com>
To:	Linus Walleij <linus.walleij@...aro.org>,
	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>,
	"pavel@....cz" <pavel@....cz>
Subject: Re: Re: [RFCv4 06/11] misc: Introduce Nokia CMT driver


On 16.12.2013 20:34, Sebastian Reichel wrote:
> 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?

Don't forget there is not only ofono, but rtcom-call-ui and all the 
telephony stack in Maemo 5 :). However, power sequencing and control is 
specific not only to the modem model, but to the firmware version the 
modem is running as well (afaik). IMO you can't simply move the modem 
power/reset/sleep control to the kernel and hope for the best, I am not 
sure there is enough documentation (if any) for this to be done 
reliably, esp on n900 with its BB5 modem. The point is that those gpios 
are used not only for the initial power-up, but for control of the modem 
state and reset (if needed) during normal usage. The APE reset line is 
an example of stuff that can't be moved to the kernel without providing 
some interface/feedback to/from the userspace IMO - what if she is 
dialing 112 at the moment the modem decides it is too hot and wants a 
device reset (or whatever reason there could be for a modem to request a 
device reset)? The same goes for the APE sleep request line 
(cmt_apeslpx) - based on what should the kernel decide whether to put 
the modem in sleep?

Sure, exporting gpios to userspace might not be the best way to achieve 
the required functionality, but every way could be argued if it is the 
best. And for sure labeling a modem "LED" won't make it such.

Regards,
Ivo
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ