From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Reichel Subject: Re: [RFCv4 06/11] misc: Introduce Nokia CMT driver Date: Mon, 16 Dec 2013 19:34:50 +0100 Message-ID: <20131216183448.GA10614@earth.universe> References: <1387150085-23173-1-git-send-email-sre@debian.org> <1387150085-23173-7-git-send-email-sre@debian.org> <20131216121524.GA6177@earth.universe> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="OgqxwSJOaUobr8KG" Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-omap-owner@vger.kernel.org To: Linus Walleij Cc: Shubhrajyoti Datta , Carlos Chinea , Tony Lindgren , Grant Likely , Rob Herring , Pawel Moll , Mark Rutland , Stephen Warren , Ian Campbell , Rob Landley , =?iso-8859-1?Q?Beno=EEt?= Cousson , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Linux-OMAP , Pali =?iso-8859-1?Q?Roh=E1r?= , =?utf-8?B?0JjQstCw0LnQu9C+INCU0LjQvNC40YLRgNC+0LI=?= , Joni Lapilainen , Aaro Koskinen List-Id: devicetree@vger.kernel.org --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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= =2Ec 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 =3D "linux,reset-notification"; > > > > interrupts =3D ; > > }; >=20 > 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 =3D "linux,gpio-sysfs-export"; > > label =3D "nokia-cmt"; > > > > gpios =3D , , ...; > > gpio-names =3D "A", "B", ...; > > }; >=20 > Please follow the discussion on this topic: > http://marc.info/?l=3Dlinux-gpio&m=3D138201170431416&w=3D2 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. >=20 > Can you try to use a work instead? Yes. I will have a look at this. -- Sebastian --OgqxwSJOaUobr8KG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) iQIcBAEBCAAGBQJSr0fIAAoJENju1/PIO/qabycP/AkF3r6cMXP4ws0yNciC4oUm ciIG8wl9GVsERgkw7JNDKElpQEnAwfO2WkYLnTJmy/3s12jSqAUPj+12AwB56Oqk 8Nnnx93n8aGIe5QDu3NH9kj9Y0anhJN0hBgBz1emKZH4HXbWoZJsYRHndLTy6bgf YTik0VsWxChGFrcoIAVHB+LZZ0GwI+nmhmmODk2li1ZHbB3dP04ZzYlmH8ekA31l kjJrv+XQIwlVS+IkHFxVZbw1XTuU7q9vUFuWVj/wsDx0vL6q1WYpSwSPcH7G+/jT iRNE+pAUdGxkkaz9Rom5GH3S1Bj2jrRzR4XxIt3QY0uyeTIX95Yq/uDa0epq+oEu nJ6hUgOsDivNyAr5/9tvBk1u89AgFrmBLjJR7BpwWc1pjf7qM1jKEyp7LbnqmfjL 9tUTdz7Y4GFT2XA38BsLzu6NNG7QY+/klTvfiqrmrNLHyyPd+VoWg03C9ZzPI6mg pa8KjJjiNfHwcgWuhTSW//qH2ljM5yyQHhcaJnQRmVqzlnI6jBymtUvYr2VZbIC5 2khMxehoxPNTi7QUZAwtssSZwvrk5hRODtxJ0ImsRs4lq6NeM+ncED9pPAa+gSaB oOQI3Ka81yyqBvsxlSSX9gPkNV0clijbtAeQaeaPxAGEL74Zi4q2eYLLZBK4Wq9H gVSlG22gFY06ifNi9nqA =EBrD -----END PGP SIGNATURE----- --OgqxwSJOaUobr8KG--