From owner-svn-src-head@FreeBSD.ORG Sun Apr 27 15:13:14 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12FA5868; Sun, 27 Apr 2014 15:13:14 +0000 (UTC) Received: from i3mail.icecube.wisc.edu (i3mail.icecube.wisc.edu [128.104.255.23]) by mx1.freebsd.org (Postfix) with ESMTP id D988D1D55; Sun, 27 Apr 2014 15:13:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by i3mail.icecube.wisc.edu (Postfix) with ESMTP id 7BAF738064; Sun, 27 Apr 2014 10:13:11 -0500 (CDT) X-Virus-Scanned: amavisd-new at icecube.wisc.edu Received: from i3mail.icecube.wisc.edu ([127.0.0.1]) by localhost (i3mail.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10030) with ESMTP id 2E19WdagWsrz; Sun, 27 Apr 2014 10:13:11 -0500 (CDT) Received: from comporellon.tachypleus.net (polaris.tachypleus.net [75.101.50.44]) by i3mail.icecube.wisc.edu (Postfix) with ESMTPSA id E45C33804C; Sun, 27 Apr 2014 10:13:10 -0500 (CDT) Message-ID: <535D1E85.8020502@freebsd.org> Date: Sun, 27 Apr 2014 08:13:09 -0700 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Luiz Otavio O Souza , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r265012 - in head/sys/dev: gpio ofw References: <201404271211.s3RCB1wI018791@svn.freebsd.org> In-Reply-To: <201404271211.s3RCB1wI018791@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Apr 2014 15:13:14 -0000 On 04/27/14 05:11, Luiz Otavio O Souza wrote: > Author: loos > Date: Sun Apr 27 12:11:00 2014 > New Revision: 265012 > URL: http://svnweb.freebsd.org/changeset/base/265012 > > Log: > Fix the gpio-specifier decoding by respecting the GPIO controller's > #gpio-cells property. > > Add a new ofw_bus method (OFW_BUS_MAP_GPIOS()) that allows the GPIO > controller to implement its own mapping to deal with gpio-specifiers, > allowing the decoding of gpio-specifiers to be controller specific. > > The default ofw_bus_map_gpios() decodes the linux standard (#gpio-cells = > <2>) and the FreeBSD standard (#gpio-cells = <3>). > > It pass the gpio-specifier flag field to the children as an ivar variable so > they can act upon. > > Modified: > head/sys/dev/gpio/gpiobusvar.h > head/sys/dev/gpio/ofw_gpiobus.c > head/sys/dev/ofw/ofw_bus.h > head/sys/dev/ofw/ofw_bus_if.m Would it be possible to put the routines from ofw_bus* into dev/gpio instead? I'd like to avoid polluting dev/ofw with bus-specific parts as much as possible. -Nathan