From: Oleksij Rempel <linux@rempel-privat.de>
To: Paul Bolle <pebolle@tiscali.nl>
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
Date: Sun, 05 Apr 2015 08:16:37 +0200 [thread overview]
Message-ID: <5520D345.9050106@rempel-privat.de> (raw)
In-Reply-To: <1427476243.2334.12.camel@x220>
[-- Attachment #1: Type: text/plain, Size: 2941 bytes --]
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).
>
> 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 also
>> supports the GPIO functionality through gpiolib.
>>
>> +config PINCTRL_ASM9260
>> + bool "Pinctrl driver for Alphascale asm9260"
>
> This adds a bool symbol.
>
>> + depends on MACH_ASM9260
>> + select PINMUX
>> + select GENERIC_PINCONF
>> + help
>> + Say Y here to enable the Alphascale asm9260 pinctrl driver
>> +
>
>> -- a/drivers/pinctrl/Makefile
>> +++ b/drivers/pinctrl/Makefile
>
>> +obj-$(CONFIG_PINCTRL_ASM9260) += pinctrl-asm9260.o
>
> So this object can now only be built-in.
>
>> --- /dev/null
>> +++ b/drivers/pinctrl/pinctrl-asm9260.c
>> @@ -0,0 +1,733 @@
>> +/*
>> + * Pinctrl driver for the Alphascale ASM9260 SoC
>> + *
>> + * Copyright (c) 2014, Oleksij Rempel <linux@rempel-privat.de>
>> + *
>> + * This program is free software; you can redistribute it and/or modify it
>> + * under the terms and conditions of the GNU General Public License,
>> + * version 2, as published by the Free Software Foundation.
>> + */
>> +
>> +#include <linux/clk.h>
>> +#include <linux/io.h>
>> +#include <linux/module.h>
>
> This include is probably not needed.
>
>> +#include <linux/pinctrl/pinconf-generic.h>
>> +#include <linux/pinctrl/pinmux.h>
>> +#include <linux/platform_device.h>
>> +
>> +#include "core.h"
>> +#include "pinctrl-utils.h"
>
>> +/*
>> + * Pin control driver setup
>> + */
>> +static struct pinctrl_desc asm9260_pinctrl_desc = {
>> + .pctlops = &asm9260_pinctrl_ops,
>> + .pmxops = &asm9260_pinmux_ops,
>> + .confops = &asm9260_pinconf_ops,
>> + .owner = THIS_MODULE,
>
> THIS_MODULE is, basically, equivalent to NULL for built-in code.
>
>> +};
>> +
>
>> +MODULE_DEVICE_TABLE(of, asm9260_pinctrl_of_match);
>
> This will be preprocessed away for built-in code.
>
>> +module_platform_driver(asm9260_pinctrl_driver);
>
> The built-in equivalent of this seems to be a wrapper that
> only does
> platform_driver_register(&asm9260_pinctrl_driver);
>
> and mark that wrapper as a device_initcall(). There appears to be no
> macro that does all that in one line.
>
>> +MODULE_AUTHOR("Oleksij Rempel <linux@rempel-privat.de>");
>> +MODULE_DESCRIPTION("Alphascale ASM9260 pinctrl driver");
>> +MODULE_LICENSE("GPL");
>
> 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.
--
Regards,
Oleksij
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 230 bytes --]
next prev parent reply other threads:[~2015-04-05 6:16 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CACRpkdbKLkMB6WP0zp2xN+gM4ytvs=3V5hh8uKt8e=YE4gAAqQ@mail.gmail.com>
2015-03-27 9:36 ` [PATCH v2 0/2] Add driver and documentation for Alphascale asm9260 pinctrl Oleksij Rempel
2015-03-27 9:36 ` [PATCH v2 1/2] pinctrl: Add driver " Oleksij Rempel
2015-03-27 17:10 ` Paul Bolle
2015-04-05 5:49 ` Oleksij Rempel
2015-04-05 6:16 ` Oleksij Rempel [this message]
2015-04-05 6:26 ` [PATCH v3 0/2] Add driver and documentation " Oleksij Rempel
2015-04-05 6:26 ` [PATCH v3 1/2] pinctrl: Add driver " Oleksij Rempel
2015-04-06 7:42 ` Paul Bolle
2015-04-06 8:38 ` Oleksij Rempel
2015-04-06 9:41 ` Paul Bolle
2015-04-06 9:45 ` Oleksij Rempel
2015-04-06 9:04 ` [PATCH v4 0/2] Add driver and documentation " Oleksij Rempel
2015-04-06 9:04 ` [PATCH v4 1/2] pinctrl: Add driver " Oleksij Rempel
2015-05-05 15:12 ` Linus Walleij
2015-05-12 16:25 ` Oleksij Rempel
2015-05-13 11:00 ` Linus Walleij
2015-05-14 7:26 ` Oleksij Rempel
2015-09-09 5:55 ` Oleksij Rempel
2015-09-25 17:14 ` Linus Walleij
2015-04-06 9:04 ` [PATCH v4 2/2] pinctrl: asm9260: add pinctrl add device tree bindings documentation Oleksij Rempel
2015-05-05 14:46 ` Linus Walleij
2015-05-12 16:02 ` Oleksij Rempel
2015-04-22 19:49 ` [PATCH v4 0/2] Add driver and documentation for Alphascale asm9260 pinctrl Oleksij Rempel
2015-05-05 14:41 ` Linus Walleij
2015-04-05 6:26 ` [PATCH v3 2/2] pinctrl: asm9260: add pinctrl add device tree bindings documentation Oleksij Rempel
2015-03-27 9:36 ` [PATCH v2 " Oleksij Rempel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5520D345.9050106@rempel-privat.de \
--to=linux@rempel-privat.de \
--cc=devicetree@vger.kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pebolle@tiscali.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox