From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751356AbbDEGQ5 (ORCPT ); Sun, 5 Apr 2015 02:16:57 -0400 Received: from mout.gmx.net ([212.227.17.20]:55028 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750760AbbDEGQz (ORCPT ); Sun, 5 Apr 2015 02:16:55 -0400 Message-ID: <5520D345.9050106@rempel-privat.de> Date: Sun, 05 Apr 2015 08:16:37 +0200 From: Oleksij Rempel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Paul Bolle CC: linus.walleij@linaro.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] pinctrl: Add driver for Alphascale asm9260 pinctrl References: <1427448973-665-1-git-send-email-linux@rempel-privat.de> <1427448973-665-2-git-send-email-linux@rempel-privat.de> <1427476243.2334.12.camel@x220> In-Reply-To: <1427476243.2334.12.camel@x220> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="lnsfq8pWCsmFHhur5fcheD511X5Lfd85g" X-Provags-ID: V03:K0:yEqD85zJ9s8kXk2OM8CFRUSKu4GhkvEtgxq6/3eRhWHqaaCP7bc O3/ODI2I3euKUcVyufuots1EQ7PmpCtc2iQgxlDgMuYJ1okQwVTqkt7zwaOIxTWELbPb8x+ E//xoSyReQzCTZKJXiVkFgb0E9sS+xTjhwAVF9Tdj+naoqB0U0jjLbkN6lxdHhrNKwxosE8 v+cyzvxgycTUSbs38t0Kw== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --lnsfq8pWCsmFHhur5fcheD511X5Lfd85g Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Am 27.03.2015 um 18:10 schrieb Paul Bolle: > This patch adds a mismatch between the Kconfig symbol (bool) and the > code (which assumes a modular built too). >=20 > On Fri, 2015-03-27 at 10:36 +0100, Oleksij Rempel wrote: >> --- a/drivers/pinctrl/Kconfig >> +++ b/drivers/pinctrl/Kconfig >> @@ -47,6 +47,14 @@ config PINCTRL_AS3722 >> open drain configuration for the GPIO pins of AS3722 devices. It a= lso >> supports the GPIO functionality through gpiolib. >> =20 >> +config PINCTRL_ASM9260 >> + bool "Pinctrl driver for Alphascale asm9260" >=20 > This adds a bool symbol. >=20 >> + depends on MACH_ASM9260 >> + select PINMUX >> + select GENERIC_PINCONF >> + help >> + Say Y here to enable the Alphascale asm9260 pinctrl driver >> + >=20 >> -- a/drivers/pinctrl/Makefile >> +++ b/drivers/pinctrl/Makefile >=20 >> +obj-$(CONFIG_PINCTRL_ASM9260) +=3D pinctrl-asm9260.o >=20 > So this object can now only be built-in. >=20 >> --- /dev/null >> +++ b/drivers/pinctrl/pinctrl-asm9260.c >> @@ -0,0 +1,733 @@ >> +/* >> + * Pinctrl driver for the Alphascale ASM9260 SoC >> + * >> + * Copyright (c) 2014, Oleksij Rempel >> + * >> + * This program is free software; you can redistribute it and/or modi= fy it >> + * under the terms and conditions of the GNU General Public License, >> + * version 2, as published by the Free Software Foundation. >> + */ >> + >> +#include >> +#include >> +#include >=20 > This include is probably not needed. >=20 >> +#include >> +#include >> +#include >> + >> +#include "core.h" >> +#include "pinctrl-utils.h" >=20 >> +/* >> + * Pin control driver setup >> + */ >> +static struct pinctrl_desc asm9260_pinctrl_desc =3D { >> + .pctlops =3D &asm9260_pinctrl_ops, >> + .pmxops =3D &asm9260_pinmux_ops, >> + .confops =3D &asm9260_pinconf_ops, >> + .owner =3D THIS_MODULE, >=20 > THIS_MODULE is, basically, equivalent to NULL for built-in code. >=20 >> +}; >> + >=20 >> +MODULE_DEVICE_TABLE(of, asm9260_pinctrl_of_match); >=20 > This will be preprocessed away for built-in code. >=20 >> +module_platform_driver(asm9260_pinctrl_driver); >=20 > The built-in equivalent of this seems to be a wrapper that > only does > platform_driver_register(&asm9260_pinctrl_driver); >=20 > and mark that wrapper as a device_initcall(). There appears to be no > macro that does all that in one line. >=20 >> +MODULE_AUTHOR("Oleksij Rempel "); >> +MODULE_DESCRIPTION("Alphascale ASM9260 pinctrl driver"); >> +MODULE_LICENSE("GPL"); >=20 > These three macros will be, effectively, preprocessed away for built-in= > code. (By the way, you probably want to use "GPL v2" as the license > ident if it would be possible to build this code modular.) Or, i'll just make a tristate from it. --=20 Regards, Oleksij --lnsfq8pWCsmFHhur5fcheD511X5Lfd85g Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAlUg01MACgkQHwImuRkmbWmtRgEAmPYbY+Kc8nusdntRLUFOPqHo WTCh54auoqG4n4SomDQA/3iA1JL4mgWefr5YQ7YYMGeWSD+EHP+aqjydUb7e+3nl =2hTl -----END PGP SIGNATURE----- --lnsfq8pWCsmFHhur5fcheD511X5Lfd85g--