Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jul 2019 16:02:03 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r350047 - stable/11/sys/dev/nctgpio
Message-ID:  <201907161602.x6GG23QI017534@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Tue Jul 16 16:02:03 2019
New Revision: 350047
URL: https://svnweb.freebsd.org/changeset/base/350047

Log:
  MFC r349579: nctgpio: change default pin names to those used by the datasheet(s)
  
  That is, instead of the current GPIO00 - GPIO15 the names will be GPIO00
  - GPIO07, GPIO10 - GPIO17.  The first digit is a GPIO "bank" / group
  number and the second one is a pin number within the bank.  Alternative
  view is that the pin names are changed from decimal numbering scheme to
  octal one (as there are 8 pins per bank).

Modified:
  stable/11/sys/dev/nctgpio/nctgpio.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/nctgpio/nctgpio.c
==============================================================================
--- stable/11/sys/dev/nctgpio/nctgpio.c	Tue Jul 16 16:01:51 2019	(r350046)
+++ stable/11/sys/dev/nctgpio/nctgpio.c	Tue Jul 16 16:02:03 2019	(r350047)
@@ -529,7 +529,7 @@ nct_attach(device_t dev)
 		pin->gp_caps = NCT_GPIO_CAPS;
 		pin->gp_flags = 0;
 
-		snprintf(pin->gp_name, GPIOMAXNAME, "GPIO%02u", i);
+		snprintf(pin->gp_name, GPIOMAXNAME, "GPIO%02o", i);
 		pin->gp_name[GPIOMAXNAME - 1] = '\0';
 
 		if (nct_pin_is_input(sc, i))



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