lkml.org 
[lkml]   [2020]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 09/10] power: supply: Support ROHM bd99954 charger
On Wed, Mar 25, 2020 at 10:14:35AM +0000, Vaittinen, Matti wrote:
> On Tue, 2020-03-24 at 13:56 +0200, andriy.shevchenko@linux.intel.com
> wrote:
> > On Tue, Mar 24, 2020 at 10:53:09AM +0000, Vaittinen, Matti wrote:
> > > On Tue, 2020-03-24 at 11:50 +0200, Andy Shevchenko wrote:
> > > > On Tue, Mar 24, 2020 at 10:32:19AM +0200, Matti Vaittinen wrote:

...

> > > > > + if (!dev->platform_data) {
> > > >
> > > > dev_get_platdata()
> > > >
> > > > > + ret = bd9995x_fw_probe(bd);
> > > > > + if (ret < 0) {
> > > > > + dev_err(dev, "Cannot read device
> > > > > properties.\n");
> > > > > + return ret;
> > > > > + }
> > > > > + } else {
> > > > > + return -ENODEV;
> > > >
> > > > So, existing platform data leads to an error?!
> > >
> > > Yes. As currently we only use DT. If someone needs platdata they
> > > need
> > > to improve the driver
> >
> > I think the idea to avoid platform data in new code as much as
> > possible.
> > And it's unusual to have somebody to use this driver with
> > platform_data set.
> > Why not simple ignore it?
>
> Because if someone _is_ using platform data here (and we still provide
> this mechanism) - then we should inform him that he's doing something
> which is not correct.

Up to maintainer, but once more time to put an accent that above is quite
unusual practice in Linux kernel.

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2020-03-25 13:06    [W:0.180 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site