[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150115120704.GB2549@katana>
Date: Thu, 15 Jan 2015 13:07:05 +0100
From: Wolfram Sang <wsa@...-dreams.de>
To: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Cc: Ray Jui <rjui@...adcom.com>, Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
Grant Likely <grant.likely@...aro.org>,
Christian Daudt <bcm@...thebug.org>,
Matt Porter <mporter@...aro.org>,
Florian Fainelli <f.fainelli@...il.com>,
Russell King <linux@....linux.org.uk>,
Scott Branden <sbranden@...adcom.com>,
linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
bcm-kernel-feedback-list@...adcom.com, devicetree@...r.kernel.org
Subject: Re: [PATCH v4 2/3] i2c: iproc: Add Broadcom iProc I2C Driver
> > + iproc_i2c->msg = msg;
> Can it happen that iproc_i2c->msg still holds an uncompleted message
> here or is this serialized by the core? Wolfram? Either here something
We have per-adapter locks serializing transfers, if you mean that?
> > +static int bcm_iproc_i2c_cfg_speed(struct bcm_iproc_i2c_dev *iproc_i2c)
> > +{
> > + unsigned int bus_speed, speed_bit;
> > + u32 val;
> > + int ret = of_property_read_u32(iproc_i2c->device->of_node,
> > + "clock-frequency", &bus_speed);
> > + if (ret < 0) {
> > + dev_err(iproc_i2c->device,
> > + "missing clock-frequency property\n");
> > + return -ENODEV;
> Is a missing property the only situation where of_property_read_u32
> returns an error? Would it be sane to default to 100 kHz?
Default of 100kHz instead of -ENODEV sounds very reasonable.
> > +static int bcm_iproc_i2c_remove(struct platform_device *pdev)
> > +{
> > + struct bcm_iproc_i2c_dev *iproc_i2c = platform_get_drvdata(pdev);
> > +
> > + i2c_del_adapter(&iproc_i2c->adapter);
> You need to free the irq before i2c_del_adapter.
One could also keep using devm_request_irq and disable all interrupts
sources here?
Thanks for the reviews, Uwe!
Wolfram
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists