From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753498AbbCDW6w (ORCPT ); Wed, 4 Mar 2015 17:58:52 -0500 Received: from cpsmtpb-ews03.kpnxchange.com ([213.75.39.6]:63191 "EHLO cpsmtpb-ews03.kpnxchange.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750785AbbCDW6u (ORCPT ); Wed, 4 Mar 2015 17:58:50 -0500 Message-ID: <1425509926.2090.56.camel@tiscali.nl> Subject: Re: [PATCH 2/2] pinctrl: Introduce TI IOdelay configuration driver From: Paul Bolle To: Nishanth Menon Cc: Tony Lindgren , Linus Walleij , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Lokesh Vutla Date: Wed, 04 Mar 2015 23:58:46 +0100 In-Reply-To: <1425427237-11511-3-git-send-email-nm@ti.com> References: <1425427237-11511-1-git-send-email-nm@ti.com> <1425427237-11511-3-git-send-email-nm@ti.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 (3.12.11-1.fc21) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 04 Mar 2015 22:58:46.0958 (UTC) FILETIME=[C57204E0:01D056CE] X-RcptDomain: vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Nishanth Menon schreef op di 03-03-2015 om 18:00 [-0600]: > diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig > index ee9f44ad7f02..8e463d75fbb2 100644 > --- a/drivers/pinctrl/Kconfig > +++ b/drivers/pinctrl/Kconfig > @@ -160,6 +160,17 @@ config PINCTRL_TEGRA_XUSB > select PINCONF > select PINMUX > > +config PINCTRL_TI_IODELAY > + bool "TI IODelay Module pinconf driver" This adds a boolean Kconfig symbol. > + depends on OF > + select PINCONF > + select GENERIC_PINCONF > + select REGMAP_MMIO > + help > + Say Y here to support Texas Instruments' IODelay pinconf driver. > + IODelay module is used for the DRA7 SoC family. This driver is in > + addition to PINCTRL_SINGLE which controls the mux. > + > config PINCTRL_TZ1090 > bool "Toumaz Xenif TZ1090 pin control driver" > depends on SOC_TZ1090 > diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile > index 0475206dd600..e441cd71aedf 100644 > --- a/drivers/pinctrl/Makefile > +++ b/drivers/pinctrl/Makefile > @@ -28,6 +28,7 @@ obj-$(CONFIG_PINCTRL_TEGRA30) += pinctrl-tegra30.o > obj-$(CONFIG_PINCTRL_TEGRA114) += pinctrl-tegra114.o > obj-$(CONFIG_PINCTRL_TEGRA124) += pinctrl-tegra124.o > obj-$(CONFIG_PINCTRL_TEGRA_XUSB) += pinctrl-tegra-xusb.o > +obj-$(CONFIG_PINCTRL_TI_IODELAY) += pinctrl-ti-iodelay.o So this objectfile will either be built-in or not be built at all. > obj-$(CONFIG_PINCTRL_TZ1090) += pinctrl-tz1090.o > obj-$(CONFIG_PINCTRL_TZ1090_PDC) += pinctrl-tz1090-pdc.o > obj-$(CONFIG_PINCTRL_U300) += pinctrl-u300.o > diff --git a/drivers/pinctrl/pinctrl-ti-iodelay.c b/drivers/pinctrl/pinctrl-ti-iodelay.c > new file mode 100644 > index 000000000000..e4c6e25a781c > --- /dev/null > +++ b/drivers/pinctrl/pinctrl-ti-iodelay.c > @@ -0,0 +1,963 @@ >[...] > +#include > +#include > +#include > +#include > +#include This is, I think, a bit of a red flag. > +#include > +#include > +#include > +#include > +#include > +#include > +#include [...] > +static const struct of_device_id ti_iodelay_of_match[] = { > + {.compatible = "ti,dra7-iodelay", .data = &dra7_iodelay_data}, > + { /* Hopefully no more.. */ }, > +}; > +MODULE_DEVICE_TABLE(of, ti_iodelay_of_match); > + > +static struct platform_driver ti_iodelay_driver = { > + .probe = ti_iodelay_probe, > + .remove = ti_iodelay_remove, > + .driver = { > + .owner = THIS_MODULE, So THIS_MODULE will, basically, be NULL. > + .name = DRIVER_NAME, > + .of_match_table = ti_iodelay_of_match, > + }, > +}; > +module_platform_driver(ti_iodelay_driver); > + > +MODULE_AUTHOR("Texas Instruments, Inc."); > +MODULE_DESCRIPTION("Pinconf driver for TI's IO Delay module"); > +MODULE_LICENSE("GPL v2"); And these three macros will be preprocessed away. (Perhaps there are non-modular alternatives to MODULE_DEVICE_TABLE and module_platform_driver, but I'm not sure how those two macros actually work.) Paul Bolle