linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vaishnav M A <vaishnav@beagleboard.org>
To: greybus-dev@lists.linaro.org, linux-kernel@vger.kernel.org,
	gregkh@linuxfoundation.org, arnd@arndb.de, johan@kernel.org,
	elder@kernel.org
Cc: Vaishnav M A <vaishnav@beagleboard.org>,
	robh@kernel.org, mchehab+huawei@kernel.org, davem@davemloft.net,
	jkridner@beagleboard.org, drew@beagleboard.org,
	robertcnelson@beagleboard.org, rajkovic@mikroe.com,
	chrisfriedt@gmail.com, zoran.stojsavljevic@gmail.com
Subject: [RFC PATCH v2 1/3] add mikrobus descriptors to greybus_manifest
Date: Tue, 18 Aug 2020 18:18:13 +0530	[thread overview]
Message-ID: <20200818124815.11029-2-vaishnav@beagleboard.org> (raw)
In-Reply-To: <20200818124815.11029-1-vaishnav@beagleboard.org>

This patch adds new descriptors used in the manifest parsing inside
the mikrobus driver, the device descriptor help to describe the
devices on a mikroBUS port, mikrobus descriptor is used to set up
the mikrobus port pinmux and GPIO states and property descriptor
to pass named properties to device drivers through the Unified
Properties API under linux/property.h

The corresponding pull request for manifesto is updated
at : https://github.com/projectara/manifesto/pull/2

Signed-off-by: Vaishnav M A <vaishnav@beagleboard.org>
---
 include/linux/greybus/greybus_manifest.h | 47 ++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/include/linux/greybus/greybus_manifest.h b/include/linux/greybus/greybus_manifest.h
index 6e62fe478712..821661ea7f01 100644
--- a/include/linux/greybus/greybus_manifest.h
+++ b/include/linux/greybus/greybus_manifest.h
@@ -23,6 +23,9 @@ enum greybus_descriptor_type {
 	GREYBUS_TYPE_STRING		= 0x02,
 	GREYBUS_TYPE_BUNDLE		= 0x03,
 	GREYBUS_TYPE_CPORT		= 0x04,
+	GREYBUS_TYPE_MIKROBUS		= 0x05,
+	GREYBUS_TYPE_PROPERTY		= 0x06,
+	GREYBUS_TYPE_DEVICE		= 0x07,
 };
 
 enum greybus_protocol {
@@ -151,6 +154,47 @@ struct greybus_descriptor_cport {
 	__u8	protocol_id;	/* enum greybus_protocol */
 } __packed;
 
+/*
+ * A mikrobus descriptor is used to describe the details
+ * about the bus ocnfiguration for the add-on board
+ * connected to the mikrobus port.
+ */
+struct greybus_descriptor_mikrobus {
+	__u8 pin_state[12];
+} __packed;
+
+/*
+ * A property descriptor is used to pass named properties
+ * to device drivers through the unified device properties
+ * interface under linux/property.h
+ */
+struct greybus_descriptor_property {
+	__u8 length;
+	__u8 id;
+	__u8 propname_stringid;
+	__u8 type;
+	__u8 value[0];
+} __packed;
+
+/*
+ * A device descriptor is used to describe the
+ * details required by a add-on board device
+ * driver.
+ */
+struct greybus_descriptor_device {
+	__u8 id;
+	__u8 driver_stringid;
+	__u8 protocol;
+	__u8 reg;
+	__le32 max_speed_hz;
+	__u8 irq;
+	__u8 irq_type;
+	__u8 mode;
+	__u8 prop_link;
+	__u8 gpio_link;
+	__u8 pad[3];
+} __packed;
+
 struct greybus_descriptor_header {
 	__le16	size;
 	__u8	type;		/* enum greybus_descriptor_type */
@@ -164,6 +208,9 @@ struct greybus_descriptor {
 		struct greybus_descriptor_interface	interface;
 		struct greybus_descriptor_bundle	bundle;
 		struct greybus_descriptor_cport		cport;
+		struct greybus_descriptor_mikrobus	mikrobus;
+		struct greybus_descriptor_property	property;
+		struct greybus_descriptor_device	device;
 	};
 } __packed;
 
-- 
2.25.1


  reply	other threads:[~2020-08-18 12:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-18 12:48 [RFC PATCH v2 0/3] mikroBUS driver for add-on boards Vaishnav M A
2020-08-18 12:48 ` Vaishnav M A [this message]
2020-08-20  0:49   ` [RFC PATCH v2 1/3] add mikrobus descriptors to greybus_manifest Vaishnav M A
2020-08-31  6:26     ` Zoran Stojsavljevic
2020-09-01  8:33       ` Vaishnav M A
2020-08-18 12:48 ` [RFC PATCH v2 2/3] mikroBUS driver for add-on boards on mikrobus ports Vaishnav M A
2020-08-18 12:48 ` [RFC PATCH v2 3/3] Add Device Tree Bindings for mikroBUS port Vaishnav M A
2020-08-18 13:35   ` [greybus-dev] " Laurent Pinchart
2020-08-18 21:22     ` Vaishnav M A
2020-08-27 15:45   ` Rob Herring
2020-08-18 15:24 ` [RFC PATCH v2 0/3] mikroBUS driver for add-on boards Greg KH
2020-08-18 21:52   ` Vaishnav M A
2020-08-19  5:54     ` Greg KH
2020-08-18 20:38 ` Frank Rowand
2020-08-18 21:56   ` Vaishnav M A
2020-08-25  1:44   ` Frank Rowand

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-all 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=20200818124815.11029-2-vaishnav@beagleboard.org \
    --to=vaishnav@beagleboard.org \
    --cc=arnd@arndb.de \
    --cc=chrisfriedt@gmail.com \
    --cc=davem@davemloft.net \
    --cc=drew@beagleboard.org \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=jkridner@beagleboard.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab+huawei@kernel.org \
    --cc=rajkovic@mikroe.com \
    --cc=robertcnelson@beagleboard.org \
    --cc=robh@kernel.org \
    --cc=zoran.stojsavljevic@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).