Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Sep 2014 16:40:54 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r271104 - head/sys/arm/at91
Message-ID:  <201409041640.s84GesmM018827@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Thu Sep  4 16:40:54 2014
New Revision: 271104
URL: http://svnweb.freebsd.org/changeset/base/271104

Log:
  Wrap some long lines.

Modified:
  head/sys/arm/at91/at91_pinctrl.c

Modified: head/sys/arm/at91/at91_pinctrl.c
==============================================================================
--- head/sys/arm/at91/at91_pinctrl.c	Thu Sep  4 16:05:12 2014	(r271103)
+++ head/sys/arm/at91/at91_pinctrl.c	Thu Sep  4 16:40:54 2014	(r271104)
@@ -138,8 +138,8 @@ at91_pinctrl_setup_dinfo(device_t dev, p
 		}
 		if (OF_searchencprop(OF_node_from_xref(iparent), 
 		    "#interrupt-cells", &icells, sizeof(icells)) == -1) {
-			device_printf(dev, "Missing #interrupt-cells property, "
-			    "assuming <1>\n");
+			device_printf(dev, "Missing #interrupt-cells property,"
+			    " assuming <1>\n");
 			icells = 1;
 		}
 		if (icells < 1 || icells > nintr) {
@@ -388,19 +388,22 @@ pinctrl_walk_tree(device_t bus, phandle_
 		OF_getprop(node, "status", status, sizeof(status));
 		OF_getprop(node, "name", name, sizeof(name));
 		if (strcmp(status, "okay") != 0) {
-//			printf("pinctrl: omitting node %s since it isn't active\n", name);
+//			printf("pinctrl: skipping node %s status %s\n", name,
+//			    status);
 			continue;
 		}
 		len = OF_getencprop(node, "pinctrl-0", pinctrl, sizeof(pinctrl));
 		if (len <= 0) {
-//			printf("pinctrl: no pinctrl-0 property for node %s, omitting\n", name);
+//			printf("pinctrl: skipping node %s no pinctrl-0\n",
+//			    name, status);
 			continue;
 		}
 		len /= sizeof(phandle_t);
 		printf("pinctrl: Found active node %s\n", name);
 		for (i = 0; i < len; i++) {
 			scratch = OF_node_from_xref(pinctrl[i]);
-			npins = OF_getencprop(scratch, "atmel,pins", pins, sizeof(pins));
+			npins = OF_getencprop(scratch, "atmel,pins", pins,
+			    sizeof(pins));
 			if (npins <= 0) {
 				printf("We're doing it wrong %s\n", name);
 				continue;
@@ -408,29 +411,40 @@ pinctrl_walk_tree(device_t bus, phandle_
 			memset(name, 0, sizeof(name));
 			OF_getprop(scratch, "name", name, sizeof(name));
 			npins /= (4 * 4);
-			printf("----> need to cope with %d more pins for %s\n", npins, name);
+			printf("----> need to cope with %d more pins for %s\n",
+			    npins, name);
 			for (j = 0; j < npins; j++) {
 				uint32_t unit = pins[j * 4];
 				uint32_t pin = pins[j * 4 + 1];
 				uint32_t periph = pins[j * 4 + 2];
 				uint32_t flags = pins[j * 4 + 3];
-				uint32_t pio = (0xfffffff & sc->ranges[0].bus) + 0x200 * unit;
-				printf("P%c%d %s %#x\n", unit + 'A', pin, periphs[periph],
-				       flags);
+				uint32_t pio;
+
+				pio = (0xfffffff & sc->ranges[0].bus) +
+				    0x200 * unit;
+				printf("P%c%d %s %#x\n", unit + 'A', pin,
+				    periphs[periph], flags);
 				switch (periph) {
 				case 0:
 					at91_pio_use_gpio(pio, 1u << pin);
-					at91_pio_gpio_pullup(pio, 1u << pin, !!(flags & 1));
-					at91_pio_gpio_high_z(pio, 1u << pin, !!(flags & 2));
-					at91_pio_gpio_set_deglitch(pio, 1u << pin, !!(flags & 4));
-					// at91_pio_gpio_pulldown(pio, 1u << pin, !!(flags & 8));
-					// at91_pio_gpio_dis_schmidt(pio, 1u << pin, !!(flags & 16));
+					at91_pio_gpio_pullup(pio, 1u << pin,
+					    !!(flags & 1));
+					at91_pio_gpio_high_z(pio, 1u << pin,
+					    !!(flags & 2));
+					at91_pio_gpio_set_deglitch(pio,
+					    1u << pin, !!(flags & 4));
+//					at91_pio_gpio_pulldown(pio, 1u << pin,
+//					    !!(flags & 8));
+//					at91_pio_gpio_dis_schmidt(pio,
+//					    1u << pin, !!(flags & 16));
 					break;
 				case 1:
-					at91_pio_use_periph_a(pio, 1u << pin, flags);
+					at91_pio_use_periph_a(pio, 1u << pin,
+					    flags);
 					break;
 				case 2:
-					at91_pio_use_periph_b(pio, 1u << pin, flags);
+					at91_pio_use_periph_b(pio, 1u << pin,
+					    flags);
 					break;
 				}
 			}
@@ -493,8 +507,8 @@ static driver_t at91_pinctrl_driver = {
 
 static devclass_t at91_pinctrl_devclass;
 
-EARLY_DRIVER_MODULE(at91_pinctrl, simplebus, at91_pinctrl_driver, at91_pinctrl_devclass,
-    NULL, NULL, BUS_PASS_BUS);
+EARLY_DRIVER_MODULE(at91_pinctrl, simplebus, at91_pinctrl_driver,
+    at91_pinctrl_devclass, NULL, NULL, BUS_PASS_BUS);
 
 /*
  * dummy driver to force pass BUS_PASS_PINMUX to happen.
@@ -520,5 +534,5 @@ static driver_t at91_pingroup_driver = {
 
 static devclass_t at91_pingroup_devclass;
 
-EARLY_DRIVER_MODULE(at91_pingroup, at91_pinctrl, at91_pingroup_driver, at91_pingroup_devclass,
-    NULL, NULL, BUS_PASS_PINMUX);
+EARLY_DRIVER_MODULE(at91_pingroup, at91_pinctrl, at91_pingroup_driver,
+    at91_pingroup_devclass, NULL, NULL, BUS_PASS_PINMUX);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409041640.s84GesmM018827>