Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1557624

Re: [PATCH] i2c: core: helper function to detect slave mode

From Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH] i2c: core: helper function to detect slave mode
Date 2017-01-12 18:10 +0100
Message-ID <sYR2V-6Ch-11@gated-at.bofh.it> (permalink)
References (1 earlier) <sWKyC-7RC-33@gated-at.bofh.it> <sWLuH-4T-75@gated-at.bofh.it> <sWMqJ-Iz-15@gated-at.bofh.it> <sWN3r-1cB-3@gated-at.bofh.it> <sWNZv-1OX-3@gated-at.bofh.it>
Organization Intel Finland Oy

Show all headers | View raw


On Sat, 2017-01-07 at 03:24 +0200, Vladimir Zapolskiy wrote:
> On 01/07/2017 02:19 AM, Andy Shevchenko wrote:
> > On Sat, Jan 7, 2017 at 1:43 AM, Vladimir Zapolskiy <vz@mleia.com>
> > wrote:
> > > On 01/07/2017 12:45 AM, Andy Shevchenko wrote:

> > > > +             }
> > > > > > +     } else if (IS_BUILTIN(CONFIG_ACPI) &&
> > > > > > ACPI_HANDLE(dev)) {
> > > > > > +             dev_dbg(dev, "ACPI slave is not supported
> > > > > > yet\n");
> > > > > > +     }
> > > > > 
> > > > > If so, then it might be better to drop else-if stub for now.
> > > > 
> > > > Please, don't.
> > > > 
> > > 
> > > Why do you ask for this stub to be added?
> > 
> > 1. Exactly the reason you asked above. Here is the code which has
> > built differently on different platforms. x86 usually is not using
> > CONFIG_OF, ARM doesn't ACPI (versus ARM64). Check GPIO library for
> > existing examples.
> 
> From the context by the stub I mean dev_dbg() in
> i2c_slave_mode_detect()
> function, I don't see a connection to GPIO library, please clarify.

I agree that is not good proof for using IS_ENABLED/IS_BUILTIN macro.

> > 2. We might add that support later, but here is again, just no-op.
> > 
> > So, what is your strong argument here against that?
> 
> When the support is ready for ACPI case, you'll remove the added
> dev_dbg(), and I don't see a good point by adding it temporarily.

It would remind me to look at it at some point.

> What is wrong with the approach of adding the ACPI case handling
> branch when it is ready and remove any kind of stubs right now?

I will not object. Here is maintainer, let him speak.

> On ACPI platforms the function returns 'false' always, will the
> function work correctly (= corresponding to its description) as is?

Yes.

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] i2c: core: helper function to detect slave mode Luis Oliveira <Luis.Oliveira@synopsys.com> - 2017-01-05 18:30 +0100
  Re: [PATCH] i2c: core: helper function to detect slave mode Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-01-06 17:40 +0100
    Re: [PATCH] i2c: core: helper function to detect slave mode Luis Oliveira <Luis.Oliveira@synopsys.com> - 2017-01-06 18:20 +0100
      Re: [PATCH] i2c: core: helper function to detect slave mode Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-01-06 18:20 +0100
        Re: [PATCH] i2c: core: helper function to detect slave mode Luis Oliveira <Luis.Oliveira@synopsys.com> - 2017-01-06 18:50 +0100
          Re: [PATCH] i2c: core: helper function to detect slave mode Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-01-06 22:40 +0100
  Re: [PATCH] i2c: core: helper function to detect slave mode Rob Herring <robh+dt@kernel.org> - 2017-01-06 17:40 +0100
    Re: [PATCH] i2c: core: helper function to detect slave mode Luis Oliveira <Luis.Oliveira@synopsys.com> - 2017-01-06 18:20 +0100
  Re: [PATCH] i2c: core: helper function to detect slave mode Vladimir Zapolskiy <vz@mleia.com> - 2017-01-06 22:50 +0100
    Re: [PATCH] i2c: core: helper function to detect slave mode Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-01-06 23:50 +0100
      Re: [PATCH] i2c: core: helper function to detect slave mode Vladimir Zapolskiy <vz@mleia.com> - 2017-01-07 00:50 +0100
        Re: [PATCH] i2c: core: helper function to detect slave mode Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-01-07 01:30 +0100
          Re: [PATCH] i2c: core: helper function to detect slave mode Vladimir Zapolskiy <vz@mleia.com> - 2017-01-07 02:30 +0100
            Re: [PATCH] i2c: core: helper function to detect slave mode Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-01-12 18:10 +0100
              Re: [PATCH] i2c: core: helper function to detect slave mode Luis Oliveira <Luis.Oliveira@synopsys.com> - 2017-01-16 11:50 +0100

csiph-web