public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Marcin Wojtas <mw@semihalf.com>
To: edk2-devel@lists.01.org
Cc: leif.lindholm@linaro.org, ard.biesheuvel@linaro.org,
	nadavh@marvell.com, mw@semihalf.com, jsd@semihalf.com,
	jaz@semihalf.com, kostap@marvell.com
Subject: [platforms: PATCH v3 02/12] Marvell/Library: ArmadaBoardDescLib: Add GPIO information
Date: Thu, 17 Jan 2019 12:15:05 +0100	[thread overview]
Message-ID: <1547723715-4562-3-git-send-email-mw@semihalf.com> (raw)
In-Reply-To: <1547723715-4562-1-git-send-email-mw@semihalf.com>

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 <mw@semihalf.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
---
 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 3fe2988..6ec5ace 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_GPIO_EXPANDER;
+
+typedef struct {
+  GPIO_CONTROLLER  *SoCGpio;
+  UINTN             GpioDeviceCount;
+  MV_GPIO_EXPANDER *GpioExpanders;
+  UINTN             GpioExpanderCount;
+} MV_BOARD_GPIO_DESCRIPTION;
+
+EFI_STATUS
+EFIAPI
+ArmadaBoardGpioExpanderGet (
+  IN OUT MV_GPIO_EXPANDER **GpioExpanders,
+  IN OUT UINTN             *GpioExpanderCount
+  );
+
+//
 // I2C devices per-board description
 //
 typedef struct {
-- 
2.7.4



  parent reply	other threads:[~2019-01-17 11:15 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-17 11:15 [platforms: PATCH v3 00/12] Armada 7k8k GPIO support Marcin Wojtas
2019-01-17 11:15 ` [platforms: PATCH v3 01/12] Marvell/Library: ArmadaSoCDescLib: Add GPIO information Marcin Wojtas
2019-01-17 11:15 ` Marcin Wojtas [this message]
2019-01-17 11:15 ` [platforms: PATCH v3 03/12] Marvell/Library: Introduce MvGpioLib class Marcin Wojtas
2019-01-17 11:33   ` Leif Lindholm
2019-01-17 12:19     ` Marcin Wojtas
2019-01-17 14:18       ` Leif Lindholm
2019-01-17 14:39         ` Marcin Wojtas
2019-01-17 11:15 ` [platforms: PATCH v3 04/12] SolidRun/Armada80x0McBin: Extend board description library with GPIO Marcin Wojtas
2019-01-17 11:15 ` [platforms: PATCH v3 05/12] Marvell/Armada70x0Db: " Marcin Wojtas
2019-01-17 11:34   ` Leif Lindholm
2019-01-17 11:15 ` [platforms: PATCH v3 06/12] Marvell/Armada80x0Db: " Marcin Wojtas
2019-01-17 11:34   ` Leif Lindholm
2019-01-17 11:15 ` [platforms: PATCH v3 07/12] Marvell/Drivers: MvBoardDesc: Extend protocol with GPIO support Marcin Wojtas
2019-01-17 11:50   ` Leif Lindholm
2019-01-17 11:15 ` [platforms: PATCH v3 08/12] Marvell/Drivers: MvGpioDxe: Introduce platform GPIO driver Marcin Wojtas
2019-01-17 11:52   ` Leif Lindholm
2019-01-17 11:15 ` [platforms: PATCH v3 09/12] Marvell/Drivers: I2c: Use common header for macros Marcin Wojtas
2019-01-17 11:15 ` [platforms: PATCH v3 10/12] Marvell/Drivers: MvPca95xxDxe: Introduce GPIO expander driver Marcin Wojtas
2019-01-17 11:55   ` Leif Lindholm
2019-01-17 11:15 ` [platforms: PATCH v3 11/12] Marvell/Armada7k8k: Enable GPIO drivers compilation Marcin Wojtas
2019-01-17 11:15 ` [platforms: PATCH v3 12/12] Marvell/Armada7k8k: Introduce NonDiscoverable device init routines Marcin Wojtas
2019-01-17 12:03 ` [platforms: PATCH v3 00/12] Armada 7k8k GPIO support Leif Lindholm
2019-01-17 12:26   ` Marcin Wojtas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1547723715-4562-3-git-send-email-mw@semihalf.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox