2021-03-31 15:50:47

by Andy Shevchenko

[permalink] [raw]
Subject: [PATCH v1 2/2] i2c: designware: Get rid of legacy platform data

Platform data is a legacy interface to supply device properties
to the driver. In this case we don't have anymore in-kernel users
for it. Just remove it for good.

Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/i2c/busses/i2c-designware-platdrv.c | 7 +------
include/linux/platform_data/i2c-designware.h | 13 -------------
2 files changed, 1 insertion(+), 19 deletions(-)
delete mode 100644 include/linux/platform_data/i2c-designware.h

diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index 0dfeb2d11603..4b37f28ec0c6 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -22,7 +22,6 @@
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
-#include <linux/platform_data/i2c-designware.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
#include <linux/pm_runtime.h>
@@ -206,7 +205,6 @@ static const struct dmi_system_id dw_i2c_hwmon_class_dmi[] = {

static int dw_i2c_plat_probe(struct platform_device *pdev)
{
- struct dw_i2c_platform_data *pdata = dev_get_platdata(&pdev->dev);
struct i2c_adapter *adap;
struct dw_i2c_dev *dev;
struct i2c_timings *t;
@@ -236,10 +234,7 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
reset_control_deassert(dev->rst);

t = &dev->timings;
- if (pdata)
- t->bus_freq_hz = pdata->i2c_scl_freq;
- else
- i2c_parse_fw_timings(&pdev->dev, t, false);
+ i2c_parse_fw_timings(&pdev->dev, t, false);

i2c_dw_adjust_bus_speed(dev);

diff --git a/include/linux/platform_data/i2c-designware.h b/include/linux/platform_data/i2c-designware.h
deleted file mode 100644
index 014c4a5a7e13..000000000000
--- a/include/linux/platform_data/i2c-designware.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Copyright(c) 2014 Intel Corporation.
- */
-
-#ifndef I2C_DESIGNWARE_H
-#define I2C_DESIGNWARE_H
-
-struct dw_i2c_platform_data {
- unsigned int i2c_scl_freq;
-};
-
-#endif
--
2.30.2


2021-04-06 23:41:13

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH v1 2/2] i2c: designware: Get rid of legacy platform data

On Wed, Mar 31, 2021 at 06:48:51PM +0300, Andy Shevchenko wrote:
> Platform data is a legacy interface to supply device properties
> to the driver. In this case we don't have anymore in-kernel users
> for it. Just remove it for good.
>
> Signed-off-by: Andy Shevchenko <[email protected]>

Acked-by: Wolfram Sang <[email protected]>


Attachments:
(No filename) (357.00 B)
signature.asc (849.00 B)
Download all attachments

2021-04-07 00:34:26

by Jarkko Nikula

[permalink] [raw]
Subject: Re: [PATCH v1 2/2] i2c: designware: Get rid of legacy platform data

On 4/6/21 1:49 PM, Wolfram Sang wrote:
> On Wed, Mar 31, 2021 at 06:48:51PM +0300, Andy Shevchenko wrote:
>> Platform data is a legacy interface to supply device properties
>> to the driver. In this case we don't have anymore in-kernel users
>> for it. Just remove it for good.
>>
>> Signed-off-by: Andy Shevchenko <[email protected]>
>
> Acked-by: Wolfram Sang <[email protected]>
>
Acked-by: Jarkko Nikula <[email protected]>

2021-04-14 14:47:28

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH v1 2/2] i2c: designware: Get rid of legacy platform data


> > > Platform data is a legacy interface to supply device properties
> > > to the driver. In this case we don't have anymore in-kernel users
> > > for it. Just remove it for good.
> > >
> > > Signed-off-by: Andy Shevchenko <[email protected]>
> >
> > Acked-by: Wolfram Sang <[email protected]>
>
> Do you require an immutable branch?

Nope, but thanks for asking.


Attachments:
(No filename) (396.00 B)
signature.asc (849.00 B)
Download all attachments

2021-04-14 21:03:12

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH v1 2/2] i2c: designware: Get rid of legacy platform data

On Tue, 06 Apr 2021, Wolfram Sang wrote:

> On Wed, Mar 31, 2021 at 06:48:51PM +0300, Andy Shevchenko wrote:
> > Platform data is a legacy interface to supply device properties
> > to the driver. In this case we don't have anymore in-kernel users
> > for it. Just remove it for good.
> >
> > Signed-off-by: Andy Shevchenko <[email protected]>
>
> Acked-by: Wolfram Sang <[email protected]>

Do you require an immutable branch?

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

2021-04-14 21:59:40

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH v1 2/2] i2c: designware: Get rid of legacy platform data

On Wed, 31 Mar 2021, Andy Shevchenko wrote:

> Platform data is a legacy interface to supply device properties
> to the driver. In this case we don't have anymore in-kernel users
> for it. Just remove it for good.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
> ---
> drivers/i2c/busses/i2c-designware-platdrv.c | 7 +------
> include/linux/platform_data/i2c-designware.h | 13 -------------
> 2 files changed, 1 insertion(+), 19 deletions(-)
> delete mode 100644 include/linux/platform_data/i2c-designware.h

Applied, thanks.

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog