Hi,
This patchset brings support for Silicon Labs' Co-Processor
Communication (CPC) protocol as transport layer for Greybus. This is
introduced as a module that sits between Greybus and CPC Host Device
Drivers implementations, like SDIO or SPI. This patchset includes SDIO
as physical layer but the protocol is not final and might change, it's
mostly there to showcase all the elements.
+----------------------------------------------------+
| Greybus |
+----------------------------------------------------+
/|\
|
\|/
+----------------------------------------------------+
| CPC |
+----------------------------------------------------+
/|\ /|\ /|\
| | |
\|/ \|/ \|/
+----------+ +---------+ +-----------+
| SDIO | | SPI | | Others |
+----------+ +---------+ +-----------+
CPC implements some of the features of Unipro that Greybus relies upon,
like reliable transmission. CPC takes care of detecting transmission
errors and retransmit frames if necessary, but that feature is not part
of the RFC to keep it concise. There's also a flow-control
feature, preventing sending messages to already full cports.
In order to implement these features, a 4-byte header is prepended to
Greybus messages, making the whole header 12 bytes (Greybus header
itself is 8 bytes).
This RFC starts by implementing a shim layer between physical bus
drivers (like SDIO and SPI) and Greybus, and progressively add more
elements to it to make it useful in its own right. Finally, an SDIO
driver is added to enable the communication with a remote device.
Changes since the RFC:
- added missing Signed-off-by on one commit
- added SDIO driver to give a full example
Damien Riégel (13):
greybus: cpc: add minimal CPC Host Device infrastructure
greybus: cpc: introduce CPC cport structure
greybus: cpc: use socket buffers instead of gb_message in TX path
greybus: cpc: pack cport ID in Greybus header
greybus: cpc: switch RX path to socket buffers
greybus: cpc: introduce CPC header structure
greybus: cpc: account for CPC header size in RX and TX path
greybus: cpc: add and validate sequence numbers
greybus: cpc: acknowledge all incoming messages
greybus: cpc: use holding queue instead of sending out immediately
greybus: cpc: honour remote's RX window
greybus: cpc: let host device drivers dequeue TX frames
greybus: cpc: add private data pointer in CPC Host Device
Gabriel Beaulieu (1):
greybus: cpc: add CPC SDIO host driver
MAINTAINERS | 6 +
drivers/greybus/Kconfig | 2 +
drivers/greybus/Makefile | 2 +
drivers/greybus/cpc/Kconfig | 22 ++
drivers/greybus/cpc/Makefile | 9 +
drivers/greybus/cpc/cpc.h | 75 +++++
drivers/greybus/cpc/cport.c | 107 +++++++
drivers/greybus/cpc/header.c | 146 +++++++++
drivers/greybus/cpc/header.h | 55 ++++
drivers/greybus/cpc/host.c | 313 +++++++++++++++++++
drivers/greybus/cpc/host.h | 63 ++++
drivers/greybus/cpc/protocol.c | 167 ++++++++++
drivers/greybus/cpc/sdio.c | 554 +++++++++++++++++++++++++++++++++
13 files changed, 1521 insertions(+)
create mode 100644 drivers/greybus/cpc/Kconfig
create mode 100644 drivers/greybus/cpc/Makefile
create mode 100644 drivers/greybus/cpc/cpc.h
create mode 100644 drivers/greybus/cpc/cport.c
create mode 100644 drivers/greybus/cpc/header.c
create mode 100644 drivers/greybus/cpc/header.h
create mode 100644 drivers/greybus/cpc/host.c
create mode 100644 drivers/greybus/cpc/host.h
create mode 100644 drivers/greybus/cpc/protocol.c
create mode 100644 drivers/greybus/cpc/sdio.c
--
2.49.0
Switch from the deprecated of_property_read_bool() to the common
device_property_read_bool() API. This makes the driver agnostic to
the underlying firmware interface (DT or ACPI) and simplifies the
logic.
Since the driver is no longer strictly dependent on Device Tree,
include <linux/mod_devicetable.h> directly for the struct
of_device_id definition, instead of relying on implicit inclusion
via <linux/of_irq.h>, which has been removed as it is unused.
Also rename apb_ctrl_get_devtree_data() to apb_ctrl_get_fw_data()
to better reflect the agnostic nature of the new implementation.
Signed-off-by: Julio Cesar Carvalho de Paula Souza <julio191096(a)gmail.com>
---
Changes in v6:
- Aligned function arguments with the open parenthesis in function declaration.
Changes in v5:
- Fixed 'From' header mismatch(updated git config user.name)
- Fixed indentation aligment in function declaration as pointed out
by Dan Carpenter
Changes in v4:
- Fixed a typo in the v3 commit
Changes in v3:
- Added changelog history as requested by the maintainer bot.
Changes in v2:
- Shortened the subject line to match subsystem standards.
- Updated Signed-off-by to use full real name.
drivers/staging/greybus/arche-apb-ctrl.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/greybus/arche-apb-ctrl.c b/drivers/staging/greybus/arche-apb-ctrl.c
index 90ab32638d3f..33f26a65f0cc 100644
--- a/drivers/staging/greybus/arche-apb-ctrl.c
+++ b/drivers/staging/greybus/arche-apb-ctrl.c
@@ -10,13 +10,14 @@
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
-#include <linux/of_irq.h>
#include <linux/module.h>
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
+#include <linux/property.h>
#include <linux/regulator/consumer.h>
#include <linux/spinlock.h>
+#include <linux/mod_devicetable.h>
#include "arche_platform.h"
static void apb_bootret_deassert(struct device *dev);
@@ -314,8 +315,8 @@ static ssize_t state_show(struct device *dev,
static DEVICE_ATTR_RW(state);
-static int apb_ctrl_get_devtree_data(struct platform_device *pdev,
- struct arche_apb_ctrl_drvdata *apb)
+static int apb_ctrl_get_fw_data(struct platform_device *pdev,
+ struct arche_apb_ctrl_drvdata *apb)
{
struct device *dev = &pdev->dev;
int ret;
@@ -378,7 +379,7 @@ static int apb_ctrl_get_devtree_data(struct platform_device *pdev,
}
/* Only applicable for platform >= V2 */
- if (of_property_read_bool(pdev->dev.of_node, "gb,spi-en-active-high"))
+ if (device_property_read_bool(&pdev->dev, "gb,spi-en-active-high"))
apb->spi_en_polarity_high = true;
return 0;
@@ -394,7 +395,7 @@ static int arche_apb_ctrl_probe(struct platform_device *pdev)
if (!apb)
return -ENOMEM;
- ret = apb_ctrl_get_devtree_data(pdev, apb);
+ ret = apb_ctrl_get_fw_data(pdev, apb);
if (ret) {
dev_err(dev, "failed to get apb devicetree data %d\n", ret);
return ret;
@@ -403,7 +404,7 @@ static int arche_apb_ctrl_probe(struct platform_device *pdev)
/* Initially set APB to OFF state */
apb->state = ARCHE_PLATFORM_STATE_OFF;
/* Check whether device needs to be enabled on boot */
- if (of_property_read_bool(pdev->dev.of_node, "arche,init-disable"))
+ if (device_property_read_bool(&pdev->dev, "arche,init-disable"))
apb->init_disabled = true;
platform_set_drvdata(pdev, apb);
--
2.52.0
Switch from the deprecated of_property_read_bool() to the common
device_property_read_bool() API. This makes the driver agnostic to
the underlying firmware interface (DT or ACPI) and simplifies the
logic.
Since the driver is no longer strictly dependent on Device Tree,
include <linux/mod_devicetable.h> directly for the struct
of_device_id definition, instead of relying on implicit inclusion
via <linux/of_irq.h>, which has been removed as it is unused.
Also rename apb_ctrl_get_devtree_data() to apb_ctrl_get_fw_data()
to better reflect the agnostic nature of the new implementation.
Signed-off-by: Julio Cesar Carvalho de Paula Souza <julio191096(a)gmail.com>
---
Changes in v5:
- Fixed 'From' header mismatch(updated git config user.name)
- Fixed indentation aligment in function declaration as pointed out
by Dan Carpenter
Changes in v4:
- Fixed a typo in the v3 commit
Changes in v3:
- Added changelog history as requested by the maintainer bot.
Changes in v2:
- Shortened the subject line to match subsystem standards.
- Updated Signed-off-by to use full real name.
drivers/staging/greybus/arche-apb-ctrl.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/greybus/arche-apb-ctrl.c b/drivers/staging/greybus/arche-apb-ctrl.c
index 90ab32638d3f..6a4efa9a9e0e 100644
--- a/drivers/staging/greybus/arche-apb-ctrl.c
+++ b/drivers/staging/greybus/arche-apb-ctrl.c
@@ -10,13 +10,14 @@
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
-#include <linux/of_irq.h>
#include <linux/module.h>
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
+#include <linux/property.h>
#include <linux/regulator/consumer.h>
#include <linux/spinlock.h>
+#include <linux/mod_devicetable.h>
#include "arche_platform.h"
static void apb_bootret_deassert(struct device *dev);
@@ -314,8 +315,8 @@ static ssize_t state_show(struct device *dev,
static DEVICE_ATTR_RW(state);
-static int apb_ctrl_get_devtree_data(struct platform_device *pdev,
- struct arche_apb_ctrl_drvdata *apb)
+static int apb_ctrl_get_fw_data(struct platform_device *pdev,
+ struct arche_apb_ctrl_drvdata *apb)
{
struct device *dev = &pdev->dev;
int ret;
@@ -378,7 +379,7 @@ static int apb_ctrl_get_devtree_data(struct platform_device *pdev,
}
/* Only applicable for platform >= V2 */
- if (of_property_read_bool(pdev->dev.of_node, "gb,spi-en-active-high"))
+ if (device_property_read_bool(&pdev->dev, "gb,spi-en-active-high"))
apb->spi_en_polarity_high = true;
return 0;
@@ -394,7 +395,7 @@ static int arche_apb_ctrl_probe(struct platform_device *pdev)
if (!apb)
return -ENOMEM;
- ret = apb_ctrl_get_devtree_data(pdev, apb);
+ ret = apb_ctrl_get_fw_data(pdev, apb);
if (ret) {
dev_err(dev, "failed to get apb devicetree data %d\n", ret);
return ret;
@@ -403,7 +404,7 @@ static int arche_apb_ctrl_probe(struct platform_device *pdev)
/* Initially set APB to OFF state */
apb->state = ARCHE_PLATFORM_STATE_OFF;
/* Check whether device needs to be enabled on boot */
- if (of_property_read_bool(pdev->dev.of_node, "arche,init-disable"))
+ if (device_property_read_bool(&pdev->dev, "arche,init-disable"))
apb->init_disabled = true;
platform_set_drvdata(pdev, apb);
--
2.52.0
Switch from the deprecated of_property_read_bool() to the common
device_property_read_bool() API. This makes the driver agnostic to
the underlying firmware interface (DT or ACPI) and simplifies the
logic.
Since the driver is no longer strictly dependent on Device Tree,
include <linux/mod_devicetable.h> directly for the struct
of_device_id definition, instead of relying on implicit inclusion
via <linux/of_irq.h>, which has been removed as it is unused.
Also rename apb_ctrl_get_devtree_data() to apb_ctrl_get_fw_data()
to better reflect the agnostic nature of the new implementation.
Signed-off-by: Julio Cesar Carvalho de Paula Souza <julio191096(a)gmail.com>
---
Changes in v4:
- Fixed a typo in the v3 commit
Changes in v3:
- Added changelog history as requested by the maintainer bot.
Changes in v2:
- Shortened the subject line to match subsystem standards.
- Updated Signed-off-by to use full real name.
drivers/staging/greybus/arche-apb-ctrl.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/greybus/arche-apb-ctrl.c b/drivers/staging/greybus/arche-apb-ctrl.c
index 90ab32638d3f..eea9648a461c 100644
--- a/drivers/staging/greybus/arche-apb-ctrl.c
+++ b/drivers/staging/greybus/arche-apb-ctrl.c
@@ -10,13 +10,14 @@
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
-#include <linux/of_irq.h>
#include <linux/module.h>
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
+#include <linux/property.h>
#include <linux/regulator/consumer.h>
#include <linux/spinlock.h>
+#include <linux/mod_devicetable.h>
#include "arche_platform.h"
static void apb_bootret_deassert(struct device *dev);
@@ -314,7 +315,7 @@ static ssize_t state_show(struct device *dev,
static DEVICE_ATTR_RW(state);
-static int apb_ctrl_get_devtree_data(struct platform_device *pdev,
+static int apb_ctrl_get_fw_data(struct platform_device *pdev,
struct arche_apb_ctrl_drvdata *apb)
{
struct device *dev = &pdev->dev;
@@ -378,7 +379,7 @@ static int apb_ctrl_get_devtree_data(struct platform_device *pdev,
}
/* Only applicable for platform >= V2 */
- if (of_property_read_bool(pdev->dev.of_node, "gb,spi-en-active-high"))
+ if (device_property_read_bool(&pdev->dev, "gb,spi-en-active-high"))
apb->spi_en_polarity_high = true;
return 0;
@@ -394,7 +395,7 @@ static int arche_apb_ctrl_probe(struct platform_device *pdev)
if (!apb)
return -ENOMEM;
- ret = apb_ctrl_get_devtree_data(pdev, apb);
+ ret = apb_ctrl_get_fw_data(pdev, apb);
if (ret) {
dev_err(dev, "failed to get apb devicetree data %d\n", ret);
return ret;
@@ -403,7 +404,7 @@ static int arche_apb_ctrl_probe(struct platform_device *pdev)
/* Initially set APB to OFF state */
apb->state = ARCHE_PLATFORM_STATE_OFF;
/* Check whether device needs to be enabled on boot */
- if (of_property_read_bool(pdev->dev.of_node, "arche,init-disable"))
+ if (device_property_read_bool(&pdev->dev, "arche,init-disable"))
apb->init_disabled = true;
platform_set_drvdata(pdev, apb);
--
2.52.0
Switch from the deprecated of_property_read_bool() to the common
device_property_read_bool() API. This makes the driver agnostic to
the underlying firmware interface (DT or ACPI) and simplifies the
logic.
Since the driver is no longer strictly dependent on Device Tree,
include <linux/mod_devicetable.h> directly for the struct
of_device_id definition, instead of relying on implicit inclusion
via <linux/of_irq.h>, which has been removed as it is unused.
Also rename apb_ctrl_get_devtree_data() to apb_ctrl_get_fw_data()
to better reflect the agnostic nature of the new implementation.
Signed-off-by: Julio Cesar Carvalho de Paula Souza <julio191096(a)gmail.com>
---
hanges in v3:
- Added version history (changelog) required by the subsystem maintainer.
Changes in v2:
- Updated the subject line to match the subsystem standard.
- Updated Signed-off-by to use full real name.
drivers/staging/greybus/arche-apb-ctrl.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/greybus/arche-apb-ctrl.c b/drivers/staging/greybus/arche-apb-ctrl.c
index 90ab32638d3f..eea9648a461c 100644
--- a/drivers/staging/greybus/arche-apb-ctrl.c
+++ b/drivers/staging/greybus/arche-apb-ctrl.c
@@ -10,13 +10,14 @@
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
-#include <linux/of_irq.h>
#include <linux/module.h>
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
+#include <linux/property.h>
#include <linux/regulator/consumer.h>
#include <linux/spinlock.h>
+#include <linux/mod_devicetable.h>
#include "arche_platform.h"
static void apb_bootret_deassert(struct device *dev);
@@ -314,7 +315,7 @@ static ssize_t state_show(struct device *dev,
static DEVICE_ATTR_RW(state);
-static int apb_ctrl_get_devtree_data(struct platform_device *pdev,
+static int apb_ctrl_get_fw_data(struct platform_device *pdev,
struct arche_apb_ctrl_drvdata *apb)
{
struct device *dev = &pdev->dev;
@@ -378,7 +379,7 @@ static int apb_ctrl_get_devtree_data(struct platform_device *pdev,
}
/* Only applicable for platform >= V2 */
- if (of_property_read_bool(pdev->dev.of_node, "gb,spi-en-active-high"))
+ if (device_property_read_bool(&pdev->dev, "gb,spi-en-active-high"))
apb->spi_en_polarity_high = true;
return 0;
@@ -394,7 +395,7 @@ static int arche_apb_ctrl_probe(struct platform_device *pdev)
if (!apb)
return -ENOMEM;
- ret = apb_ctrl_get_devtree_data(pdev, apb);
+ ret = apb_ctrl_get_fw_data(pdev, apb);
if (ret) {
dev_err(dev, "failed to get apb devicetree data %d\n", ret);
return ret;
@@ -403,7 +404,7 @@ static int arche_apb_ctrl_probe(struct platform_device *pdev)
/* Initially set APB to OFF state */
apb->state = ARCHE_PLATFORM_STATE_OFF;
/* Check whether device needs to be enabled on boot */
- if (of_property_read_bool(pdev->dev.of_node, "arche,init-disable"))
+ if (device_property_read_bool(&pdev->dev, "arche,init-disable"))
apb->init_disabled = true;
platform_set_drvdata(pdev, apb);
--
2.52.0
Switch from the deprecated of_property_read_bool() to the common
device_property_read_bool() API. This makes the driver agnostic to
the underlying firmware interface (DT or ACPI) and simplifies the
logic.
Since the driver is no longer strictly dependent on Device Tree,
include <linux/mod_devicetable.h> directly for the struct
of_device_id definition, instead of relying on implicit inclusion
via <linux/of_irq.h>, which has been removed as it is unused.
Also rename apb_ctrl_get_devtree_data() to apb_ctrl_get_fw_data()
to better reflect the agnostic nature of the new implementation.
Signed-off-by: Julio Cesar Carvalho de Paula Souza <julio191096(a)gmail.com>
---
drivers/staging/greybus/arche-apb-ctrl.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/greybus/arche-apb-ctrl.c b/drivers/staging/greybus/arche-apb-ctrl.c
index 90ab32638d3f..eea9648a461c 100644
--- a/drivers/staging/greybus/arche-apb-ctrl.c
+++ b/drivers/staging/greybus/arche-apb-ctrl.c
@@ -10,13 +10,14 @@
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
-#include <linux/of_irq.h>
#include <linux/module.h>
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
+#include <linux/property.h>
#include <linux/regulator/consumer.h>
#include <linux/spinlock.h>
+#include <linux/mod_devicetable.h>
#include "arche_platform.h"
static void apb_bootret_deassert(struct device *dev);
@@ -314,7 +315,7 @@ static ssize_t state_show(struct device *dev,
static DEVICE_ATTR_RW(state);
-static int apb_ctrl_get_devtree_data(struct platform_device *pdev,
+static int apb_ctrl_get_fw_data(struct platform_device *pdev,
struct arche_apb_ctrl_drvdata *apb)
{
struct device *dev = &pdev->dev;
@@ -378,7 +379,7 @@ static int apb_ctrl_get_devtree_data(struct platform_device *pdev,
}
/* Only applicable for platform >= V2 */
- if (of_property_read_bool(pdev->dev.of_node, "gb,spi-en-active-high"))
+ if (device_property_read_bool(&pdev->dev, "gb,spi-en-active-high"))
apb->spi_en_polarity_high = true;
return 0;
@@ -394,7 +395,7 @@ static int arche_apb_ctrl_probe(struct platform_device *pdev)
if (!apb)
return -ENOMEM;
- ret = apb_ctrl_get_devtree_data(pdev, apb);
+ ret = apb_ctrl_get_fw_data(pdev, apb);
if (ret) {
dev_err(dev, "failed to get apb devicetree data %d\n", ret);
return ret;
@@ -403,7 +404,7 @@ static int arche_apb_ctrl_probe(struct platform_device *pdev)
/* Initially set APB to OFF state */
apb->state = ARCHE_PLATFORM_STATE_OFF;
/* Check whether device needs to be enabled on boot */
- if (of_property_read_bool(pdev->dev.of_node, "arche,init-disable"))
+ if (device_property_read_bool(&pdev->dev, "arche,init-disable"))
apb->init_disabled = true;
platform_set_drvdata(pdev, apb);
--
2.52.0
Hi,
This patchset brings support for Silicon Labs' CPC (Co-Processor
Communication) protocol as transport layer for Greybus. This is
introduced as a module that sits between Greybus and CPC Host Device
Driver implementations, like SDIO or SPI, which are not part of this
RFC. If there's no push back with this RFC, the final patchset ready for
upstream will include the SDIO driver.
The goal of this module is to implement some of the features of Unipro
that Greybus relies upon, like reliable transmission. CPC takes care of
detecting transmission errors and retransmit frames if necessary. That
feature is not part of the RFC to keep it concise, but it's planned for
a future patchset. There's also a flow-control feature, to prevent from
sending messages to cports that don't have anymore room.
In order to implement these features, a 4-byte header is prepended to
Greybus messages, making the whole header 12 bytes (Greybus header
itself being 8 bytes).
This RFC starts by implementing a shim layer that sits between physical
bus drivers (like SDIO and SPI) and Greybus, and progressively add more
elements to it to make it useful in its own right.
+----------------------------------------------------+
| Greybus |
+----------------------------------------------------+
/|\
|
\|/
+----------------------------------------------------+
| CPC |
+----------------------------------------------------+
/|\ /|\ /|\
| | |
\|/ \|/ \|/
+----------+ +---------+ +-----------+
| SDIO | | SPI | | Others |
+----------+ +---------+ +-----------+
Changes in v2:
- v1 included a new protocol for Bluetooth HCI, this has been dropped
to focus on CPC itself
- likewise, there was an SPI driver, it has been dropped of this RFC
for the same reason
- v1 introduced CPC in a big commit, this time it's been split in
smaller commits to make review manageable
Damien Riégel (12):
greybus: cpc: add minimal CPC Host Device infrastructure
greybus: cpc: introduce CPC cport structure
greybus: cpc: use socket buffers instead of gb_message in TX path
greybus: cpc: pack cport ID in Greybus header
greybus: cpc: switch RX path to socket buffers
greybus: cpc: introduce CPC header structure
greybus: cpc: account for CPC header size in RX and TX path
greybus: cpc: add and validate sequence numbers
greybus: cpc: acknowledge all incoming messages
greybus: cpc: use holding queue instead of sending out immediately
greybus: cpc: honour remote's RX window
greybus: cpc: let host device drivers dequeue TX frames
MAINTAINERS | 6 +
drivers/greybus/Kconfig | 2 +
drivers/greybus/Makefile | 2 +
drivers/greybus/cpc/Kconfig | 10 ++
drivers/greybus/cpc/Makefile | 6 +
drivers/greybus/cpc/cpc.h | 76 +++++++++
drivers/greybus/cpc/cport.c | 107 ++++++++++++
drivers/greybus/cpc/header.c | 146 +++++++++++++++++
drivers/greybus/cpc/header.h | 54 +++++++
drivers/greybus/cpc/host.c | 287 +++++++++++++++++++++++++++++++++
drivers/greybus/cpc/host.h | 58 +++++++
drivers/greybus/cpc/protocol.c | 169 +++++++++++++++++++
12 files changed, 923 insertions(+)
create mode 100644 drivers/greybus/cpc/Kconfig
create mode 100644 drivers/greybus/cpc/Makefile
create mode 100644 drivers/greybus/cpc/cpc.h
create mode 100644 drivers/greybus/cpc/cport.c
create mode 100644 drivers/greybus/cpc/header.c
create mode 100644 drivers/greybus/cpc/header.h
create mode 100644 drivers/greybus/cpc/host.c
create mode 100644 drivers/greybus/cpc/host.h
create mode 100644 drivers/greybus/cpc/protocol.c
--
2.49.0
The pwm.c driver already uses pwn_ops::apply. This item was completed
but never removed.
Removed the outdated TODO item.
Signed-off-by: Sammy Malik <sammy(a)parkour.is>
---
drivers/staging/greybus/TODO | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/greybus/TODO b/drivers/staging/greybus/TODO
index 6461e0132fe3..31f1f2cb401c 100644
--- a/drivers/staging/greybus/TODO
+++ b/drivers/staging/greybus/TODO
@@ -1,5 +1,3 @@
* Convert all uses of the old GPIO API from <linux/gpio.h> to the
GPIO descriptor API in <linux/gpio/consumer.h> and look up GPIO
lines from device tree or ACPI.
-* Make pwm.c use the struct pwm_ops::apply instead of ::config, ::set_polarity,
- ::enable and ::disable.
--
2.52.0
Hi Greg and all,
This series performs a set of cleanups, correctness fixes, and
remaining TODO removals across the Greybus drivers in
drivers/staging/greybus.
Greybus has existed in staging for a long time, and many FIXMEs,
outdated comments, and partial implementations had accumulated over the
years. While reviewing and compile-testing the drivers I found a number of
places where the comments were obsolete, logic was incomplete, or newer
subsystem APIs had evolved.
This series addresses those issues without changing any fundamental
design or architecture. All changes are self-contained, straightforward,
and focues on improving correctness and maintainability.
The patches include:
* Removal of obsolete FIXMEs that no longer reflect the current code
or hardware behavior.
* Correctness fixes in several protocol drivers (UART, RAW, USB,
Loopback, Firmware core, Audio).
* Small improvements to error handling and shutdown paths.
* Cleanup of commented-out or dead code.
* Removal of the now-completed GPIO and PWM TODO items.
* Removal of the empty Greybus TODO file.
All patches were compile-tested with COMPILE_TEST=y and all Greybus
options enabled. Runtime smoke testing was performed where possible.
This series does not attempt to graduate Greybus out of staging; these
changes are preparatory cleanups only.
Thanks for your time and review.
Ayaan Mirza Baig (13):
staging: greybus: Remove completed GPIO conversion TODO item
staging: greybus: pwm: move activation into pwm apply and remove
request()
staging: greybus: remove empty TODO file
staging: greybus: audio: remove obsolete INPUT_PROP_NO_DUMMY_RELEASE
FIXME
staging: greybus: audio: remove obsolete FIXME and document topology
ownership
staging: greybus: bootrom: remove obsolete FIXME about SVC parallel
event handling
staging: greybus: bootrom: remove obsolete FIXME around firmware
filename logging
staging: greybus: fw-core: remove obsolete S2 Loader runtime PM FIXME
staging: greybus: loopback: remove incorrect FIXME about async wait
staging: greybus: raw: handle disconnect while chardev is open
staging: greybus: uart: clear unsupported termios bits
staging: greybus: usb: validate hub control response length
staging: greybus: usb: remove obsolete FIXME about bridged-PHY support
drivers/staging/greybus/TODO | 5 -----
drivers/staging/greybus/audio_codec.c | 7 +------
drivers/staging/greybus/audio_module.c | 6 ++++--
drivers/staging/greybus/bootrom.c | 10 ++--------
drivers/staging/greybus/fw-core.c | 4 ++--
drivers/staging/greybus/loopback.c | 6 +-----
drivers/staging/greybus/pwm.c | 19 +++++++++++--------
drivers/staging/greybus/raw.c | 18 ++++++++++++++++--
drivers/staging/greybus/uart.c | 10 ++++++++--
drivers/staging/greybus/usb.c | 23 ++++++++---------------
10 files changed, 53 insertions(+), 55 deletions(-)
delete mode 100644 drivers/staging/greybus/TODO
--
2.51.0