From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: spi-devel-general@lists.sourceforge.net,
Grant Likely <grant.likely@secretlab.ca>,
Rob Herring <rob.herring@calxeda.com>,
Rob Landley <rob@landley.net>,
linux-doc@vger.kernel.org, devicetree-discuss@lists.ozlabs.org
Subject: Re: [PATCH] spi: Master driver for NXP SC18IS602/603
Date: Wed, 22 Aug 2012 19:32:30 +0100 [thread overview]
Message-ID: <20120822183230.GC7995@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1345305987-1954-1-git-send-email-linux@roeck-us.net>
[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]
On Sat, Aug 18, 2012 at 09:06:27AM -0700, Guenter Roeck wrote:
> This driver adds support for NXP SC18IS602/603 I2C to SPI bus bridge.
>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Applied, thanks. One small thing:
> +static int sc18is602_probe(struct i2c_client *client,
> + const struct i2c_device_id *id)
> +{
> + struct device *dev = &client->dev;
> + struct device_node *np = dev->of_node;
> + struct sc18is602_platform_data *pdata = dev_get_platdata(dev);
> + struct sc18is602 *hw;
> + struct spi_master *master;
> + int error;
> +
> + if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C |
> + I2C_FUNC_SMBUS_WRITE_BYTE_DATA))
> + return -ENODEV;
This feels like the wrong thing to do here: given that the user needs to
explicitly ask for the device to be instantiated we really ought to be
one the right bus so this should be more of an error. Not sure what I
can constructively sugget except for an error message and perhaps
returning -EINVAL though.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-08-22 18:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-18 16:06 [PATCH] spi: Master driver for NXP SC18IS602/603 Guenter Roeck
2012-08-22 18:32 ` Mark Brown [this message]
2012-08-22 19:19 ` Guenter Roeck
2012-08-22 19:24 ` Mark Brown
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=20120822183230.GC7995@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=linux-doc@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
--cc=spi-devel-general@lists.sourceforge.net \
/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).