mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Daniel Baluta <daniel.baluta@intel.com>
Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
	wsa@the-dreams.de, linux-i2c@vger.kernel.org,
	linus.walleij@linaro.org, gnurou@gmail.com,
	linux-gpio@vger.kernel.org, pratyush.anand@st.com,
	pebolle@tiscali.nl, stern@rowland.harvard.edu,
	octavian.purdila@intel.com, matthew@mjdsystems.ca,
	linux-kernel@vger.kernel.org, laurentiu.palcu@intel.com,
	jdelvare@suse.de, sjg@chromium.org
Subject: Re: [PATCH 1/3] usb: add support for Diolan DLN-2 devices
Date: Wed, 20 Aug 2014 21:53:00 +0200	[thread overview]
Message-ID: <201408202153.00289.arnd@arndb.de> (raw)
In-Reply-To: <1408533887-22727-2-git-send-email-daniel.baluta@intel.com>

On Wednesday 20 August 2014, Daniel Baluta wrote:
> From: Octavian Purdila <octavian.purdila@intel.com>
> 
> This patch implements the USB part of the Diolan USB-I2C/SPI/GPIO
> Master Adapter DLN-2. Details about the device can be found here:
> 
> https://www.diolan.com/i2c/i2c_interface.html.
> 
> Information about the USB protocol can be found in the Programmer's
> Reference Manual [1], see section 1.7.
> 
> Because the hardware has a single transmit endpoint and a single
> receive endpoint the communication between the various DLN2 drivers
> and the hardware will be muxed/demuxed by this driver.
> 
> The functional DLN2 drivers (i2c, GPIO, etc.) will have to register
> themselves as DLN2 modules in order to send or receive data.
> 
> Each DLN2 module will be identified by the handle field within the DLN2
> message header. If a DLN2 module issues multiple commands in parallel
> they will be identified by the echo counter field in the message header.
> 
> The DLN2 modules can use the dln2_transfer() function to issue a
> command and wait for its response. They can also use an asynchronous
> mode of operation, in which case a receive callback function is going
> to be notified when messages for a specific handle are received.
> 
> Because the hardware reserves handle 0 for GPIO events, the driver
> also reserves handle 0. It will be allocated to a DLN2 module only if
> it is explicitly requested.
> 
> [1] https://www.diolan.com/downloads/dln-api-manual.pdf
> 
> Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>

After a very brief review of the driver, I think this would be better
handled as an MFD driver in drivers/mfd that creates child devices and
has the high-level drivers get registered as platform_driver.

	Arnd

  reply	other threads:[~2014-08-20 19:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-20 11:24 [PATCH 0/3] dln-2: Add " Daniel Baluta
2014-08-20 11:24 ` [PATCH 1/3] usb: add " Daniel Baluta
2014-08-20 19:53   ` Arnd Bergmann [this message]
2014-08-21  8:07   ` Johan Hovold
2014-08-21 23:10     ` Octavian Purdila
2014-08-20 11:24 ` [PATCH 2/3] i2c: add support for Diolan DLN-2 USB-I2C adapter Daniel Baluta
2014-08-20 11:24 ` [PATCH 3/3] gpio: add support for the Diolan DLN-2 USB-GPIO driver Daniel Baluta
2014-08-29  7:16   ` Linus Walleij

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=201408202153.00289.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=daniel.baluta@intel.com \
    --cc=gnurou@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jdelvare@suse.de \
    --cc=laurentiu.palcu@intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=matthew@mjdsystems.ca \
    --cc=octavian.purdila@intel.com \
    --cc=pebolle@tiscali.nl \
    --cc=pratyush.anand@st.com \
    --cc=sjg@chromium.org \
    --cc=stern@rowland.harvard.edu \
    --cc=wsa@the-dreams.de \
    /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

Powered by JetHome