Re: [PATCH 00/16] i2c: drop class based instantiaion for selected drivers

2014-07-16 Thread Wolfram Sang
On Thu, Jul 10, 2014 at 01:46:20PM +0200, Wolfram Sang wrote: Some drivers were flagged to remove class based instantiation soon to improve boot-up time. Originally, I was planning for a longer deprecation time so users could switch over to some other kind of instantiation. However

[PATCH 05/16] i2c: i2c-davinci: Drop class based scanning to improve bootup time

2014-07-10 Thread Wolfram Sang
that the behaviour finally changed now. After another transition period, this flag can go, too. Signed-off-by: Wolfram Sang w...@the-dreams.de --- drivers/i2c/busses/i2c-davinci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c

[PATCH 00/16] i2c: drop class based instantiaion for selected drivers

2014-07-10 Thread Wolfram Sang
Wolfram Sang (16): i2c: add debug info when class instantiation was dropped i2c: i2c-at91: Drop class based scanning to improve bootup time i2c: i2c-bcm2835: Drop class based scanning to improve bootup time i2c: i2c-bfin-twi: Drop class based scanning to improve bootup time i2c: i2c-davinci

Re: [PATCH 00/16] i2c: drop class based instantiaion for selected drivers

2014-07-10 Thread Wolfram Sang
+ /* Warn that the adapter lost class based instantiation */ + if (adapter-class == I2C_CLASS_DEPRECATED) { + dev_dbg(adapter-dev, + This adapter dropped support for I2C classes and + won't auto-detect %s devices anymore. If you need

Re: [PATCH] i2c-davinci: Handle signals gracefully

2014-06-01 Thread Wolfram Sang
Feel free to adap my patch or comments and commit. Or wait a few weeks for when I have a sponsor to split and update the patch. OK, I'll hope you can make it for 3.17. Thanks! signature.asc Description: Digital signature ___

Re: [PATCH] i2c: davinci: Add block read functionality for IPMI

2014-05-22 Thread Wolfram Sang
Hi, thanks for the patch. +/* capabilities */ +#define I2C_CAPABILITIES(I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL | \ + I2C_FUNC_SMBUS_READ_BLOCK_DATA) I don't see the need for a seperate define. + struct davinci_i2c_dev { struct device *dev;

Re: [PATCH] i2c-davinci: Handle signals gracefully

2014-05-21 Thread Wolfram Sang
dev_err(dev-dev, controller timed out\n); davinci_i2c_recover_bus(dev); i2c_davinci_init(dev); @@ -384,7 +384,6 @@ i2c_davinci_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, int stop) if (dev-buf_len) { /* This should be

Re: [PATCH 00/17] i2c: deprecate class based instantiation for embedded I2C drivers

2014-03-28 Thread Wolfram Sang
On Mon, Feb 10, 2014 at 11:03:54AM +0100, Wolfram Sang wrote: With I2C, class based instantiation means if a master driver has e.g. I2C_CLASS_HWMON set, all slave drivers with this class will try to probe a device using an array of possible addresses and some heuristics. That creates traffic

Re: [PATCH] i2c-davinci: Handle signals gracefully

2014-03-24 Thread Wolfram Sang
diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index af0b583..254d897 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c @@ -372,9 +372,9 @@ i2c_davinci_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, int stop)

Re: [PATCH] i2c-davinci: Implement a bus recovery that actually works

2014-03-10 Thread Wolfram Sang
I won't be doing those changes though. My sponsor's budget is limited, so I'm just having to do the minimum I can get away with. Pity. Are you available for testing in case someone comes up with a patch? signature.asc Description: Digital signature

Re: [PATCH] i2c-davinci: Handle signals gracefully

2014-03-10 Thread Wolfram Sang
Even more, you should complete the whole transfer. There are devices where things can really go wrong if you send a half-complete command and then start with the next one. So, not checking signals at all is the way to go for I2C drivers. There is some cruft left, so I am happy about patches

Re: [PATCH] i2c-davinci: Handle signals gracefully

2014-03-10 Thread Wolfram Sang
Even more, you should complete the whole transfer. There are devices where things can really go wrong if you send a half-complete command and then start with the next one. So, not checking signals at all is the way to go for I2C drivers. There is some cruft left, so I am happy about

Re: [PATCH] i2c-davinci: Handle signals gracefully

2014-03-09 Thread Wolfram Sang
On Thu, Jan 09, 2014 at 12:11:25PM +0100, Mike Looijmans wrote: When a signal is caught while the i2c-davinci bus driver is transferring, the drive just abandons the transfer and leaves the controller to fend for itself. The next I2C transaction will find the controller in an undefined state

Re: [PATCH] i2c-davinci: Implement a bus recovery that actually works

2014-03-09 Thread Wolfram Sang
On Fri, Feb 28, 2014 at 11:32:05AM +0100, mike.looijm...@topic.nl wrote: From: Mike Looijmans milo-softw...@users.sourceforge.net Having a board where the I2C bus locks up occasionally made it clear that the bus recovery in the i2c-davinci driver will only work on some boards, because on

[PATCH 07/17] i2c: i2c-davinci: deprecate class based instantiation

2014-02-10 Thread Wolfram Sang
Warn users that class based instantiation is going away soon in favour of more robust probing and faster bootup times. Signed-off-by: Wolfram Sang w...@the-dreams.de Cc: Sekhar Nori nsek...@ti.com Cc: Kevin Hilman khil...@deeprootsystems.com --- This patch is a suggestion. Looking for an ack

[PATCH 00/17] i2c: deprecate class based instantiation for embedded I2C drivers

2014-02-10 Thread Wolfram Sang
adding the new DEPRECATED flag. The series can also be found here: git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/deprecated_class Thanks, Wolfram Wolfram Sang (17): Documentation: i2c: describe devicetree method for instantiating devices i2c: add deprecation

Re: [PATCH] i2c: davinci: raw read and write endian fix

2013-11-27 Thread Wolfram Sang
On Wed, Nov 20, 2013 at 08:23:44PM +0200, Taras Kondratiuk wrote: I2C IP block expect LE data, but CPU may operate in BE mode. Need to use endian neutral functions to read/write h/w registers. I.e instead of __raw_read[lw] and __raw_write[lw] functions code need to use read[lw]_relaxed and

Re: [PATCH] i2c: davinci: raw read and write endian fix

2013-11-26 Thread Wolfram Sang
On Wed, Nov 20, 2013 at 08:23:44PM +0200, Taras Kondratiuk wrote: I2C IP block expect LE data, but CPU may operate in BE mode. Need to use endian neutral functions to read/write h/w registers. I.e instead of __raw_read[lw] and __raw_write[lw] functions code need to use read[lw]_relaxed and

Re: [PATCH V3] i2c: move of helpers into the core

2013-08-23 Thread Wolfram Sang
On Thu, Aug 22, 2013 at 06:00:14PM +0200, Wolfram Sang wrote: I2C of helpers used to live in of_i2c.c but experience (from SPI) shows that it is much cleaner to have this in the core. This also removes a circular dependency between the helpers and the core, and so we can finally register child

[PATCH V3] i2c: move of helpers into the core

2013-08-22 Thread Wolfram Sang
. So, fix the drivers and documentation, too. Acked-by: Rob Herring rob.herr...@calxeda.com Reviewed-by: Felipe Balbi ba...@ti.com Acked-by: Rafael J. Wysocki rafael.j.wyso...@intel.com Tested-by: Sylwester Nawrocki s.nawro...@samsung.com Signed-off-by: Wolfram Sang w...@the-dreams.de --- V2-V3

[PATCH V2] i2c: move of helpers into the core

2013-08-21 Thread Wolfram Sang
. So, fix the drivers and documentation, too. Acked-by: Sylwester Nawrocki s.nawro...@amsung.com Acked-by: Rob Herring rob.herr...@calxeda.com Reviewed-by: Felipe Balbi ba...@ti.com Acked-by: Rafael J. Wysocki rafael.j.wyso...@intel.com Signed-off-by: Wolfram Sang w...@the-dreams.de --- V1 - V2

[PATCH] i2c: move of helpers into the core

2013-08-19 Thread Wolfram Sang
. So, fix the drivers and documentation, too. Signed-off-by: Wolfram Sang w...@the-dreams.de --- Documentation/acpi/enumeration.txt |1 - drivers/i2c/busses/i2c-at91.c |3 - drivers/i2c/busses/i2c-cpm.c|6 -- drivers/i2c/busses/i2c

[PATCH RESEND] i2c: move of helpers into the core

2013-08-19 Thread Wolfram Sang
. So, fix the drivers and documentation, too. Signed-off-by: Wolfram Sang w...@the-dreams.de --- Sigh, hitting the CC threshold on vger again. So resending to the lists only. BTW this patch is based on -rc4 and was tested on an AT91 board. More tests very welcome. Thanks! Documentation/acpi

Re: [PATCH RESEND] i2c: move of helpers into the core

2013-08-19 Thread Wolfram Sang
However this patch fails to apply onto either v3.11-rc4 or v3.11-rc6: Argh, did not drop the MPC patch before rebasing :( So either pick the patch i2c: powermac: fix return path on error before, pull the branch [1], or force me to resend ;) Thanks! [1]

Re: [PATCH RESEND] i2c: move of helpers into the core

2013-08-19 Thread Wolfram Sang
On Mon, Aug 19, 2013 at 09:46:04PM +0200, Thierry Reding wrote: On Mon, Aug 19, 2013 at 07:59:40PM +0200, Wolfram Sang wrote: [...] diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c [...] +#if IS_ENABLED(CONFIG_OF) +static void of_i2c_register_devices(struct i2c_adapter *adap

[RFC 00/42] devm improvement series, part #1

2013-06-04 Thread Wolfram Sang
accepted, I'd suggest I rerun my scripts again when rc1 is out and ask Linus to pull this branch [1] directly? This series is merely to show what I am up to. Thanks, Wolfram [1] git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git devm_no_resource_check Wolfram Sang (42): drivers/ata

[PATCH] i2c: busses: remove superfluous comment

2013-05-17 Thread Wolfram Sang
The comment already got copypasted around and is not really useful. Remove it. Signed-off-by: Wolfram Sang w...@the-dreams.de --- drivers/i2c/busses/i2c-davinci.c|1 - drivers/i2c/busses/i2c-designware-platdrv.c |1 - drivers/i2c/busses/i2c-omap.c |1 - 3

[RFC 09/42] drivers/i2c/busses: don't check resource with devm_ioremap_resource

2013-05-10 Thread Wolfram Sang
devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang w...@the-dreams.de --- drivers/i2c/busses/i2c-davinci.c|6 +- drivers/i2c/busses/i2c-designware-platdrv.c |6 +- drivers/i2c/busses/i2c

[PATCH 1/3] i2c: davinci: drop superfluous {get|put}_device

2013-04-18 Thread Wolfram Sang
Driver core already takes care of refcounting, no need to do this on driver level again. Signed-off-by: Wolfram Sang w...@the-dreams.de --- drivers/i2c/busses/i2c-davinci.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/i2c/busses/i2c-davinci.c

[PATCH 2/3] i2c: designware-plat: drop superfluous {get|put}_device

2013-04-18 Thread Wolfram Sang
Driver core already takes care of refcounting, no need to do this on driver level again. Signed-off-by: Wolfram Sang w...@the-dreams.de --- drivers/i2c/busses/i2c-designware-platdrv.c |4 1 file changed, 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers

[PATCH 0/3] remove {get|put}_device from I2C drivers

2013-04-18 Thread Wolfram Sang
I can't see a reason why these drivers should have additional refcounting on top of what the driver core already does. So, remove it. These patches are compile tested only. Tested-by tags are thus much appreciated! The patches are based on my i2c/for-next branch on kernel.org. Wolfram Sang (3

[PATCH 3/3] i2c: designware-pci: drop superfluous {get|put}_device

2013-04-18 Thread Wolfram Sang
Driver core already takes care of refcounting, no need to do this on driver level again. Signed-off-by: Wolfram Sang w...@the-dreams.de --- drivers/i2c/busses/i2c-designware-pcidrv.c |4 1 file changed, 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers

Re: [PATCH] i2c: davinci: rename i2c_recover_bus function

2013-04-04 Thread Wolfram Sang
On Thu, Apr 04, 2013 at 01:54:29PM +, Arnd Bergmann wrote: As of commit 5f9296ba i2c: Add bus recovery infrastructure, there is now a global function with the same name, which clashes with the davinci specific one. The obvious solution is to rename the function with a davinci prefix.

[PATCH] i2c: davinci: rename recover bus functions

2013-03-29 Thread Wolfram Sang
Since we have generic i2c bus recover routines now, these custom ones need to be renamed to fix the namespace clash. Proper conversion needs to be done by someone who has access to the hardware. Signed-off-by: Wolfram Sang w...@the-dreams.de --- drivers/i2c/busses/i2c-davinci.c | 10

Re: [PATCH V4] i2c: davinci: update to devm_* API

2013-03-29 Thread Wolfram Sang
On Tue, Mar 05, 2013 at 05:14:45PM +0530, Vishwanathrao Badarkhe, Manish wrote: Update the code to use devm_* API so that driver core will manage resources. Signed-off-by: Vishwanathrao Badarkhe, Manish manish...@ti.com Applied the following fix: + dev-base =

Re: [PATCH] i2c: Remove unneeded xxx_set_drvdata(..., NULL) calls

2013-02-21 Thread Wolfram Sang
. This could be cleaned up kernel-wide but for now just take the baby step and remove from the i2c subsystem. Reported-by: Wolfram Sang w...@the-dreams.de Reported-by: Stephen Warren swar...@wwwdotorg.org Signed-off-by: Doug Anderson diand...@chromium.org Applied, thanks

Re: question about drivers/i2c/busses/i2c-davinci.c

2013-01-24 Thread Wolfram Sang
will free the interrupt only after remove has finished. Interrupts need to be properly masked out before. Regards, Wolfram -- Pengutronix e.K. | Wolfram Sang| Industrial Linux Solutions | http://www.pengutronix.de/ | signature.asc

Re: i2c:clk: preparation for switch to common clock framework

2012-09-13 Thread Wolfram Sang
...@ti.com Subject had i2c:clk where i2c: davinci would be more precise. Fixed that and pushed to -next. Thanks, Wolfram -- Pengutronix e.K. | Wolfram Sang| Industrial Linux Solutions | http://www.pengutronix.de/ | signature.asc

Re: [PATCH v7] ARM: davinci: i2c: add OF support

2012-08-18 Thread Wolfram Sang
: Sylwester Nawrockis.nawro...@samsung.com --- ping ... any comments? Applied to -next with indentation fixes to the binding description. Thanks! -- Pengutronix e.K. | Wolfram Sang| Industrial Linux Solutions | http

Re: [PATCH v6] ARM: davinci: i2c: add OF support

2012-07-20 Thread Wolfram Sang
Cc: devicetree-disc...@lists.ozlabs.org Cc: linux-...@vger.kernel.org Cc: Ben Dooks ben-li...@fluff.org Cc: Wolfram Sang w.s...@pengutronix.de Cc: Grant Likely grant.lik...@secretlab.ca Cc: Sekhar Nori nsek...@ti.com Cc: Wolfgang Denk w...@denx.de Cc: Sylwester Nawrocki s.nawro...@samsung.com

[RFC] nand/davinci: Fix comment to match the code

2010-09-10 Thread Wolfram Sang
Signed-off-by: Wolfram Sang w.s...@pengutronix.de Cc: Sudhakar Rajashekhara sudhakar@ti.com Cc: Sneha Narnakaje nsnehapra...@ti.com Cc: Artem Bityutskiy artem.bityuts...@nokia.com --- Found while debugging a NAND issue with a dm365. drivers/mtd/nand/davinci_nand.c |5 +++-- 1 files

[PATCH] nand/davinci: relax a timeout for ECC-initialization

2010-09-10 Thread Wolfram Sang
Sudhakar found out that 100us are enough. Sadly, his updated patch was overlooked and an older version still using 100ms was merged. Fix this. Reference: http://patchwork.ozlabs.org/patch/59180/ Signed-off-by: Wolfram Sang w.s...@pengutronix.de Cc: Sudhakar Rajashekhara sudhakar@ti.com Cc

Re: [RFC] nand/davinci: Fix comment to match the code

2010-09-10 Thread Wolfram Sang
. | Wolfram Sang| Industrial Linux Solutions | http://www.pengutronix.de/ | signature.asc Description: Digital signature ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http

Re: [RFC] nand/davinci: Fix comment to match the code

2010-09-10 Thread Wolfram Sang
the one I submitted to linux-mtd list at http://patchwork.ozlabs.org/patch/59180/. But I can submit another patch which corrects it. Wolfram Sang, Do you agree that in the above link which shows the patch I have submitted, the comment matches the code? Yes. Also, where and how 'timeo

Re: [RFC] nand/davinci: Fix comment to match the code

2010-09-10 Thread Wolfram Sang
. | Wolfram Sang| Industrial Linux Solutions | http://www.pengutronix.de/ | signature.asc Description: Digital signature ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http

Re: [PATCH] nand/davinci: relax a timeout for ECC-initialization

2010-09-10 Thread Wolfram Sang
-submit this again? Honestly, I think the comments are similar enough, why another change? Regards, Wolfram -- Pengutronix e.K. | Wolfram Sang| Industrial Linux Solutions | http://www.pengutronix.de/ | signature.asc Description