Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fbce1c23 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6

Changes queued in gpio/next for the start of the 3.3 merge window

* tag 'gpio-for-linus-20120104' of git://git.secretlab.ca/git/linux-2.6:
  gpio: Add decode of WM8994 GPIO configuration
  gpio: Convert GPIO drivers to module_platform_driver
  gpio: Fix typo in comment in Samsung driver
  gpio: Explicitly index samsung_gpio_cfgs
  gpio: Add Linus Walleij as gpio co-maintainer
  of: Add device tree selftests
  of: create of_phandle_args to simplify return of phandle parsing data
  gpio/powerpc: Eliminate duplication of of_get_named_gpio_flags()
  gpio/microblaze: Eliminate duplication of of_get_named_gpio_flags()
  gpiolib: output basic details and consolidate gpio device drivers
  pch_gpio: Change company name OKI SEMICONDUCTOR to LAPIS Semiconductor
  pch_gpio: Support new device LAPIS Semiconductor ML7831 IOH
  spi/pl022: make the chip deselect handling thread safe
  spi/pl022: add support for pm_runtime autosuspend
  spi/pl022: disable the PL022 block when unused
  spi/pl022: move device disable to workqueue thread
  spi/pl022: skip default configuration before suspending
  spi/pl022: fix build warnings
  spi/pl022: only enable RX interrupts when TX is complete
parents 7affca35 d0ad5e89
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2912,6 +2912,7 @@ F: include/linux/gigaset_dev.h

GPIO SUBSYSTEM
M:	Grant Likely <grant.likely@secretlab.ca>
M:	Linus Walleij <linus.walleij@stericsson.com>
S:	Maintained
T:	git git://git.secretlab.ca/git/linux-2.6.git
F:	Documentation/gpio.txt
+37 −0
Original line number Diff line number Diff line

/ {
	testcase-data {
		phandle-tests {
			provider0: provider0 {
				#phandle-cells = <0>;
			};

			provider1: provider1 {
				#phandle-cells = <1>;
			};

			provider2: provider2 {
				#phandle-cells = <2>;
			};

			provider3: provider3 {
				#phandle-cells = <3>;
			};

			consumer-a {
				phandle-list =	<&provider1 1>,
						<&provider2 2 0>,
						<0>,
						<&provider3 4 4 3>,
						<&provider2 5 100>,
						<&provider0>,
						<&provider1 7>;
				phandle-list-names = "first", "second", "third";

				phandle-list-bad-phandle = <12345678 0 0>;
				phandle-list-bad-args = <&provider2 1 0>,
							<&provider3 0>;
			};
		};
	};
};
+1 −0
Original line number Diff line number Diff line
/include/ "tests-phandle.dtsi"
+2 −0
Original line number Diff line number Diff line
@@ -46,3 +46,5 @@
		};
	};
};

/include/ "testcases/tests.dtsi"
+2 −41
Original line number Diff line number Diff line
@@ -19,50 +19,11 @@
static int handle; /* reset pin handle */
static unsigned int reset_val;

static int of_reset_gpio_handle(void)
{
	int ret; /* variable which stored handle reset gpio pin */
	struct device_node *root; /* root node */
	struct device_node *gpio; /* gpio node */
	struct gpio_chip *gc;
	u32 flags;
	const void *gpio_spec;

	/* find out root node */
	root = of_find_node_by_path("/");

	/* give me handle for gpio node to be possible allocate pin */
	ret = of_parse_phandles_with_args(root, "hard-reset-gpios",
				"#gpio-cells", 0, &gpio, &gpio_spec);
	if (ret) {
		pr_debug("%s: can't parse gpios property\n", __func__);
		goto err0;
	}

	gc = of_node_to_gpiochip(gpio);
	if (!gc) {
		pr_debug("%s: gpio controller %s isn't registered\n",
			 root->full_name, gpio->full_name);
		ret = -ENODEV;
		goto err1;
	}

	ret = gc->of_xlate(gc, root, gpio_spec, &flags);
	if (ret < 0)
		goto err1;

	ret += gc->base;
err1:
	of_node_put(gpio);
err0:
	pr_debug("%s exited with status %d\n", __func__, ret);
	return ret;
}

void of_platform_reset_gpio_probe(void)
{
	int ret;
	handle = of_reset_gpio_handle();
	handle = of_get_named_gpio(of_find_node_by_path("/"),
				   "hard-reset-gpios", 0);

	if (!gpio_is_valid(handle)) {
		printk(KERN_INFO "Skipping unavailable RESET gpio %d (%s)\n",
Loading