Re: [PATCH v2] gpio: mockup: Allow probing from device tree

2020-10-29 Thread Bartosz Golaszewski
On Wed, Oct 28, 2020 at 9:24 PM Andy Shevchenko wrote: > > On Wed, Oct 28, 2020 at 8:41 PM Bartosz Golaszewski wrote: > > On Tue, Oct 27, 2020 at 2:54 PM Vincent Whitchurch > > wrote: > > ... > > > > +#include > > > > Please keep the includes ordered alphabetically. > > Besides the fact that

Re: [PATCH v2] gpio: mockup: Allow probing from device tree

2020-10-29 Thread Vincent Whitchurch
On Wed, Oct 28, 2020 at 09:25:32PM +0100, Andy Shevchenko wrote: > On Wed, Oct 28, 2020 at 8:41 PM Bartosz Golaszewski wrote: > > On Tue, Oct 27, 2020 at 2:54 PM Vincent Whitchurch > > > +#ifdef CONFIG_OF > > > +static const struct of_device_id gpio_mockup_of_match[] = { > > > + {

Re: [PATCH v2] gpio: mockup: Allow probing from device tree

2020-10-28 Thread Vincent Whitchurch
On Tue, Oct 27, 2020 at 07:12:13PM +0100, Bartosz Golaszewski wrote: > On Tue, Oct 27, 2020 at 2:54 PM Vincent Whitchurch > wrote: > > diff --git a/drivers/gpio/gpio-mockup.c b/drivers/gpio/gpio-mockup.c > > index 67ed4f238d43..c93892a6936a 100644 > > --- a/drivers/gpio/gpio-mockup.c > > +++

Re: [PATCH v2] gpio: mockup: Allow probing from device tree

2020-10-28 Thread Andy Shevchenko
On Wed, Oct 28, 2020 at 10:00 AM Vincent Whitchurch wrote: > > Allow the mockup driver to be probed via the device tree without any > module parameters, allowing it to be used to configure and test higher > level drivers like the leds-gpio driver and corresponding userspace > before actual

Re: [PATCH v2] gpio: mockup: Allow probing from device tree

2020-10-28 Thread Andy Shevchenko
On Wed, Oct 28, 2020 at 10:25 PM Andy Shevchenko wrote: > On Wed, Oct 28, 2020 at 8:41 PM Bartosz Golaszewski wrote: ... > It's not so. If you drop ugly ifdeffery (and I vote for that, see also It's not so -> It's not so simple. > above) the of_match_ptr() must be dropped as well. >

Re: [PATCH v2] gpio: mockup: Allow probing from device tree

2020-10-28 Thread Andy Shevchenko
On Wed, Oct 28, 2020 at 8:41 PM Bartosz Golaszewski wrote: > On Tue, Oct 27, 2020 at 2:54 PM Vincent Whitchurch > wrote: ... > > +#include > > Please keep the includes ordered alphabetically. Besides the fact that that is a wrong header to be included. mod_devicetable.h is the correct one.

Re: [PATCH v2] gpio: mockup: Allow probing from device tree

2020-10-28 Thread Vincent Whitchurch
On Wed, Oct 28, 2020 at 12:43:22PM +0100, Andy Shevchenko wrote: > On Wed, Oct 28, 2020 at 10:00 AM Vincent Whitchurch > wrote: > > Allow the mockup driver to be probed via the device tree without any > > module parameters, allowing it to be used to configure and test higher > > level drivers

Re: [PATCH v2] gpio: mockup: Allow probing from device tree

2020-10-27 Thread Bartosz Golaszewski
On Tue, Oct 27, 2020 at 2:54 PM Vincent Whitchurch wrote: > > Allow the mockup driver to be probed via the device tree without any > module parameters, allowing it to be used to configure and test higher > level drivers like the leds-gpio driver and corresponding userspace > before actual

[PATCH v2] gpio: mockup: Allow probing from device tree

2020-10-27 Thread Vincent Whitchurch
Allow the mockup driver to be probed via the device tree without any module parameters, allowing it to be used to configure and test higher level drivers like the leds-gpio driver and corresponding userspace before actual hardware is available. Signed-off-by: Vincent Whitchurch --- v2: Remove