diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-21 13:58:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-21 13:58:17 -0500 |
commit | ac26663572db5b64522b92f3941a58678a832a36 (patch) | |
tree | 3a8d27153de37cb3f3fb0ff6843a1e727c961005 /drivers/pinctrl | |
parent | d4371f94bc003e912d4825f5c4bdf57959857073 (diff) | |
parent | 02915661dbb91b25b621ab3f387ab55311bded7f (diff) |
Merge tag 'mfd-3.14-1' of git://git.linaro.org/people/ljones/mfd
Pull MFD changes from Lee Jones:
"New drivers
- Samsung Maxim 14577; Micro USB, Regulator, IRQ Controller and
Battery Charger
- TI/National Semiconductor LP3943 I2C GPIO Expander and PWM
Generator
Existing driver adaptions
- Expansion of Wolfson Arizona DSP and High-Pass filter controls
- TI TWL6040 default Regmap support and Regcache addition/bypass
- Some nice Smatch catch fixes
- Conversion of TI OMAP-USB and TI TWL6030 to endian neutralness
- ChromeOS EC timing (delay) adaptions and added dependency on OF
- Many constifications of 'struct {mfd_cell,regmap_irq,et.al}'
- Watchdog support added for NVIDIA AS3722
- Convert functions to static in TI AM335x
- Realigned previously defeated functionality in TI AM335x
- IIO ADC-TSC concurrency dead-lock/timeout resolution
- Addition of Power Management and Clock support for Samsung core
- DEFINE_PCI_DEVICE_TABLE macro removal from MFD Subsystem
- Greater use of irqdomain functionality in ST-E AB8500
- Removal of 'include/linux/mfd/abx500/ab8500-gpio.h'
- Wolfson WM831x PMIC Power Management changes s/poweroff/shutdown/
- Device Tree documentation added for TI/Nat Semi LP3943
- Version detection and voltage tables for TI TPS6586x PMIC devices
- Simplification of Freescale MC13XXX (de-)initialisation routines
- Clean-up and simplification of the Realtek parent driver
- Added support for RTL8402 Realtek PCI-Express card reader
- Resource leak fix for Maxim 77686
- Possible suspend BUG() fix in OMAP USB TLL
- Support for new Wolfson WM5110 Revision (D)
- Testing of automatic assignment of of_node in mfd_add_device()
- Reversion of the above when it started to cause issues
- Remove legacy Platform Data from;
TI TWL Core, Qualcomm SSBI and ST-E ABx500 Pinctrl
- Clean-ups; tabbing issues, function name changes, 'drvdata = NULL'
removal, unused uninitialised warning mitigation, error
message clarity, removal of redundant/duplicate checks,
licensing (GPL -> GPL2), coding consistency, duplicate
function declaration, ret checks, commit corrections,
redundant of_match_ptr() helper removal, spelling,
#if-deffery removal and header guards name changes"
* tag 'mfd-3.14-1' of git://git.linaro.org/people/ljones/mfd: (78 commits)
mfd: wm5110: Add register patch for rev D chip
mfd: omap-usb-tll: Don't hold lock during pm_runtime_get/put_sync()
gpio: lp3943: Remove redundant of_match_ptr helper
mfd: sta2x11-mfd: Use named constants for pci_power_t values
Documentation: mfd: Fix LDO index in s2mps11.txt
mfd: Cleanup mfd-mcp-sa11x0.h header
mfd: max8997: Use "IS_ENABLED(CONFIG_OF)" for DT code.
mfd: twl6030: Fix endianness problem in IRQ handler
mfd: sec-core: Add cells for S5M8767-clocks
mfd: max14577: Remove redundant of_match_ptr helper
mfd: twl6040: Fix sparse non static symbol warning
mfd: Revert "mfd: Always assign of_node in mfd_add_device()"
mfd: rtsx: Fix sparse non static symbol warning
mfd: max77693: Set proper maximum register for MUIC regmap
mfd: max77686: Fix regmap resource leak on driver remove
mfd: Represent correct filenames in file headers
mfd: rtsx: Add support for card reader rtl8402
mfd: rtsx: Add set pull control macro and simplify rtl8411
mfd: max8997: Enforce mfd_add_devices() return value check
mfd: mc13xxx: Simplify probe() & remove()
...
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/pinctrl-abx500.c | 37 | ||||
-rw-r--r-- | drivers/pinctrl/pinctrl-abx500.h | 12 |
2 files changed, 21 insertions, 28 deletions
diff --git a/drivers/pinctrl/pinctrl-abx500.c b/drivers/pinctrl/pinctrl-abx500.c index 5183e7bb8de3..163da9c3ea0e 100644 --- a/drivers/pinctrl/pinctrl-abx500.c +++ b/drivers/pinctrl/pinctrl-abx500.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/bitops.h> | 24 | #include <linux/bitops.h> |
25 | #include <linux/mfd/abx500.h> | 25 | #include <linux/mfd/abx500.h> |
26 | #include <linux/mfd/abx500/ab8500.h> | 26 | #include <linux/mfd/abx500/ab8500.h> |
27 | #include <linux/mfd/abx500/ab8500-gpio.h> | ||
28 | #include <linux/pinctrl/pinctrl.h> | 27 | #include <linux/pinctrl/pinctrl.h> |
29 | #include <linux/pinctrl/consumer.h> | 28 | #include <linux/pinctrl/consumer.h> |
30 | #include <linux/pinctrl/pinmux.h> | 29 | #include <linux/pinctrl/pinmux.h> |
@@ -1218,21 +1217,15 @@ static const struct of_device_id abx500_gpio_match[] = { | |||
1218 | 1217 | ||
1219 | static int abx500_gpio_probe(struct platform_device *pdev) | 1218 | static int abx500_gpio_probe(struct platform_device *pdev) |
1220 | { | 1219 | { |
1221 | struct ab8500_platform_data *abx500_pdata = | ||
1222 | dev_get_platdata(pdev->dev.parent); | ||
1223 | struct abx500_gpio_platform_data *pdata = NULL; | ||
1224 | struct device_node *np = pdev->dev.of_node; | 1220 | struct device_node *np = pdev->dev.of_node; |
1221 | const struct of_device_id *match; | ||
1225 | struct abx500_pinctrl *pct; | 1222 | struct abx500_pinctrl *pct; |
1226 | const struct platform_device_id *platid = platform_get_device_id(pdev); | ||
1227 | unsigned int id = -1; | 1223 | unsigned int id = -1; |
1228 | int ret, err; | 1224 | int ret, err; |
1229 | int i; | 1225 | int i; |
1230 | 1226 | ||
1231 | if (abx500_pdata) | 1227 | if (!np) { |
1232 | pdata = abx500_pdata->gpio; | 1228 | dev_err(&pdev->dev, "gpio dt node missing\n"); |
1233 | |||
1234 | if (!(pdata || np)) { | ||
1235 | dev_err(&pdev->dev, "gpio dt and platform data missing\n"); | ||
1236 | return -ENODEV; | 1229 | return -ENODEV; |
1237 | } | 1230 | } |
1238 | 1231 | ||
@@ -1248,17 +1241,14 @@ static int abx500_gpio_probe(struct platform_device *pdev) | |||
1248 | pct->parent = dev_get_drvdata(pdev->dev.parent); | 1241 | pct->parent = dev_get_drvdata(pdev->dev.parent); |
1249 | pct->chip = abx500gpio_chip; | 1242 | pct->chip = abx500gpio_chip; |
1250 | pct->chip.dev = &pdev->dev; | 1243 | pct->chip.dev = &pdev->dev; |
1251 | pct->chip.base = (np) ? -1 : pdata->gpio_base; | 1244 | pct->chip.base = -1; /* Dynamic allocation */ |
1252 | |||
1253 | if (platid) | ||
1254 | id = platid->driver_data; | ||
1255 | else if (np) { | ||
1256 | const struct of_device_id *match; | ||
1257 | 1245 | ||
1258 | match = of_match_device(abx500_gpio_match, &pdev->dev); | 1246 | match = of_match_device(abx500_gpio_match, &pdev->dev); |
1259 | if (match) | 1247 | if (!match) { |
1260 | id = (unsigned long)match->data; | 1248 | dev_err(&pdev->dev, "gpio dt not matching\n"); |
1249 | return -ENODEV; | ||
1261 | } | 1250 | } |
1251 | id = (unsigned long)match->data; | ||
1262 | 1252 | ||
1263 | /* Poke in other ASIC variants here */ | 1253 | /* Poke in other ASIC variants here */ |
1264 | switch (id) { | 1254 | switch (id) { |
@@ -1349,14 +1339,6 @@ static int abx500_gpio_remove(struct platform_device *pdev) | |||
1349 | return 0; | 1339 | return 0; |
1350 | } | 1340 | } |
1351 | 1341 | ||
1352 | static const struct platform_device_id abx500_pinctrl_id[] = { | ||
1353 | { "pinctrl-ab8500", PINCTRL_AB8500 }, | ||
1354 | { "pinctrl-ab8540", PINCTRL_AB8540 }, | ||
1355 | { "pinctrl-ab9540", PINCTRL_AB9540 }, | ||
1356 | { "pinctrl-ab8505", PINCTRL_AB8505 }, | ||
1357 | { }, | ||
1358 | }; | ||
1359 | |||
1360 | static struct platform_driver abx500_gpio_driver = { | 1342 | static struct platform_driver abx500_gpio_driver = { |
1361 | .driver = { | 1343 | .driver = { |
1362 | .name = "abx500-gpio", | 1344 | .name = "abx500-gpio", |
@@ -1365,7 +1347,6 @@ static struct platform_driver abx500_gpio_driver = { | |||
1365 | }, | 1347 | }, |
1366 | .probe = abx500_gpio_probe, | 1348 | .probe = abx500_gpio_probe, |
1367 | .remove = abx500_gpio_remove, | 1349 | .remove = abx500_gpio_remove, |
1368 | .id_table = abx500_pinctrl_id, | ||
1369 | }; | 1350 | }; |
1370 | 1351 | ||
1371 | static int __init abx500_gpio_init(void) | 1352 | static int __init abx500_gpio_init(void) |
diff --git a/drivers/pinctrl/pinctrl-abx500.h b/drivers/pinctrl/pinctrl-abx500.h index 82293806e842..2beef3bfe9ca 100644 --- a/drivers/pinctrl/pinctrl-abx500.h +++ b/drivers/pinctrl/pinctrl-abx500.h | |||
@@ -15,6 +15,18 @@ enum abx500_pin_func { | |||
15 | ABX500_ALT_C, | 15 | ABX500_ALT_C, |
16 | }; | 16 | }; |
17 | 17 | ||
18 | enum abx500_gpio_pull_updown { | ||
19 | ABX500_GPIO_PULL_DOWN = 0x0, | ||
20 | ABX500_GPIO_PULL_NONE = 0x1, | ||
21 | ABX500_GPIO_PULL_UP = 0x3, | ||
22 | }; | ||
23 | |||
24 | enum abx500_gpio_vinsel { | ||
25 | ABX500_GPIO_VINSEL_VBAT = 0x0, | ||
26 | ABX500_GPIO_VINSEL_VIN_1V8 = 0x1, | ||
27 | ABX500_GPIO_VINSEL_VDD_BIF = 0x2, | ||
28 | }; | ||
29 | |||
18 | /** | 30 | /** |
19 | * struct abx500_function - ABx500 pinctrl mux function | 31 | * struct abx500_function - ABx500 pinctrl mux function |
20 | * @name: The name of the function, exported to pinctrl core. | 32 | * @name: The name of the function, exported to pinctrl core. |