Re: [PATCH 1/3] i2c: i2c-mux-gpio: Use devm_kzalloc instead of kzalloc

2012-09-22 Thread Peter Korsgaard
>>>>> "Maxime" == Maxime Ripard writes: Maxime> Use the devm_kzalloc managed function to stripdown the error and remove Maxime> code. Maxime> Signed-off-by: Maxime Ripard Besides the comment of Jean - Acked-by: Peter Korsgaard -- Bye, Peter Korsgaar

Re: [PATCH 1/2] i2c: busses: i2c-ocores: Fix documentation filename

2012-09-23 Thread Peter Korsgaard
>>>>> "Maxin" == Maxin B John writes: Maxin> Fixes the wrong filename. Maxin> Signed-off-by: Maxin B. John Acked-by: Peter Korsgaard -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a

Re: [PATCH 2/2] i2c: busses: i2c-ocores: switch to devm_request_and_ioremap

2012-09-23 Thread Peter Korsgaard
>>>>> "Maxin" == Maxin B John writes: Maxin> This drops a few lines of code and allows common APIs to handle Maxin> those for us. Maxin> Signed-off-by: Maxin B. John Acked-by: Peter Korsgaard -- Bye, Peter Korsgaard -- To unsubscribe from this list: se

Re: [PATCH 2/2] i2c: busses: i2c-ocores: switch to devm_request_and_ioremap

2012-10-09 Thread Peter Korsgaard
>>>>> "Maxin" == Maxin B John writes: Maxin> Hi Peter, Maxin> This drops a few lines of code and allows common APIs to handle Maxin> those for us. Maxin> Signed-off-by: Maxin B. John >> Acked-by: Peter Korsgaard Maxin> Is there any upda

Re: [PATCH 1/2] i2c: mux: Add dt support to i2c-mux-gpio driver

2012-10-23 Thread Peter Korsgaard
} MR> dev_info(&pdev->dev, "%d port mux on %s adapter\n", MR> -pdata->n_values, parent->name); MR> - MR> - platform_set_drvdata(pdev, mux); MR> + mux->data->n_values, parent->name); MR> return 0; MR> add_ada

Re: [PATCH 1/2] i2c: i2c-ocores: Add irq support for sparc

2012-10-23 Thread Peter Korsgaard
at internally Andreas> still uses platform_get_resource. I have no idea why sparc is being odd in this regard, but assuming this is how it's done, I'm fine with this change. A quick grep doesn't find any other drivers doing this though: git grep -l archdata.irqs drivers | xargs grep platform_ge

Re: [PATCH 2/2] i2c: i2c-ocores: Add support for the GRLIB port of the controller and custom getreg and setreg functions

2012-10-23 Thread Peter Korsgaard
c-ocores.c Andreas> +++ b/drivers/i2c/busses/i2c-ocores.c Andreas> @@ -4,6 +4,9 @@ Andreas> * Andreas> * Peter Korsgaard Andreas> * Andreas> + * Support for the GRLIB port of the controller by Andreas> + * Andreas Larsson Andreas> + * Andreas> * This file

Re: [PATCH 1/2] i2c: mux: Add dt support to i2c-mux-gpio driver

2012-10-24 Thread Peter Korsgaard
e mux is already allocated using kcalloc, we don't need to MR> do it for data as well. I will remove it. Ok, great. -- Sorry about disclaimer - It's out of my control. Bye, Peter Korsgaard DISCLAIMER: Unless indicated otherwise, the information contained in this message is privil

Re: [PATCH 2/2] i2c: i2c-ocores: Add support for the GRLIB port of the controller and custom getreg and setreg functions

2012-10-24 Thread Peter Korsgaard
forms that Andreas> have ioread/write32, but not ioread/write32be are frv and mn10300. Do Andreas> you know if those platforms are using i2c-ocores? Not to my knowledge, no. In that case: Acked-by: Peter Korsgaard -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line &q

Re: [PATCH 1/2] i2c: mux: Add dt support to i2c-mux-gpio driver

2012-10-24 Thread Peter Korsgaard
dev) MR> +{ MR> + struct device_node *np = pdev->dev.of_node; MR> + struct device_node *adapter_np, *child; MR> + struct i2c_adapter *adapter; MR> + unsigned *values, *gpios; MR> + int i = 0; MR> + MR> + if (!np) MR> + return 0; This sh

Re: [PATCH v3 2/2] i2c: i2c-ocores: Add support for the GRLIB port of the controller and custom getreg and setreg functions

2012-11-13 Thread Peter Korsgaard
/ TYPE_GRLIB) and a 2nd of_device_id entry with .data = TYPE_GRLIB, and then using that in the probe routine would be nicer. Have a look at i2c-at91.c for an example of a driver doing something like that. -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v3 2/2] i2c: i2c-ocores: Add support for the GRLIB port of the controller and custom getreg and setreg functions

2012-11-15 Thread Peter Korsgaard
>> example of a driver doing something like that. Andreas> Yes, that is a good idea. Do you think casting to and from Andreas> void * in the following solution is too ugly and rather have a Andreas> struct pointed to, or do you think that would be unnecessary? I find the castin

Re: [PATCH v4 2/2] i2c: i2c-ocores: Add support for the GRLIB port of the controller and custom getreg and setreg functions

2012-11-15 Thread Peter Korsgaard
; + Andreas> + match = of_match_node(ocores_i2c_match, pdev->dev.of_node); Andreas> + if (match) Andreas> + return (int)match->data; Can this ever fail? If not, you might as well do the of_match_node inline in the probe instead of this helper. Other than t

Re: [PATCH v5 2/2] i2c: i2c-ocores: Add support for the GRLIB port of the controller and use function pointers for getreg and setreg functions

2012-11-15 Thread Peter Korsgaard
could even move to a single ops structure), so it would be shorter to assign them at the same time: if (!i2c->setreg || !i2c->getreg) { switch (i2c->reg_io_width) { case 1: i2c->setreg = oc_setreg_8; i2c->getreg = oc_getreg_8; break; case 2:

Re: [PATCH v6 2/2] i2c: i2c-ocores: Add support for the GRLIB port of the controller and use function pointers for getreg and setreg functions

2012-11-15 Thread Peter Korsgaard
om Andreas> grlib functions by setting the setreg and getreg function Andreas> pointers. Andreas> Signed-off-by: Andreas Larsson Acked-by: Peter Korsgaard Thanks! -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a mes

Re: [PATCH] i2c: i2c-ocores: Move grlib set/get functions into #ifdef CONFIG_OF block

2012-11-19 Thread Peter Korsgaard
gt; defined. Andreas> Signed-off-by: Andreas Larsson Acked-by: Peter Korsgaard -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 02/16] i2c: mux-gpio: remove __dev* attributes

2012-11-27 Thread Peter Korsgaard
>>>>> "BP" == Bill Pemberton writes: BP> CONFIG_HOTPLUG is going away as an option. As result the __dev* BP> markings will be going away. BP> Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, BP> and __devexit. BP> Signed-off-by:

Re: [PATCH 08/16] i2c: ocores: remove __dev* attributes

2012-11-27 Thread Peter Korsgaard
>>>>> "Bill" == Bill Pemberton writes: Bill> CONFIG_HOTPLUG is going away as an option. As result the __dev* Bill> markings will be going away. Bill> Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, Bill> and __devexit. Acked

Re: [PATCH] i2c: ocores: Fix pointer to integer cast warning

2013-02-19 Thread Peter Korsgaard
by casting the pointer to long. I've CC'ed Andreas who made the change. Acked-by: Peter Korsgaard Jayachandran> Signed-off-by: Jayachandran C Jayachandran> --- Jayachandran> drivers/i2c/busses/i2c-ocores.c |2 +- Jayachandran> 1 file changed, 1 insertion(+), 1 delet

Re: [PATCH] i2c-mux-gpio: Check gpio_direction_output return value

2013-03-03 Thread Peter Korsgaard
>>>>> "JD" == Jean Delvare writes: JD> gpio_direction_output() may fail, check for that and deal with it JD> appropriately. Also log an error message if gpio_request() fails. JD> Signed-off-by: Jean Delvare JD> Cc: Peter Korsgaard JD> Cc: Wolfram Sang

Re: [PATCH] i2c: busses: i2c-ocores: Fix PM-related warning

2013-03-04 Thread Peter Korsgaard
t; -#else >> -#define OCORES_I2C_PM NULL >> -#endif >> >> static struct platform_driver ocores_i2c_driver = { >> .probe = ocores_i2c_probe, >> @@ -490,7 +487,7 @@ static struct platform_driver ocores_i2c_driver = { >> .owner = THIS_MODULE,

Re: [PATCH v3] i2c-mux-gpio: Check gpio_direction_output return value

2013-03-07 Thread Peter Korsgaard
>>>>> "JD" == Jean Delvare writes: JD> gpio_direction_output() may fail, check for that and deal with it JD> appropriately. Also log an error message if gpio_request() fails. JD> Signed-off-by: Jean Delvare JD> Cc: Peter Korsgaard JD> Cc: Wolfram Sang

Re: [PATCH v5 1/3] i2c: mux: Add i2c-arb-gpio-challenge 'mux' driver

2013-04-16 Thread Peter Korsgaard
master is supported"? Also there's a typo: s/use the claim/use to claim/ -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] i2c-mux-gpio: use deferred probing with the device tree

2013-10-08 Thread Peter Korsgaard
another error code. This error should be passed further IN> instead of being ignored. Two different fixes, so should be 2 separate patches. Other that that, it looks good. Acked-by: Peter Korsgaard -- Sorry about disclaimer - It's out of my control. Bye, Peter Korsgaard This message is sub

Re: [PATCH 1/2] i2c-mux-gpio: use deferred probing with the device tree

2013-10-08 Thread Peter Korsgaard
>>>>> "IN" == Ionut Nicu writes: IN> If the i2c-parent bus driver is not loaded, returning IN> -EINVAL will force people to unload and then reload the IN> module again to get it working. IN> Signed-off-by: Ionut Nicu Acked-by: Peter Korsgaard -- So

Re: [PATCH 2/2] i2c-mux-gpio: don't ignore of_get_named_gpio errors

2013-10-08 Thread Peter Korsgaard
>>>>> "IN" == Ionut Nicu writes: IN> of_get_named_gpio could return -E_PROBE_DEFER or another IN> error code. This error should be passed further instead IN> of being ignored. Acked-by: Peter Korsgaard -- Sorry about disclaimer - It's out of my contro

Re: [PATCH 1/2] i2c-mux-gpio: use deferred probing with the device tree

2013-10-08 Thread Peter Korsgaard
>> >> Signed-off-by: Ionut Nicu WS> Doesn't the non-DT case need fixing, too? Arguably yes. -- Bye, Peter Korsgaard This message is subject to the following terms and conditions: MAIL DISCLAIMER<http://www.barco.com/en/maildisclaimer> -- To unsubscribe from this list:

Re: [PATCH 1/2] i2c-mux-gpio: use deferred probing

2013-10-09 Thread Peter Korsgaard
>>>>> "IN" == Ionut Nicu writes: IN> If the i2c-parent bus driver is not loaded, returning IN> -ENODEV will force people to unload and then reload the IN> module again to get it working. IN> Signed-off-by: Ionut Nicu Acked-by: Peter Korsgaard -- So

Re: [PATCH 1/2] i2c-mux-gpio: use gpio_set_value_cansleep()

2013-10-11 Thread Peter Korsgaard
ta.n_gpios; i++) IN> - gpio_set_value(mux->gpio_base + mux->data.gpios[i], IN> - val & (1 << i)); IN> + gpio_set_value_cansleep(mux->gpio_base + mux->data.gpios[i], IN> + val & (1 << i

Re: [PATCH 11/17] i2c: i2c-ocores: deprecate class based instantiation

2014-02-10 Thread Peter Korsgaard
>>>>> "Wolfram" == Wolfram Sang writes: > 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 > Cc: Peter Korsgaard > --- > This patch is a su

Re: [PATCH 1/5] i2c: ocores: Make of_device_id array const

2014-05-07 Thread Peter Korsgaard
>>>>> "Jingoo" == Jingoo Han writes: > Make of_device_id array const, because all OF functions > handle it as const. > Signed-off-by: Jingoo Han Acked-by: Peter Korsgaard > --- > drivers/i2c/busses/i2c-ocores.c |2 +- > 1 file chan

Re: [PATCH V2] i2c: ocores: Make of_device_id array const

2014-05-14 Thread Peter Korsgaard
by: Jingoo Han > Acked-by: Peter Korsgaard > Acked-by: Maxime Coquelin > --- > Changes since v1: > - squashed all patches into a single patch > - added acked-by -- By, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body

Re: [PATCH 09/16] i2c: i2c-ocores: Drop class based scanning to improve bootup time

2014-07-10 Thread Peter Korsgaard
eak after some time. > Signed-off-by: Wolfram Sang Acked-by: Peter Korsgaard -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] i2c-ocores: add common clock support

2015-01-16 Thread Peter Korsgaard
>>>>> "Max" == Max Filippov writes: > Allow bus clock specification as a common clock handle. This makes this > controller easier to use in a setup based on common clock framework. > Signed-off-by: Max Filippov Looks sensible to me - Thanks. Acked-by

Re: [PATCH] i2c-ocores: add common clock support

2015-01-22 Thread Peter Korsgaard
the value of > the clock assigned to this platform_device? > The usual thing to do when 'clock-frequency' is not set is to default to > 100kHz. The confusion comes from the fact that the device tree bindings uses clock-frequency for the clock frequency of the IP core and NOT for

Re: [PATCH] i2c-ocores: add common clock support

2015-01-22 Thread Peter Korsgaard
the history, the device tree patch originally used a custom "clock_khz" property until some guy told him to use clock-frequency ;) https://lists.ozlabs.org/pipermail/devicetree-discuss/2010-November/003650.html As far as I can see I wasn't CC'ed on that patch. -- Bye, Peter Korsgaa

[PATCHv2] i2c: add generic I2C multiplexer using gpio api

2010-10-21 Thread Peter Korsgaard
From: Peter Korsgaard Add an i2c mux driver providing virtual i2c busses using a hardware MUX sitting on a master bus and controlled through gpio pins. E.G. something like: -- -- Virtual bus 1 - - - - - | | SCL/SDA

[PATCHv2,resend] i2c: add generic I2C multiplexer using gpio api

2010-11-03 Thread Peter Korsgaard
From: Peter Korsgaard Add an i2c mux driver providing virtual i2c busses using a hardware MUX sitting on a master bus and controlled through gpio pins. E.G. something like: -- -- Virtual bus 1 - - - - - | | SCL/SDA

Re: [PATCHv2,resend] i2c: add generic I2C multiplexer using gpio api

2010-11-29 Thread Peter Korsgaard
>>>>> "Jean" == Jean Delvare writes: Jean> Hi Peter, Jean> Sorry and the late answer. Thanks for the feedback, see below for a few comments. >> +++ b/Documentation/i2c/busses/i2c-gpiomux >> @@ -0,0 +1,65 @@ >> +Kernel driv

[PATCHv3] i2c: add generic I2C multiplexer using gpio api

2010-11-29 Thread Peter Korsgaard
| || |---| | -- -- - - - - - SCL/SDA of the master I2C bus is multiplexed to virtual bus 1..M according to the settings of the GPIO pins 1..N. Signed-off-by: Peter Korsgaard --- Changes since v2: - Adjust according to Jean&#

Re: [PATCHv3] i2c: add generic I2C multiplexer using gpio api

2010-11-30 Thread Peter Korsgaard
gpiomux_values, >> + .n_values = ARRAY_SIZE(myboard_gpiomux_values), >> + .gpio = myboard_gpiomux_gpios, Jean> .gpios >> + .gpios = ARRAY_SIZE(myboard_gpiomux_gpios), Jean> .n_gpios Ups, fixed. >> +GENERIC GPIO I2C MULTIPLEXER DRIVER

[PATCHv4] i2c: add generic I2C multiplexer using gpio api

2010-11-30 Thread Peter Korsgaard
| || |---| | -- -- - - - - - SCL/SDA of the master I2C bus is multiplexed to bus segment 1..M according to the settings of the GPIO pins 1..N. Signed-off-by: Peter Korsgaard --- Changes since v3: - Adjust according to

Re: [PATCHv4] i2c: add generic I2C multiplexer using gpio api

2010-11-30 Thread Peter Korsgaard
should I resend the patch? >> + if (pdata->idle != GPIO_I2CMUX_NO_IDLE) >> + deselect = gpiomux_deselect; We could probably move this up and add the assignment of init_state to this contional, instead of testing against GPIO_I2CMUX_NO_IDLE twice. -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 3/3] i2c-ocores: add some device tree documentation

2010-12-24 Thread Peter Korsgaard
driver, however, has Jonas> been upstream for a while so I guess we're stuck with it. Yes, it was more or less the best name I could come with. Just calling it i2c.c wouldn't have been any good either. -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsu

Re: Using the gpio i2c multiplexer driver

2011-02-16 Thread Peter Korsgaard
akefile before muxes, but alternatively you could play with the init order (E.G. use subsys_initcall instead of module_init in the bus driver, see b8680784875 for an example). -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a

Re: [PATCH] i2c/busses: Add support for Aeroflex Gaisler I2CMST controller

2011-02-23 Thread Peter Korsgaard
For V2 I will move the register field defines from i2c-ocores.c to Jan> i2c-ocores.h and include that file in the new driver - unless anyone Jan> objects. Ben, do you really think that's worthwhile? It's just 6 registers with a few bits in 3 of them. -- Bye, Peter Korsgaard -- To u

Re: Warning with gpio-i2cmux

2011-04-19 Thread Peter Korsgaard
and register a platform device for gpio-i2cmux which you then forcibly unregister in the i801 remove handler without providing a release() function on the platform device? That's afaik wrong as the platform_device might be in use (E.G. someone has the sysfs entry open or similar, and you need to use

Re: i2c-ocores timeout bug

2011-06-30 Thread Peter Korsgaard
o a patch adding a i2c_clock_khz member to ocores_i2c_platform_data as long as it doesn't break existing boards (E.G. 0 should get handled as 100Khz). -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: i2c-ocores timeout bug

2011-07-03 Thread Peter Korsgaard
-EIO; >> - else >> + else { >> + printk(KERN_NOTICE WARNING seems more suitable here. >> + "ocores_xfer() i2c transfer to %d-%#x timed out\n", >> + i2c_adapter_id(adap), msgs->addr); >> + i2c->msg = 0; /* remove the caller's request which >> will be re-used */ >> return -ETIMEDOUT; >> + } >> } -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] i2c: convert drivers/i2c/* to use module_platform_driver()

2011-11-27 Thread Peter Korsgaard
>>>>> "Axel" == Axel Lin writes: Axel> This patch converts the drivers in drivers/i2c/* to use the Axel> module_platform_driver() macro which makes the code smaller and a bit Axel> simpler. Axel> Cc: Jean Delvare Axel> Cc: Ben Dooks Axel> Cc: J

Re: [PATCH] i2c: reorganize muxes to a standard pattern

2011-11-27 Thread Peter Korsgaard
t i2c-gpiomux.c, and renamed it to gpio-i2cmux.c on request of you. I don't mind the new name though, so: Acked-by: Peter Korsgaard -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] i2c: reorganize muxes to a standard pattern

2011-11-28 Thread Peter Korsgaard
ed. If we were to rename it we should also rename struct gpio_i2cmux_platform_data. I don't feel strongly about it - It will break for existing users, but there's probably not too many of those. Your call. -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line &quo

Re: [PATCH] i2c: convert gpio-i2cmux to use module_platform_driver()

2012-01-08 Thread Peter Korsgaard
>>>>> "AL" == Axel Lin writes: AL> This patch converts gpio-i2cmux to use the module_platform_driver() macro which AL> makes the code smaller and a bit simpler. AL> Signed-off-by: Axel Lin Acked-by: Peter Korsgaard -- Sorry about disclaimer - It's

Re: [PATCH] i2c: reorganize muxes to a standard pattern

2012-03-31 Thread Peter Korsgaard
gt; It *is* on my todo-list, though... >> >> Any news on this? Wolfram> Well, it is still on my list :/ (I wouldn't mind if someone is Wolfram> faster than me) I'll be away for the next 2 weeks, but will do it afterwards if nobody beats me to it (and I don't for

Re: [PATCH] i2c: muxes are not EXPERIMENTAL anymore

2012-04-23 Thread Peter Korsgaard
ram> of EXPERIMENTAL should do for this. Agreed. Acked-by: Peter Korsgaard -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/2] i2c-mux-gpio: Rename platform data structure

2012-04-30 Thread Peter Korsgaard
>>>>> "JD" == Jean Delvare writes: JD> Align the name of i2c-mux-gpio's data structure on the new driver name. JD> Also change one define and adjust function names, even if they aren't JD> part of the public interface, for consistency. JD> Signe

Re: [PATCH 1/2] i2c: Rename last mux driver to standard pattern

2012-04-30 Thread Peter Korsgaard
>>>>> "JD" == Jean Delvare writes: JD> Update the MAINTAINERS entry and all other references accordingly. JD> Based on an original patch by Wolfram Sang. JD> Signed-off-by: Jean Delvare JD> Acked-by: Peter Korsgaard JD> Cc: Wolfram Sang JD> ---

Re: [PATCH 1/2] i2c-ocore: register OF i2c devices

2012-05-28 Thread Peter Korsgaard
EXPERIMENTAL for this driver from Kconfig. And also please consider CC'ing the maintainer on patches (E.G. me) - I didn't notice this before now. -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/4] i2c: i2c-ocores: Use reg-shift property

2012-06-08 Thread Peter Korsgaard
this change to the dt bindings, instead of risking breaking stuff for platform drivers as well? There's no conceptual reason why reg_shift is any better than regstep. -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Again on virtual i2c adapter support.

2009-01-23 Thread Peter Korsgaard
thout problems. I afaik even posted an example driver back when Dave posted his multiplex hack. -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Again on virtual i2c adapter support.

2009-01-23 Thread Peter Korsgaard
is by making sure the multiplexer starts in an unconnected state so the trunk probe doesn't find anything, or simply not use the old style probing. -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel

Re: Again on virtual i2c adapter support.

2009-01-23 Thread Peter Korsgaard
posted his >> multiplex hack. Rodolfo> Did you post the code on this list? Yes, but notice that it was for a multiplexer NOT controlled over I2C. http://www.mail-archive.com/i...@lm-sensors.org/msg01539.html -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line

Re: Again on virtual i2c adapter support.

2009-01-23 Thread Peter Korsgaard
arent mutex enable mux do transfer on parent bus disable mux unlock parent So that afaik shouldn't be a problem. If your mux doesn't have an enable control and there's no unused connection you can use instead, then that ofcourse doesn't work. -- Bye, Peter Korsgaard -- To

Re: Again on virtual i2c adapter support.

2009-01-23 Thread Peter Korsgaard
gh something else (in this case a sram-like bus on a fpga). -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2] i2c-mpc: generate START condition after STOP caused by read i2c_msg

2009-05-28 Thread Peter Korsgaard
ch. I guess Wolfram referred to the context line which was clearly word wrapped: @@ -456,17 +456,22 @@ static int mpc_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) The other lines look fine. -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubsc

Re: [PATCH v2] i2c-mpc: generate START condition after STOP caused by read i2c_msg

2009-05-28 Thread Peter Korsgaard
abs.org/pipermail/linuxppc-dev/2009-May/072274.html Please consider using git send-email for patches. -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] I2C: ocores can add I2C devices to the bus

2009-06-03 Thread Peter Korsgaard
i2c_add_adapter(&i2c->adap); + ret = i2c_add_numbered_adapter(&i2c->adap); if (ret) { dev_err(&pdev->dev, "Failed to add adapter\n"); goto add_adapter_failed; Or am I misunderstanding the issue? -- Bye, Peter Korsgaard --

Re: [PATCH 3/9] I2C: i2c-ocores: Can add I2C devices to the bus

2009-06-05 Thread Peter Korsgaard
on is the pass a list of I2C devices in the Richard> platform data to the Open Cores driver. This is useful for Richard> MFD drivers. Richard> Signed-off-by: Richard Röjfors Acked-by: Peter Korsgaard -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscrib

[PATCH] i2c-s3c2410: s3c24xx_i2c_init: don't clobber IICLC value

2009-07-17 Thread Peter Korsgaard
s3c24xx_i2c_init() was overwriting the IICLC value set just above in s3c24xx_i2c_clockrate() with zero, effectively disabling the platform line control setting. Signed-off-by: Peter Korsgaard --- drivers/i2c/busses/i2c-s3c2410.c |5 - 1 files changed, 0 insertions(+), 5 deletions

Re: [PATCH] i2c-s3c2410: s3c24xx_i2c_init: don't clobber IICLC value

2009-07-24 Thread Peter Korsgaard
>>>>> "Peter" == Peter Korsgaard writes: Peter> s3c24xx_i2c_init() was overwriting the IICLC value set just Peter> above in s3c24xx_i2c_clockrate() with zero, effectively Peter> disabling the platform line control setting. ping? -- Bye, Peter Korsgaar

Re: About a suspicious msleep during doxfer in s3c2410 i2c bus driver

2009-07-31 Thread Peter Korsgaard
> msleep() here, then I'd be interested to know. I'll test on my 6410 board over the weekend. Notice that I've been hacking on the uboot drivers/i2c/s3c24x0_i2c.c file to add s3c64xx support, and I there had to add a udelay before setting the start condition to get it to work stable

Re: [PATCH] i2c-mpc: Do not generate STOP after read.

2009-09-28 Thread Peter Korsgaard
>>>>> "Joakim" == Joakim Tjernlund writes: Hi, Joakim> Ah, that explains it. Who then will look after i2c-mpc? Kumar? Ben Dooks (embedded i2c maintainer). He's afaik coming home today, so give him a few days to catch up on mails. -- Bye, Peter Korsgaard

Re: [PATCH RESEND 1/1] i2c: Add support for Xilinx XPS IIC Bus Interface

2010-01-24 Thread Peter Korsgaard
directories) easily go stale when reorganizing the tree. Exactly, that's normally frowned upon in other parts of the tree. -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] i2c: add generic I2C multiplexer using gpio api

2010-07-04 Thread Peter Korsgaard
| || |---| | -- -- - - - - - SCL/SDA of the master I2C bus is multiplexed to virtual bus 1..M according to the settings of the GPIO pins 1..N. Signed-off-by: Peter Korsgaard --- Documentation/i2c/busses/i2c-gpiomux | 65

Re: [PATCH] i2c: add generic I2C multiplexer using gpio api

2010-07-20 Thread Peter Korsgaard
>>>>> "Peter" == Peter Korsgaard writes: Peter> Add an i2c bus driver providing virtual i2c busses using a hardware Peter> MUX sitting on a master bus and controlled through gpio pins. Peter> E.G. something like: Peter> -- ---

Re: [PATCH] i2c: add generic I2C multiplexer using gpio api

2010-07-20 Thread Peter Korsgaard
merged (which is scheduled to happen in kernel 2.6.36.) But this patch is independent from that work as the mux access isn't through I2C, hence no changes to i2c-core needed. Do you want me to resend or do you still have the original patch? -- Bye, Peter Korsgaard -- To unsubscribe from t

Re: [PATCH] i2c: add generic I2C multiplexer using gpio api

2010-07-20 Thread Peter Korsgaard
lm-sensors.org/msg01539.html None of the locking changes in core are needed when the MUX isn't controlled through I2C. I guess I could use the i2c-mux.c functions, as there's some overlap in the trivial gpiomux_xfer/gpiomux_func functions, but that can easily be done once the mux stuff is merge

Re: [PATCH] i2c: add generic I2C multiplexer using gpio api

2010-07-20 Thread Peter Korsgaard
Your scenario fits perfectly. Hmm, I'll take a closer look at the last version then - sorry. In the past it afaik did. What is the point of the i2c-core changes if path control isn't via i2c? -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-

Re: [PATCH] i2c: i2c-mux-gpio: Change log level to debug for probe deferrals

2015-03-25 Thread Peter Korsgaard
d in the logs IN> without these error prints. IN> This patch changes the error messages from these deferral cases IN> to debug messages. IN> Signed-off-by: Ionut Nicu Acked-by: Peter Korsgaard -- Sorry about disclaimer - It's out of my control. Bye, Peter Korsgaard This me

Re: [PATCH v2] i2c: i2c-mux-gpio: remove error messages for probe deferrals

2015-04-02 Thread Peter Korsgaard
message when a driver >> requests probe deferral, so this can be traced in the logs >> without these error prints. >> >> This patch removes the error messages for these deferral cases. >> >> Signed-off-by: Ionut Nicu AS> Acked-by: Alexander Sverdlin Acked-by:

Re: [PATCH v2] i2c-ocores: support big-endian register layout

2015-09-24 Thread Peter Korsgaard
Changes v1->v2: > - expand changelog with motivation for the change. You should also document the big-endian property in Documentation/devicetree/bindings/i2c/i2c-ocores.txt, otherwise it looks good. With that added: Acked-by: Peter Korsgaard -- Bye, Peter Korsgaard -- To unsubscribe from th

Re: [PATCH v2] i2c-ocores: support big-endian register layout

2015-09-24 Thread Peter Korsgaard
re common properties documented > in the Documentation/devicetree/bindings/common-properties.txt Ok, then it looks good to me. -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [linux-sunxi] [PATCH] i2c: mv64xxx: The n clockdiv factor is 0 based on sunxi SoCs

2015-09-27 Thread Peter Korsgaard
>>>>> "Hans" == Hans de Goede writes: > According to the datasheets to n factor for dividing the tclk is s/to/the/ -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@

Re: multiple i2c-ocores adapters

2015-10-01 Thread Peter Korsgaard
from the mfd_cell). Make sure you set the .id member to something unique. -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: multiple i2c-ocores adapters

2015-10-02 Thread Peter Korsgaard
== -1. Please make sure you use unique ids when you have more than 1 device instance on your system. -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [RESEND PATCH 0/9] eeprom: at24: at24cs series serial number read

2015-10-21 Thread Peter Korsgaard
ss > pointers). As the serial number is available on a separate i2c address, wouldn't it be simpler to handle these as special (read only) device variants and instantiate E.G. a 24c64 (for the normal data) and a 24cs64 (for the serial)? -- Bye, Peter Korsgaard -- To unsubscribe from thi

Re: [RESEND PATCH 0/9] eeprom: at24: at24cs series serial number read

2015-10-21 Thread Peter Korsgaard
t; both memory blocks share the same address pointer. > I'll resend the series. But we're protected by the i2c bus lock, right? You do a single i2c_transfer to read the serial number. -- Venlig hilsen, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubsc

Re: [RESEND PATCH 0/9] eeprom: at24: at24cs series serial number read

2015-10-21 Thread Peter Korsgaard
my bad. It needs to be fixed as >> > both memory blocks share the same address pointer. >> >> > I'll resend the series. >> >> But we're protected by the i2c bus lock, right? You do a single >> i2c_transfer to read the serial number. > Wh