Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jul 2019 16:01:51 +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-12@freebsd.org
Subject:   svn commit: r350046 - stable/12/sys/dev/nctgpio
Message-ID:  <201907161601.x6GG1peA016870@repo.freebsd.org>

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

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/12/sys/dev/nctgpio/nctgpio.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/nctgpio/nctgpio.c
==============================================================================
--- stable/12/sys/dev/nctgpio/nctgpio.c	Tue Jul 16 15:58:19 2019	(r350045)
+++ stable/12/sys/dev/nctgpio/nctgpio.c	Tue Jul 16 16:01:51 2019	(r350046)
@@ -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?201907161601.x6GG1peA016870>