lkml.org 
[lkml]   [2015]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/2] pinctrl: Add driver for Alphascale asm9260 pinctrl
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

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-04-05 08:21    [W:0.090 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site