Re: Still problems wit egt20 i2c driver

2011-12-05 Thread Tomoya MORINAGA
Hi Ben,

2011/11/24 Tomoya MORINAGA :
> Hi Ben
>
> It seems the following patches are not reviewed yet.
> [PATCH] i2c-eg20t: modified the setting of transfer rate (Mon, 26 Sep
> 2011 16:16:23 +0900)
> [PATCH 1/2] i2c-eg20t: Support new device LAPIS Semiconductor ML7831
> IOH (Fri, 28 Oct 2011 09:40:10 +0900)
> [PATCH 2/2] i2c-eg20t: Change-company-name-OKI-SEMICONDUCTOR to LAPIS
> Semiconductor
>

Don't you forget this task ?

thanks,
tomoya
--
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 multiplexer driver for Proliant microserver N36L

2011-12-05 Thread Eddi De Pieri
Hello,

I tried in rewriting the driver... but I can't understand the right way...

since sb800 is a southbus, the mux driver must be defined as
i2c_device, platform_device, or pci_device?

I tried using i2c_device structure, but I can't make sb800 to match
the id_Table..
I tried usign pci_device structure, but the driver overwrite the pci
space so kernel hangs...

Regards, Eddi.

On Sat, Dec 3, 2011 at 6:08 PM, Jean Delvare  wrote:
> Hi Eddi,
>
> On Sat, 3 Dec 2011 17:42:16 +0100, Eddi De Pieri wrote:
>> Actually I don't have a development system with latest git. I build my
>> patch on my debian with 2.6.32 kernel..
>>
>> The patch is based on i2c-amd756-s4882.c and adapted to work with sb8xx...
>>
>> i2c-amd756-s4882.c is still present and don't use i2c-mux infrastructure.
>
> That's because i2c-amd756-s4882.c was written before the i2c-mux
> infrastructure was available. Ideally SMBus multiplexing support on the
> Tyan S4882 would be converted to i2c-mux (i.e. i2c-amd756-s4882.c would
> be deleted and the multiplexer would be instantiated in i2c-amd756.c
> itself, based on DMI data.) This shouldn't be particularly difficult,
> the real difficulty is to find someone with one of these boards to test
> the changes.
>
>> However if you are interested in porting my work to latest git, you
>> will be welcome!
>
> That's not how it works, sorry. Submissions must be based on a recent
> kernel in order to be accepted upstream. If you want SMBus multiplexing
> support on your system, it will have to be based on i2c-mux, because
> that's how things work now. Otherwise I will not accept your code.
>
> --
> Jean Delvare
--
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 2/2] i2c-s3c2410: Add stub runtime power management

2011-12-05 Thread Mark Brown
Add stub runtime_pm calls which go through the flow of enabling and
disabling but don't actually do anything with the device itself as
there's nothing useful we can do. This provides the core PM framework
with information about when the device is idle, enabling chip wide
power savings.

Signed-off-by: Mark Brown 
---
 drivers/i2c/busses/i2c-s3c2410.c |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index ed62a7f..065c316 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -563,6 +564,7 @@ static int s3c24xx_i2c_xfer(struct i2c_adapter *adap,
int retry;
int ret;
 
+   pm_runtime_get_sync(&adap->dev);
clk_enable(i2c->clk);
 
for (retry = 0; retry < adap->retries; retry++) {
@@ -571,6 +573,7 @@ static int s3c24xx_i2c_xfer(struct i2c_adapter *adap,
 
if (ret != -EAGAIN) {
clk_disable(i2c->clk);
+   pm_runtime_put_sync(&adap->dev);
return ret;
}
 
@@ -580,6 +583,7 @@ static int s3c24xx_i2c_xfer(struct i2c_adapter *adap,
}
 
clk_disable(i2c->clk);
+   pm_runtime_put_sync(&adap->dev);
return -EREMOTEIO;
 }
 
@@ -1012,6 +1016,9 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
of_i2c_register_devices(&i2c->adap);
platform_set_drvdata(pdev, i2c);
 
+   pm_runtime_enable(&pdev->dev);
+   pm_runtime_enable(&i2c->adap.dev);
+
dev_info(&pdev->dev, "%s: S3C I2C adapter\n", dev_name(&i2c->adap.dev));
clk_disable(i2c->clk);
return 0;
@@ -1046,6 +1053,9 @@ static int s3c24xx_i2c_remove(struct platform_device 
*pdev)
 {
struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev);
 
+   pm_runtime_disable(&i2c->adap.dev);
+   pm_runtime_disable(&pdev->dev);
+
s3c24xx_i2c_deregister_cpufreq(i2c);
 
i2c_del_adapter(&i2c->adap);
-- 
1.7.7.3

--
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 1/2] i2c-s3c2410: Convert to devm_kzalloc()

2011-12-05 Thread Mark Brown
Saves remembering to call kfree(). There's some kfree()s used by the
resource still, these will be removed in 3.3 using the newly added
devm_request_and_ioremap().

Signed-off-by: Mark Brown 
---
 drivers/i2c/busses/i2c-s3c2410.c |4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 2754cef..ed62a7f 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -889,7 +889,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
}
}
 
-   i2c = kzalloc(sizeof(struct s3c24xx_i2c), GFP_KERNEL);
+   i2c = devm_kzalloc(&pdev->dev, sizeof(struct s3c24xx_i2c), GFP_KERNEL);
if (!i2c) {
dev_err(&pdev->dev, "no memory for state\n");
return -ENOMEM;
@@ -1034,7 +1034,6 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
clk_put(i2c->clk);
 
  err_noclk:
-   kfree(i2c);
return ret;
 }
 
@@ -1060,7 +1059,6 @@ static int s3c24xx_i2c_remove(struct platform_device 
*pdev)
release_resource(i2c->ioarea);
s3c24xx_i2c_dt_gpio_free(i2c);
kfree(i2c->ioarea);
-   kfree(i2c);
 
return 0;
 }
-- 
1.7.7.3

--
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