linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* pinctrl: imx: Checking reuse of grouping functionality
@ 2017-04-15 19:55 SF Markus Elfring
  2017-04-17  8:25 ` Gary Bisson
  0 siblings, 1 reply; 3+ messages in thread
From: SF Markus Elfring @ 2017-04-15 19:55 UTC (permalink / raw)
  To: linux-gpio, Alexander Shiyan, Fabio Estevam, Gary Bisson,
	Linus Walleij, Paul Gortmaker, Peng Fan, Tony Lindgren,
	Vladimir Zapolskiy
  Cc: LKML, kernel-janitors

Hello,

A preprocessor symbol like “CONFIG_GENERIC_PINCTRL_GROUPS” was introduced
by the commit c033a718f615b6b3ddc83ce3e0a217c30bd09cb5 (“pinctrl: stricten up
generic group code”) on 2017-01-03. Some functions are only available then
when this macro is defined.

I have got the impression that the corresponding programming interface is used
by the source file “drivers/pinctrl/freescale/pinctrl-imx.c” unconditionally.
How do you think about to extend specifications for conditional compilation there?

Regards,
Markus

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: pinctrl: imx: Checking reuse of grouping functionality
  2017-04-15 19:55 pinctrl: imx: Checking reuse of grouping functionality SF Markus Elfring
@ 2017-04-17  8:25 ` Gary Bisson
  2017-04-17 16:08   ` SF Markus Elfring
  0 siblings, 1 reply; 3+ messages in thread
From: Gary Bisson @ 2017-04-17  8:25 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: linux-gpio, Alexander Shiyan, Fabio Estevam, Linus Walleij,
	Paul Gortmaker, Peng Fan, Tony Lindgren, Vladimir Zapolskiy,
	LKML, kernel-janitors

Hi Markus, All,

On Sat, Apr 15, 2017 at 9:55 PM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
> Hello,
>
> A preprocessor symbol like “CONFIG_GENERIC_PINCTRL_GROUPS” was introduced
> by the commit c033a718f615b6b3ddc83ce3e0a217c30bd09cb5 (“pinctrl: stricten up
> generic group code”) on 2017-01-03. Some functions are only available then
> when this macro is defined.

Yes because the pinctrl driver can be used without this configuration
by some drivers.

> I have got the impression that the corresponding programming interface is used
> by the source file “drivers/pinctrl/freescale/pinctrl-imx.c” unconditionally.
> How do you think about to extend specifications for conditional compilation there?

However the imx pinctrl driver _absolutely_ needs this configuration
to work. That is why it is selected automatically when the driver is
enabled [1].

Therefore it isn't possible to build the driver without
GENERIC_PINCTRL_GROUPS and so adding conditions is not necessary.

Regards,
Gary

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pinctrl/freescale/Kconfig#n3

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: pinctrl: imx: Checking reuse of grouping functionality
  2017-04-17  8:25 ` Gary Bisson
@ 2017-04-17 16:08   ` SF Markus Elfring
  0 siblings, 0 replies; 3+ messages in thread
From: SF Markus Elfring @ 2017-04-17 16:08 UTC (permalink / raw)
  To: Gary Bisson
  Cc: linux-gpio, Alexander Shiyan, Fabio Estevam, Linus Walleij,
	Paul Gortmaker, Peng Fan, Tony Lindgren, Vladimir Zapolskiy,
	LKML, kernel-janitors

> However the imx pinctrl driver _absolutely_ needs this configuration to work.

Thanks for your explanation that the file “drivers/pinctrl/freescale/Kconfig”
will usually provide needed information for this software module.

Would it make sense to document such a requirement also by a preprocessor error
directive in the source file “drivers/pinctrl/freescale/pinctrl-imx.c”
for the special case if the macro “CONFIG_GENERIC_PINCTRL_GROUPS” would
accidentally not be defined?

Regards,
Markus

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-17 16:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-15 19:55 pinctrl: imx: Checking reuse of grouping functionality SF Markus Elfring
2017-04-17  8:25 ` Gary Bisson
2017-04-17 16:08   ` SF Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).