From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::442; helo=mail-wr1-x442.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 38DC821193590 for ; Tue, 4 Dec 2018 07:18:20 -0800 (PST) Received: by mail-wr1-x442.google.com with SMTP id q18so16346496wrx.9 for ; Tue, 04 Dec 2018 07:18:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=jJaYR8wTzE5VKqQYEAhLRlK8mMNpHdRRIFsd5p1pcVQ=; b=Iod3pVQdtPYikfbvivfwRMf0fNoPk0iVpjEBCx+8kig/5+8q77qfAvfMVBV09l+DyW jsG9gblmNcbhkQyMyNpwVm5mIOH4ti7qOEfRbdGdnNNnpke/E0agORcal79M48DoA/XK GY5d9qwrxHcWh3XpfCRR8rHMym7AvLkfXRAdM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=jJaYR8wTzE5VKqQYEAhLRlK8mMNpHdRRIFsd5p1pcVQ=; b=RPwAfDCGOnpukvSyHsaZYHRWIKjDCQTzOHzxGXJV/d8qeAEPbFZSMe11ZAo7rrUhEt SvVtDBMa98X/5Fq4wczkaUYnP0I1Ola+6koPW9kayAmOhvLh3bFZNc2as2cuCLKkNQp8 44yG1bsl1swVDhiqm4jGIJEjTZubzqNnjuISz//P2umgcZMJqvKsCJd4xdiTsysGXHTN b0w7+jJkhA9dQ+iHRCHC5Vc44un21Zetf0AdvuQWjkVj5FMlsE0BVxVZACW6YZVLVDCM V+KOU9OMcGsnJ0BammP2sRvZqGO364ZQwdEdnzdvV+mJPjnVXY+/jd3O7/qksEhjphya lVxA== X-Gm-Message-State: AA+aEWb7ixJGwjEmxUZfbS7sLweAhfzSMPsCCXWBxrJyn2BuQAIySAPA 3tO/8bnuq+idYY4YJ/EOv/8RDA== X-Google-Smtp-Source: AFSGD/VYdd3yeOT/b29iYoiwnAUdsN+HLjULxntCs/tMLAbLuj1uI1MrI9IUb4Y5M7CaYtbST5qJVA== X-Received: by 2002:adf:9382:: with SMTP id 2mr18173827wrp.269.1543936698399; Tue, 04 Dec 2018 07:18:18 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id l20sm37217979wrb.93.2018.12.04.07.18.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Dec 2018 07:18:17 -0800 (PST) Date: Tue, 4 Dec 2018 15:18:15 +0000 From: Leif Lindholm To: Marcin Wojtas Cc: edk2-devel@lists.01.org, ard.biesheuvel@linaro.org, nadavh@marvell.com, jsd@semihalf.com, jaz@semihalf.com, kostap@marvell.com Message-ID: <20181204151815.mvttx4e4ae63frjt@bivouac.eciton.net> References: <1540000661-1956-1-git-send-email-mw@semihalf.com> <1540000661-1956-3-git-send-email-mw@semihalf.com> <20181114011222.pqyq2rlkcvn7glmq@bivouac.eciton.net> MIME-Version: 1.0 In-Reply-To: <20181114011222.pqyq2rlkcvn7glmq@bivouac.eciton.net> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [platforms: PATCH 02/12] Marvell/Library: ArmadaBoardDescLib: Add GPIO information X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Dec 2018 15:18:20 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Nov 14, 2018 at 01:12:22AM +0000, Leif Lindholm wrote: > On Sat, Oct 20, 2018 at 03:57:31AM +0200, Marcin Wojtas wrote: > > This patch extends library with GPIO devices per-board > > description. Both embedded SoC controllers and > > I2C IO expanders are supported. Add a helper routine > > for obtaining information about the latter. > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Marcin Wojtas > > --- > > Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h | 23 ++++++++++++++++++++ > > 1 file changed, 23 insertions(+) > > > > diff --git a/Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h b/Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h > > index ee8e06e..109164c 100644 > > --- a/Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h > > +++ b/Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h > > @@ -25,6 +25,29 @@ typedef struct { > > } MV_BOARD_COMPHY_DESC; > > > > // > > +// GPIO devices per-board description > > +// > > +typedef struct { > > + UINTN ChipId; > > + UINTN I2cAddress; > > + UINTN I2cBus; > > +} MV_I2C_IO_EXPANDER_DESC; > > + > > +typedef struct { > > + MV_SOC_GPIO_DESC *SoC; > > + UINTN GpioDevCount; > > + MV_I2C_IO_EXPANDER_DESC *I2cIoExpanderDesc; > > + UINTN I2cIoExpanderCount; > > +} MV_BOARD_GPIO_DESC; > > + > > +EFI_STATUS > > +EFIAPI > > +ArmadaBoardDescGpioGet ( > > + IN OUT MV_I2C_IO_EXPANDER_DESC **I2cIoExpanderDesc, > > + IN OUT UINTN *I2cIoExpanderCount > > Please expand all DESC/Desc to descriptor/description/whatever as > appropriate. > With that, Reviewed-by: Leif Lindholm Actually, I spotted something in 3-4/12 on finally getting back to this set. The function is called ArmadaBoardDescGpioGet, but the IN/OUT parameters talk abour I2c. This seems like either a lack of abstraction (which given this is a generic library class seems suboptimal). Could that too be addressed in v2? (I'll mention it here instead of in the users.) Regards, Leif > > + ); > > + > > +// > > // I2C devices per-board description > > // > > typedef struct { > > -- > > 2.7.4 > >