linux-stable/drivers
Linus Walleij ae6b4d8588 pinctrl: add a pin config interface
This add per-pin and per-group pin config interfaces for biasing,
driving and other such electronic properties. The details of passed
configurations are passed in an opaque unsigned long which may be
dereferences to integer types, structs or lists on either side
of the configuration interface.

ChangeLog v1->v2:
- Clear split of terminology: we now have pin controllers, and
  those may support two interfaces using vtables: pin
  multiplexing and pin configuration.
- Break out pin configuration to its own C file, controllers may
  implement only config without mux, and vice versa, so keep each
  sub-functionality of pin controllers separate. Introduce
  CONFIG_PINCONF in Kconfig.
- Implement some core logic around pin configuration in the
  pinconf.c file.
- Remove UNKNOWN config states, these were just surplus baggage.
- Remove FLOAT config state - HIGH_IMPEDANCE should be enough for
  everyone.
- PIN_CONFIG_POWER_SOURCE added to handle switching the power
  supply for the pin logic between different sources
- Explicit DISABLE config enums to turn schmitt-trigger,
  wakeup etc OFF.
- Update documentation to reflect all the recent reasoning.
ChangeLog v2->v3:
- Twist API around to pass around arrays of config tuples instead
  of (param, value) pairs everywhere.
- Explicit drive strength semantics for push/pull and similar
  drive modes, this shall be the number of drive stages vs
  nominal load impedance, which should match the actual
  electronics used in push/pull CMOS or TTY totempoles.
- Drop load capacitance configuration - I probably don't know
  what I'm doing here so leave it out.
- Drop PIN_CONFIG_INPUT_SCHMITT_OFF, instead the argument zero to
  PIN_CONFIG_INPUT_SCHMITT turns schmitt trigger off.
- Drop PIN_CONFIG_NORMAL_POWER_MODE and have a well defined
  argument to PIN_CONFIG_LOW_POWER_MODE to get out of it instead.
- Drop PIN_CONFIG_WAKEUP_ENABLE/DISABLE and just use
  PIN_CONFIG_WAKEUP with defined value zero to turn wakeup off.
- Add PIN_CONFIG_INPUT_DEBOUNCE for configuring debounce time
  on input lines.
- Fix a bug when we tried to configure pins for pin controllers
  without pinconf support.
- Initialized debugfs properly so it works.
- Initialize the mutex properly and lock around config tampering
  sections.
- Check the return value from get_initial_config() properly.
ChangeLog v3->v4:
- Export the pin_config_get(), pin_config_set() and
  pin_config_group() functions.
- Drop the entire concept of just getting initial config and
  keeping track of pin states internally, instead ask the pins
  what state they are in. Previous idea was plain wrong, if the
  device cannot keep track of its state, the driver should do
  it.
- Drop the generic configuration layout, it seems this impose
  too much restriction on some pin controllers, so let them do
  things the way they want and split off support for generic
  config as an optional add-on.
ChangeLog v4->v5:
- Introduce two symmetric driver calls for group configuration,
  .pin_config_group_[get|set] and corresponding external calls.
- Remove generic semantic meanings of return values from config
  calls, these belong in the generic config patch. Just pass the
  return value through instead.
- Add a debugfs entry "pinconf-groups" to read status from group
  configuration only, also slam in a per-group debug callback in
  the pinconf_ops so custom drivers can display something
  meaningful for their pins.
- Fix some dangling newline.
- Drop dangling #else clause.
- Update documentation to match the above.
ChangeLog v5->v6:
- Change to using a pin name as parameter for the
  [get|set]_config() functions, as suggested by Stephen Warren.
  This is more natural as names will be what a developer has
  access to in written documentation etc.
ChangeLog v6->v7:
- Refactor out by-pin and by-name get/set functions, only expose
  the by-name functions externally, expose the by-pin functions
  internally.
- Show supported pin control functionality in the debugfs
  pinctrl-devices file.

Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-01-03 09:10:04 +01:00
..
accessibility
acpi ACPI / cpuidle: Remove acpi_idle_suspend (to fix suspend regression) 2011-11-12 21:30:14 -02:00
amba
ata libata: fix build without BMDMA 2011-11-17 02:11:42 -05:00
atm
auxdisplay
base Merge branch 'driver-core-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core 2011-11-21 20:36:26 -08:00
bcma
block paride: fix potential information leak in pg_read() 2011-11-16 09:21:50 +01:00
bluetooth Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2011-11-09 16:22:15 -05:00
cdrom
char fix typo/thinko in get_random_bytes() 2011-11-17 11:42:54 -02:00
clk
clocksource Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
connector
cpufreq [CPUFREQ] db8500: fix build error due to undeclared i variable 2011-11-11 22:28:33 -05:00
cpuidle Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2011-11-07 10:13:52 -08:00
crypto Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
dca
devfreq PM / devfreq: correct Kconfig dependency 2011-11-14 23:31:35 +01:00
dio
dma Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
edac Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
eisa
firewire Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
firmware drivers/firmware/dmi_scan.c: make dmi_name_in_vendors more focused 2011-11-15 22:41:51 -02:00
gpio pinctrl: move the U300 GPIO driver to pinctrl 2012-01-03 09:10:03 +01:00
gpu Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux 2011-11-23 09:47:25 -08:00
hid Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
hv
hwmon hwmon: (exynos4_tmu) Fix Kconfig dependency 2011-11-17 03:16:19 -08:00
hwspinlock Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-08 18:34:16 -08:00
i2c i2c: Make i2cdev_notifier_call static 2011-11-23 11:33:07 +01:00
ide Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide 2011-11-18 22:04:12 -02:00
idle Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2011-11-07 10:13:52 -08:00
ieee802154
infiniband Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2011-11-22 09:18:06 -08:00
iommu iommu: omap: Fix compile failure 2011-11-08 17:11:57 +01:00
isdn Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
leds Revert "leds: save the delay values after a successful call to blink_set()" 2011-11-15 22:41:50 -02:00
lguest
macintosh m68k/irq: Remove obsolete IRQ_FLG_* users 2011-11-08 22:35:48 +01:00
mca
md md/raid5: STRIPE_ACTIVE has lock semantics, add barriers 2011-11-08 16:22:06 +11:00
media Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2011-11-12 00:03:50 -02:00
memstick
message
mfd mfd: fix build failures in recently added ab5500 code 2011-11-07 21:45:14 -05:00
misc Merge branch 'char-misc-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc 2011-11-21 20:36:05 -08:00
mmc arm/imx: fix imx6q mmc error when mounting rootfs 2011-11-11 16:53:35 +01:00
mtd MTD: MAPS: bcm963xx-flash.c: explicitly include module.h 2011-11-07 21:26:55 -05:00
net sky2: fix hang in napi_disable 2011-11-17 21:43:57 -05:00
nfc
nubus
of Revert "of/irq: of_irq_find_parent: check for parent equal to child" 2011-11-22 15:09:20 -08:00
oprofile
parisc
parport
pci Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2011-11-23 14:58:46 -08:00
pcmcia Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
pinctrl pinctrl: add a pin config interface 2012-01-03 09:10:04 +01:00
platform platform/x86: fix dell-laptop function prototypes 2011-11-17 10:29:02 -02:00
pnp Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2011-11-07 10:13:52 -08:00
power Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
pps pps gpio client: add missing dependency 2011-11-02 16:07:02 -07:00
ps3 powerpc/ps3: irq: Remove IRQF_DISABLED 2011-11-08 14:51:46 +11:00
ptp
rapidio Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
regulator regulator: TPS65910: Fix VDD1/2 voltage selector count 2011-11-23 14:03:52 +00:00
rtc rtc: rtc-puv3: Add __devinit and __devexit markers for probe and remove 2011-11-15 17:13:17 +08:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2011-11-20 14:59:33 -08:00
sbus
scsi [SCSI] hpsa: Disable ASPM 2011-11-14 10:47:01 -06:00
sfi
sh Merge branches 'sh/pm-runtime' and 'common/clkfwk' into sh-fixes-for-linus 2011-11-11 16:16:25 +09:00
sn
spi Merge branch 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm 2011-11-20 14:34:58 -08:00
ssb
staging Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2011-11-22 13:19:21 -08:00
target Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
tc
telephony
thermal thermal: Prevent polling from happening during system suspend 2011-11-06 20:38:49 -05:00
tty Merge branch 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty 2011-11-21 20:36:46 -08:00
uio
usb Merge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb 2011-11-21 20:37:11 -08:00
uwb
vhost
video Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
virt
virtio virtio-pci: make reset operation safer 2011-11-24 13:04:48 +10:30
vlynq
w1 Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
watchdog watchdog: fix initialisation printout in s3c2410_wdt 2011-11-16 22:04:17 +01:00
xen xen-gntalloc: signedness bug in add_grefs() 2011-11-16 12:13:48 -05:00
zorro
Kconfig
Makefile