Date: Mon, 1 Jul 2019 15:43:48 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349579 - head/sys/dev/nctgpio Message-ID: <201907011543.x61FhmNZ036113@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Mon Jul 1 15:43:48 2019 New Revision: 349579 URL: https://svnweb.freebsd.org/changeset/base/349579 Log: 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). Discussed with: cem, gonzo MFC after: 2 weeks Modified: head/sys/dev/nctgpio/nctgpio.c Modified: head/sys/dev/nctgpio/nctgpio.c ============================================================================== --- head/sys/dev/nctgpio/nctgpio.c Mon Jul 1 13:41:37 2019 (r349578) +++ head/sys/dev/nctgpio/nctgpio.c Mon Jul 1 15:43:48 2019 (r349579) @@ -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?201907011543.x61FhmNZ036113>