[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200527095034.xd52qv45nzcnkbnz@mobilestation>
Date: Wed, 27 May 2020 12:50:34 +0300
From: Serge Semin <Sergey.Semin@...kalelectronics.ru>
To: Andy Shevchenko <andy.shevchenko@...il.com>
CC: Serge Semin <fancer.lancer@...il.com>,
Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
Wolfram Sang <wsa@...-dreams.de>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Alexey Malahov <Alexey.Malahov@...kalelectronics.ru>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Rob Herring <robh+dt@...nel.org>, <linux-mips@...r.kernel.org>,
devicetree <devicetree@...r.kernel.org>,
linux-i2c <linux-i2c@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 11/12] i2c: designware: Move reg-space remapping into
a dedicated function
On Wed, May 27, 2020 at 12:26:09PM +0300, Andy Shevchenko wrote:
> On Wed, May 27, 2020 at 4:03 AM Serge Semin
> <Sergey.Semin@...kalelectronics.ru> wrote:
> >
> > This is a preparation patch before adding a quirk with custom registers
> > map creation required for the Baikal-T1 System I2C support. Since we've
> > touched this code anyway let's replace
> > platform_get_resource()-devm_ioremap_resource() tuple with ready-to-use
> > helper devm_platform_get_and_ioremap_resource().
>
> ...
>
> > +static int dw_i2c_plat_request_regs(struct dw_i2c_dev *dev)
> > +{
> > + struct platform_device *pdev = to_platform_device(dev->dev);
>
> > + int ret = 0;
>
> Redundant.
>
> > + dev->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
>
> What's the point of this API if you don't use resource parameter?
>
> > + if (IS_ERR(dev->base))
> > + ret = PTR_ERR(dev->base);
> > +
> > + return ret;
>
> return PTR_ERR_OR_ZERO(dev->base);
>
> > +}
>
> > - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > - dev->base = devm_ioremap_resource(&pdev->dev, mem);
> > - if (IS_ERR(dev->base))
> > - return PTR_ERR(dev->base);
>
> Wolfram, did my last series make your tree? I think there was a patch
> that touched this part...
Right. It is there. I'll rebase the series on top of the i2c/for-next branch.
-Serge
>
> --
> With Best Regards,
> Andy Shevchenko
Powered by blists - more mailing lists