All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 0/3] add support for cherryview gpio controller driver
@ 2021-08-31  5:07 Hongzhan Chen
  2021-08-31  5:07 ` [PATCH 1/3] drivers/gpio: core: Move out of OF config conditional compilation Hongzhan Chen
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Hongzhan Chen @ 2021-08-31  5:07 UTC (permalink / raw)
  To: xenomai

1. move out of OF config conditional compilation so that non-OF platform
  call same API to remove rtdm gpio chip device and remove _of for api
  name.
2. Introduce helper to find gpiochip as referring to pair of 
   rtdm_gpiochip_scan_of and rtdm_gpiochip_scan_array_of. 
3. Add Intel Cherryview pinctrl driver based on on 1 and 2.

I also did following tests with this patchset:
1. run /usr/lib/xenomai/testsuite/gpiobench -i 334 -i 335 -c INT33FF:02
   to validate patch 9afea5ff2d7ba97db96b22a005a9a7fcf5f2d892 when
   setting GPIO_RTIOC_TS
2. apply following patch, and rerun 1.

index f83d7689f..50afbd418 100644
--- a/testsuite/gpiobench/gpiobench.c
+++ b/testsuite/gpiobench/gpiobench.c
@@ -619,7 +619,7 @@ int main(int argc, char **argv)
                        goto out;
                }

-               ret = ioctl(ti.fd_dev_intr, GPIO_RTIOC_TS, &value);
+               ret = ioctl(ti.fd_dev_intr, GPIO_RTIOC_TS_MONO, &value);
                if (ret) {
                        printf("ioctl gpio port ts, failed\n");
                        goto out;

3. test result for inner related output:
   REALTIME clock:
	# Total: 000999999
	# Min Latencies: 00013
	# Avg Latencies: 16.879997
	# Max Latencies: 00043

   MONO clock:
	# Total: 000083988
	# Min Latencies: 00012
	# Avg Latencies: 2814377.000000
	# Max Latencies: 00041

Hardware env:
1. Rock PI X V1.4.
2. GPIO loopback connection between GPIO 334 and 335.

Hongzhan Chen (3):
  drivers/gpio: core: Move out of OF config conditional compilation
  drivers/gpio: core: Introduce helper to find gpiochip
  driver/gpio: Add Intel Cherryview pinctrl driver

 include/cobalt/kernel/rtdm/gpio.h     | 12 +++++--
 kernel/drivers/gpio/Kconfig           |  7 ++++
 kernel/drivers/gpio/Makefile          |  2 ++
 kernel/drivers/gpio/gpio-bcm2835.c    |  2 +-
 kernel/drivers/gpio/gpio-cherryview.c | 42 ++++++++++++++++++++++
 kernel/drivers/gpio/gpio-core.c       | 50 ++++++++++++++++++++++++---
 kernel/drivers/gpio/gpio-mxc.c        |  2 +-
 kernel/drivers/gpio/gpio-omap.c       |  2 +-
 kernel/drivers/gpio/gpio-sun8i-h3.c   |  2 +-
 kernel/drivers/gpio/gpio-xilinx.c     |  2 +-
 kernel/drivers/gpio/gpio-zynq7000.c   |  2 +-
 11 files changed, 112 insertions(+), 13 deletions(-)
 create mode 100644 kernel/drivers/gpio/gpio-cherryview.c

-- 
2.17.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [PATCH 0/3] add support for cherryview gpio controller driver
@ 2021-08-30  6:45 Hongzhan Chen
  2021-08-30  6:45 ` [PATCH 1/3] drivers/gpio: core: move out of OF config conditional compilation Hongzhan Chen
  0 siblings, 1 reply; 13+ messages in thread
From: Hongzhan Chen @ 2021-08-30  6:45 UTC (permalink / raw)
  To: xenomai

1. move out of OF config conditional compilation so that non-OF platform
  call same API to remove rtdm gpio chip device.
2. Introduce helper to find gpiochip as referring to pair of 
   rtdm_gpiochip_scan_of and rtdm_gpiochip_scan_array_of. 
3. Add Intel Cherryview pinctrl driver based on on 1 and 2.

I also did following tests with this patchset:
1. run /usr/lib/xenomai/testsuite/gpiobench -i 334 -i 335 -c INT33FF:02
   to validate patch 9afea5ff2d7ba97db96b22a005a9a7fcf5f2d892 when
   setting GPIO_RTIOC_TS
2. apply following patch, and rerun 1.

index f83d7689f..50afbd418 100644
--- a/testsuite/gpiobench/gpiobench.c
+++ b/testsuite/gpiobench/gpiobench.c
@@ -619,7 +619,7 @@ int main(int argc, char **argv)
                        goto out;
                }

-               ret = ioctl(ti.fd_dev_intr, GPIO_RTIOC_TS, &value);
+               ret = ioctl(ti.fd_dev_intr, GPIO_RTIOC_TS_MONO, &value);
                if (ret) {
                        printf("ioctl gpio port ts, failed\n");
                        goto out;

Hardware env:
1. Rock PI X V1.4.
2. GPIO loopback connection between GPIO 334 and 335.
 

Hongzhan Chen (3):
  drivers/gpio: core: move out of OF config conditional compilation
  drivers/gpio: core: Introduce helper to find gpiochip
  driver/gpio: Add Intel Cherryview pinctrl driver

 include/cobalt/kernel/rtdm/gpio.h     | 10 ++++--
 kernel/drivers/gpio/Kconfig           |  7 ++++
 kernel/drivers/gpio/Makefile          |  2 ++
 kernel/drivers/gpio/gpio-cherryview.c | 42 ++++++++++++++++++++++++
 kernel/drivers/gpio/gpio-core.c       | 46 +++++++++++++++++++++++++--
 5 files changed, 103 insertions(+), 4 deletions(-)
 create mode 100644 kernel/drivers/gpio/gpio-cherryview.c

-- 
2.17.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-09-01  1:16 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31  5:07 [PATCH V2 0/3] add support for cherryview gpio controller driver Hongzhan Chen
2021-08-31  5:07 ` [PATCH 1/3] drivers/gpio: core: Move out of OF config conditional compilation Hongzhan Chen
2021-08-31 13:05   ` Jan Kiszka
2021-09-01  1:16     ` Chen, Hongzhan
2021-08-31  5:07 ` [PATCH 2/3] drivers/gpio: core: Introduce helper to find gpiochip Hongzhan Chen
2021-08-31  6:47   ` Jan Kiszka
2021-08-31  7:07     ` Chen, Hongzhan
2021-08-31  7:14       ` Jan Kiszka
2021-08-31  5:07 ` [PATCH 3/3] driver/gpio: Add Intel Cherryview pinctrl driver Hongzhan Chen
2021-08-31  6:51   ` Jan Kiszka
2021-08-31  7:15 ` [PATCH V2 0/3] add support for cherryview gpio controller driver Jan Kiszka
  -- strict thread matches above, loose matches on Subject: below --
2021-08-30  6:45 [PATCH " Hongzhan Chen
2021-08-30  6:45 ` [PATCH 1/3] drivers/gpio: core: move out of OF config conditional compilation Hongzhan Chen
2021-08-30  7:34   ` Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.