public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC v2 0/4] new bus type SIOX
@ 2016-03-21 10:05 Uwe Kleine-König
  2016-03-21 10:05 ` [PATCH RFC v2 1/4] siox: new driver framework for eckelmann SIOX Uwe Kleine-König
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2016-03-21 10:05 UTC (permalink / raw)
  To: linux-kernel, Greg Kroah-Hartman; +Cc: kernel

Hello,

this is a patch set for a new bus type called SIOX created by the German
company Eckelmann. This is a bus with four data lines. The signals DIN (from
devices to master) and DOUT (from master to devices) are daisy chained through
all devices. DLD and DCLK are shared. A pulse on DCLK pushs bits on the DIN and
DOUT chains in the respective direction. A pulse on DLD makes the devices
sample their input and output stated from/to DIN and DOUT.

A master is the bus controller (i.e. it drives DOUT, DCLK and DLD). A
device is a consumer and provides DIN to the master.

The topology looks as follows:

      ,------->--DCLK-->---------------+----------------------.
      ^                                v                      v
 ,--------.                ,----------------------.       ,------
 |        |                |   ,--------------.   |       |
 |        |--->--DOUT-->---|->-|shift register|->-|--->---|
 |        |                |   `--------------'   |       |
 | master |                |        device        |       |  device
 |        |                |   ,--------------.   |       |
 |        |---<--DIN---<---|-<-|shift register|-<-|---<---|
 |        |                |   `--------------'   |       |
 `--------'                `----------------------'       `------
      v                                ^                      ^
      `----------DLD-------------------+----------------------'

So there are two chains of shift registers, one for letting the master
write to the devices, and the other to let the master read from the
devices. DCLK is the clock to shift both chains by a single bit. An edge
on DLD is used to make the devices load the inputs and sample the
outputs.

There are still some open issues, at least:

 - no device tree binding doc for bus master driver
   I will clean this up eventually when (and if) patch 1 gets in.

 - the devices should be polled each 25 ms, otherwise a per-device
   watchdog resets the device. I'm currently using a workqueue for that,
   and on a loaded machine sometimes the watchdog triggers. So maybe I
   need a different approach here? But I didn't debug that yet, so this
   is just FYI. This can be resolved later.

Since (implicit) v1 I cleaned up the code a bit, the reference counting
for kobjects should be ok now, I'm not confident that I got the locking
right though: I have a single mutex per bus master that also protects
the bus topology, but when holding the lock while removing a device
(which is triggered via sysfs) I get a lockdep splat. I "fixed" that by
releasing the mutex before calling device_unregister for the device.

IMHO the only interesting patch for now is the first one, the others
strictly depend on the first. I only included them here to demonstrate
how I expect the first patch to be used and didn't add the respective
Cc:s for them.

Thanks for your time and interest,
Uwe

Uwe Kleine-König (4):
  siox: new driver framework for eckelmann SIOX
  siox: add gpio bus driver
  gpio: new driver to work with a 8x12 siox
  siox: add support for tracing

 drivers/Kconfig              |   2 +
 drivers/Makefile             |   1 +
 drivers/gpio/Kconfig         |   5 +
 drivers/gpio/Makefile        |   1 +
 drivers/gpio/gpio-siox.c     | 290 ++++++++++++++++++
 drivers/siox/Kconfig         |   9 +
 drivers/siox/Makefile        |   2 +
 drivers/siox/siox-bus-gpio.c | 175 +++++++++++
 drivers/siox/siox-core.c     | 686 +++++++++++++++++++++++++++++++++++++++++++
 drivers/siox/siox.h          |  52 ++++
 include/linux/siox.h         |  61 ++++
 include/trace/events/siox.h  |  60 ++++
 12 files changed, 1344 insertions(+)
 create mode 100644 drivers/gpio/gpio-siox.c
 create mode 100644 drivers/siox/Kconfig
 create mode 100644 drivers/siox/Makefile
 create mode 100644 drivers/siox/siox-bus-gpio.c
 create mode 100644 drivers/siox/siox-core.c
 create mode 100644 drivers/siox/siox.h
 create mode 100644 include/linux/siox.h
 create mode 100644 include/trace/events/siox.h

-- 
2.7.0

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

end of thread, other threads:[~2016-05-02  7:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-21 10:05 [PATCH RFC v2 0/4] new bus type SIOX Uwe Kleine-König
2016-03-21 10:05 ` [PATCH RFC v2 1/4] siox: new driver framework for eckelmann SIOX Uwe Kleine-König
2016-05-01 21:27   ` Greg Kroah-Hartman
2016-05-02  7:10     ` Uwe Kleine-König
2016-03-21 10:05 ` [PATCH RFC v2 2/4] siox: add gpio bus driver Uwe Kleine-König
2016-03-21 10:05 ` [PATCH RFC v2 3/4] gpio: new driver to work with a 8x12 siox Uwe Kleine-König
2016-03-21 10:05 ` [PATCH RFC v2 4/4] siox: add support for tracing Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox