* [PATCH] i2c: rcar: Remove obsolete platform data support
@ 2015-10-07 8:16 Geert Uytterhoeven
2015-10-07 12:12 ` Sergei Shtylyov
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2015-10-07 8:16 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-i2c, linux-sh, Geert Uytterhoeven
Since commit 4baadb9e05c68962 ("ARM: shmobile: r8a7778: remove obsolete
setup code"), Renesas R-Car SoCs are only supported in generic DT-only
ARM multi-platform builds. The driver doesn't need to use platform data
anymore, hence remove platform data configuration.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Commit 4baadb9e05c68962 is now in arm-soc/for-next.
---
drivers/i2c/busses/i2c-rcar.c | 19 +------------------
include/linux/i2c/i2c-rcar.h | 10 ----------
2 files changed, 1 insertion(+), 28 deletions(-)
delete mode 100644 include/linux/i2c/i2c-rcar.h
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
index 3e125654bb28..cd38406db074 100644
--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -27,7 +27,6 @@
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/i2c.h>
-#include <linux/i2c/i2c-rcar.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of_device.h>
@@ -634,7 +633,6 @@ MODULE_DEVICE_TABLE(of, rcar_i2c_dt_ids);
static int rcar_i2c_probe(struct platform_device *pdev)
{
- struct i2c_rcar_platform_data *pdata = dev_get_platdata(&pdev->dev);
struct rcar_i2c_priv *priv;
struct i2c_adapter *adap;
struct resource *res;
@@ -654,14 +652,8 @@ static int rcar_i2c_probe(struct platform_device *pdev)
bus_speed = 100000; /* default 100 kHz */
ret = of_property_read_u32(dev->of_node, "clock-frequency", &bus_speed);
- if (ret < 0 && pdata && pdata->bus_speed)
- bus_speed = pdata->bus_speed;
- if (pdev->dev.of_node)
- priv->devtype = (long)of_match_device(rcar_i2c_dt_ids,
- dev)->data;
- else
- priv->devtype = platform_get_device_id(pdev)->driver_data;
+ priv->devtype = (long)of_match_device(rcar_i2c_dt_ids, dev)->data;
ret = rcar_i2c_clock_calculate(priv, bus_speed, dev);
if (ret < 0)
@@ -718,14 +710,6 @@ static int rcar_i2c_remove(struct platform_device *pdev)
return 0;
}
-static const struct platform_device_id rcar_i2c_id_table[] = {
- { "i2c-rcar", I2C_RCAR_GEN1 },
- { "i2c-rcar_gen1", I2C_RCAR_GEN1 },
- { "i2c-rcar_gen2", I2C_RCAR_GEN2 },
- {},
-};
-MODULE_DEVICE_TABLE(platform, rcar_i2c_id_table);
-
static struct platform_driver rcar_i2c_driver = {
.driver = {
.name = "i2c-rcar",
@@ -733,7 +717,6 @@ static struct platform_driver rcar_i2c_driver = {
},
.probe = rcar_i2c_probe,
.remove = rcar_i2c_remove,
- .id_table = rcar_i2c_id_table,
};
module_platform_driver(rcar_i2c_driver);
diff --git a/include/linux/i2c/i2c-rcar.h b/include/linux/i2c/i2c-rcar.h
deleted file mode 100644
index 496f5c2b23c9..000000000000
--- a/include/linux/i2c/i2c-rcar.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef __I2C_R_CAR_H__
-#define __I2C_R_CAR_H__
-
-#include <linux/platform_device.h>
-
-struct i2c_rcar_platform_data {
- u32 bus_speed;
-};
-
-#endif /* __I2C_R_CAR_H__ */
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: rcar: Remove obsolete platform data support
2015-10-07 8:16 [PATCH] i2c: rcar: Remove obsolete platform data support Geert Uytterhoeven
@ 2015-10-07 12:12 ` Sergei Shtylyov
2015-10-20 16:11 ` Wolfram Sang
0 siblings, 1 reply; 3+ messages in thread
From: Sergei Shtylyov @ 2015-10-07 12:12 UTC (permalink / raw)
To: Geert Uytterhoeven, Wolfram Sang; +Cc: linux-i2c, linux-sh
Hello.
On 10/7/2015 11:16 AM, Geert Uytterhoeven wrote:
> Since commit 4baadb9e05c68962 ("ARM: shmobile: r8a7778: remove obsolete
> setup code"), Renesas R-Car SoCs are only supported in generic DT-only
> ARM multi-platform builds. The driver doesn't need to use platform data
> anymore, hence remove platform data configuration.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> Commit 4baadb9e05c68962 is now in arm-soc/for-next.
> ---
> drivers/i2c/busses/i2c-rcar.c | 19 +------------------
> include/linux/i2c/i2c-rcar.h | 10 ----------
> 2 files changed, 1 insertion(+), 28 deletions(-)
> delete mode 100644 include/linux/i2c/i2c-rcar.h
>
> diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
> index 3e125654bb28..cd38406db074 100644
> --- a/drivers/i2c/busses/i2c-rcar.c
> +++ b/drivers/i2c/busses/i2c-rcar.c
[...]
> @@ -654,14 +652,8 @@ static int rcar_i2c_probe(struct platform_device *pdev)
>
> bus_speed = 100000; /* default 100 kHz */
> ret = of_property_read_u32(dev->of_node, "clock-frequency", &bus_speed);
The result can be ignored now.
> - if (ret < 0 && pdata && pdata->bus_speed)
> - bus_speed = pdata->bus_speed;
>
> - if (pdev->dev.of_node)
> - priv->devtype = (long)of_match_device(rcar_i2c_dt_ids,
> - dev)->data;
> - else
> - priv->devtype = platform_get_device_id(pdev)->driver_data;
> + priv->devtype = (long)of_match_device(rcar_i2c_dt_ids, dev)->data;
>
> ret = rcar_i2c_clock_calculate(priv, bus_speed, dev);
> if (ret < 0)
[...]
MBR, Sergei
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: rcar: Remove obsolete platform data support
2015-10-07 12:12 ` Sergei Shtylyov
@ 2015-10-20 16:11 ` Wolfram Sang
0 siblings, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2015-10-20 16:11 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: Geert Uytterhoeven, linux-i2c, linux-sh
[-- Attachment #1: Type: text/plain, Size: 1901 bytes --]
On Wed, Oct 07, 2015 at 03:12:34PM +0300, Sergei Shtylyov wrote:
> Hello.
>
> On 10/7/2015 11:16 AM, Geert Uytterhoeven wrote:
>
> >Since commit 4baadb9e05c68962 ("ARM: shmobile: r8a7778: remove obsolete
> >setup code"), Renesas R-Car SoCs are only supported in generic DT-only
> >ARM multi-platform builds. The driver doesn't need to use platform data
> >anymore, hence remove platform data configuration.
> >
> >Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> >---
> >Commit 4baadb9e05c68962 is now in arm-soc/for-next.
> >---
> > drivers/i2c/busses/i2c-rcar.c | 19 +------------------
> > include/linux/i2c/i2c-rcar.h | 10 ----------
> > 2 files changed, 1 insertion(+), 28 deletions(-)
> > delete mode 100644 include/linux/i2c/i2c-rcar.h
> >
> >diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
> >index 3e125654bb28..cd38406db074 100644
> >--- a/drivers/i2c/busses/i2c-rcar.c
> >+++ b/drivers/i2c/busses/i2c-rcar.c
> [...]
> >@@ -654,14 +652,8 @@ static int rcar_i2c_probe(struct platform_device *pdev)
> >
> > bus_speed = 100000; /* default 100 kHz */
> > ret = of_property_read_u32(dev->of_node, "clock-frequency", &bus_speed);
>
> The result can be ignored now.
Yup, my code checkers found this, too ;)
Fixed it here.
>
> >- if (ret < 0 && pdata && pdata->bus_speed)
> >- bus_speed = pdata->bus_speed;
> >
> >- if (pdev->dev.of_node)
> >- priv->devtype = (long)of_match_device(rcar_i2c_dt_ids,
> >- dev)->data;
> >- else
> >- priv->devtype = platform_get_device_id(pdev)->driver_data;
> >+ priv->devtype = (long)of_match_device(rcar_i2c_dt_ids, dev)->data;
I changed this to the enum type of devtype
Other than that:
Applied to for-next, thanks!
> >
> > ret = rcar_i2c_clock_calculate(priv, bus_speed, dev);
> > if (ret < 0)
> [...]
>
> MBR, Sergei
>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-10-20 16:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-07 8:16 [PATCH] i2c: rcar: Remove obsolete platform data support Geert Uytterhoeven
2015-10-07 12:12 ` Sergei Shtylyov
2015-10-20 16:11 ` Wolfram Sang
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).