[RESEND PATCH v3 5/8] misc: sram: use devm_platform_ioremap_resource_wc()

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the new devm_platform_ioremap_resource_wc() helper instead of devm_ioremap_wc() combinded with a call to platform_get_resource(). Also use devm_platform_ioremap_resource() where applicable. Signed-off-by: Bartosz Golaszewski Reviewed-by: Arnd Bergmann

[RESEND PATCH v3 3/8] lib: devres: provide devm_ioremap_resource_wc()

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Provide a variant of devm_ioremap_resource() for write-combined ioremap. Signed-off-by: Bartosz Golaszewski Reviewed-by: Arnd Bergmann --- Documentation/driver-api/driver-model/devres.rst | 1 + include/linux/device.h | 2 ++ lib/devres.c

[RESEND PATCH v3 4/8] drivers: platform: provide devm_platform_ioremap_resource_wc()

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Provide a write-combined variant of devm_platform_ioremap_resource(). Signed-off-by: Bartosz Golaszewski Reviewed-by: Arnd Bergmann --- .../driver-api/driver-model/devres.rst| 1 + drivers/base/platform.c | 19

[RESEND PATCH v3 8/8] gpio: tegra186: use devm_platform_ioremap_resource_byname()

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Bartosz Golaszewski Reviewed-by: Arnd Bergmann --- drivers/gpio/gpio-tegra186.c | 4 +--- 1 file changed

[RESEND PATCH v3 7/8] gpio: mvebu: use devm_platform_ioremap_resource_byname()

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use devm_platform_ioremap_resource_byname() instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Bartosz Golaszewski Reviewed-by: Arnd Bergmann --- drivers/gpio/gpio-mvebu.c | 19 +++ 1 file changed

[RESEND PATCH v3 1/8] Documentation: devres: add missing entry for devm_platform_ioremap_resource()

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski devm_platform_ioremap_resource() should be documented in devres.rst. Add the missing entry. Signed-off-by: Bartosz Golaszewski Reviewed-by: Arnd Bergmann --- Documentation/driver-api/driver-model/devres.rst | 1 + 1 file changed, 1 insertion(+) diff --git a

[RESEND PATCH v3 6/8] drivers: provide devm_platform_ioremap_resource_byname()

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Provide a variant of devm_platform_ioremap_resource() that allows to lookup resources from platform devices by name rather than by index. Signed-off-by: Bartosz Golaszewski Reviewed-by: Arnd Bergmann --- .../driver-api/driver-model/devres.rst| 1 + drivers

[RESEND PATCH v3 0/8] drivers: add new variants of devm_platform_ioremap_resource()

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Note: resending with Arnd's review tags and rebased on top of char-misc-next The new devm_platform_ioremap_resource() helper has now been widely adopted and used in many drivers. Users of the write-combined ioremap() variants could benefit from the same code shri

[RESEND PATCH v3 2/8] lib: devres: prepare devm_ioremap_resource() for more variants

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski We want to add the write-combined variant of devm_ioremap_resource(). Let's first implement __devm_ioremap_resource() which takes an additional argument type. The types are the same as for __devm_ioremap(). The existing devm_ioremap_resource() now simply

Re: [PATCH v3 0/8] drivers: add new variants of devm_platform_ioremap_resource()

2019-10-21 Thread Bartosz Golaszewski
pon., 21 paź 2019 o 17:53 Arnd Bergmann napisał(a): > > On Mon, Oct 21, 2019 at 5:04 PM Bartosz Golaszewski wrote: > > niedz., 6 paź 2019 o 07:39 Bartosz Golaszewski napisał(a): > > > From: Bartosz Golaszewski > > > Bartosz Golaszewski (8): > > > Docum

Re: [PATCH v3 0/8] drivers: add new variants of devm_platform_ioremap_resource()

2019-10-21 Thread Bartosz Golaszewski
niedz., 6 paź 2019 o 07:39 Bartosz Golaszewski napisał(a): > > From: Bartosz Golaszewski > > The new devm_platform_ioremap_resource() helper has now been widely > adopted and used in many drivers. Users of the write-combined ioremap() > variants could benefit from the same co

Re: [PATCH v2 0/5] drivers: add a new variant of devm_platform_ioremap_resource()

2019-10-05 Thread Bartosz Golaszewski
śr., 2 paź 2019 o 18:25 Bartosz Golaszewski napisał(a): > > From: Bartosz Golaszewski > > The new devm_platform_ioremap_resource() helper has now been widely > adopted and used in many drivers. Users of the write-combined ioremap() > variants could benefit from the same co

[PATCH v3 8/8] gpio: tegra186: use devm_platform_ioremap_resource_byname()

2019-10-05 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Bartosz Golaszewski --- drivers/gpio/gpio-tegra186.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions

[PATCH v3 6/8] drivers: provide devm_platform_ioremap_resource_byname()

2019-10-05 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Provide a variant of devm_platform_ioremap_resource() that allows to lookup resources from platform devices by name rather than by index. Signed-off-by: Bartosz Golaszewski --- .../driver-api/driver-model/devres.rst| 1 + drivers/base/platform.c

[PATCH v3 2/8] lib: devres: prepare devm_ioremap_resource() for more variants

2019-10-05 Thread Bartosz Golaszewski
From: Bartosz Golaszewski We want to add the write-combined variant of devm_ioremap_resource(). Let's first implement __devm_ioremap_resource() which takes an additional argument type. The types are the same as for __devm_ioremap(). The existing devm_ioremap_resource() now simply

[PATCH v3 1/8] Documentation: devres: add missing entry for devm_platform_ioremap_resource()

2019-10-05 Thread Bartosz Golaszewski
From: Bartosz Golaszewski devm_platform_ioremap_resource() should be documented in devres.rst. Add the missing entry. Signed-off-by: Bartosz Golaszewski --- Documentation/driver-api/driver-model/devres.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/driver-api/driver

[PATCH v3 5/8] misc: sram: use devm_platform_ioremap_resource_wc()

2019-10-05 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the new devm_platform_ioremap_resource_wc() helper instead of devm_ioremap_wc() combinded with a call to platform_get_resource(). Also use devm_platform_ioremap_resource() where applicable. Signed-off-by: Bartosz Golaszewski --- drivers/misc/sram.c | 28

[PATCH v3 7/8] gpio: mvebu: use devm_platform_ioremap_resource_byname()

2019-10-05 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use devm_platform_ioremap_resource_byname() instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Bartosz Golaszewski --- drivers/gpio/gpio-mvebu.c | 19 +++ 1 file changed, 7 insertions(+), 12

[PATCH v3 0/8] drivers: add new variants of devm_platform_ioremap_resource()

2019-10-05 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The new devm_platform_ioremap_resource() helper has now been widely adopted and used in many drivers. Users of the write-combined ioremap() variants could benefit from the same code shrinkage. This series provides a write-combined version of

[PATCH v3 3/8] lib: devres: provide devm_ioremap_resource_wc()

2019-10-05 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Provide a variant of devm_ioremap_resource() for write-combined ioremap. Signed-off-by: Bartosz Golaszewski --- Documentation/driver-api/driver-model/devres.rst | 1 + include/linux/device.h | 2 ++ lib/devres.c

[PATCH v3 4/8] drivers: platform: provide devm_platform_ioremap_resource_wc()

2019-10-05 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Provide a write-combined variant of devm_platform_ioremap_resource(). Signed-off-by: Bartosz Golaszewski --- .../driver-api/driver-model/devres.rst| 1 + drivers/base/platform.c | 19 ++- include/linux/platform_device.h

Re: [PATCH] Documentation: gpio: driver: Format code blocks properly

2019-10-03 Thread Bartosz Golaszewski
śr., 2 paź 2019 o 16:41 Jonathan Neuschäfer napisał(a): > > This fixes a lot of Sphinx warnings, and makes the code blocks look nice > in HTML. > > Signed-off-by: Jonathan Neuschäfer > --- > Documentation/driver-api/gpio/driver.rst | 4 > 1 file changed, 4 insertions(+) > > diff --git a/Doc

Re: [PATCH 1/3] docs: fix some broken references

2019-10-03 Thread Bartosz Golaszewski
fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c > index 2e9c7f493f99..811f510578cb 100644 > --- a/fs/cifs/cifsfs.c > +++ b/fs/cifs/cifsfs.c > @@ -1529,7 +1529,7 @@ init_cifs(void) > /* > * Consider in future setting limit!=0 maybe to min(num_of_cores - 1, > 3) > * so that we don't launch too many worker threads but > -* Documentation/workqueue.txt recommends setting it to 0 > +* Documentation/core-api/workqueue.rst recommends setting it to 0 > */ > > /* WQ_UNBOUND allows decrypt tasks to run on any CPU */ > -- > 2.21.0 > For GPIO: Acked-by: Bartosz Golaszewski

[PATCH v2 2/5] lib: devres: prepare devm_ioremap_resource() for more variants

2019-10-02 Thread Bartosz Golaszewski
From: Bartosz Golaszewski We want to add the write-combined variant of devm_ioremap_resource(). Let's first implement __devm_ioremap_resource() which takes an additional argument type. The types are the same as for __devm_ioremap(). The existing devm_ioremap_resource() now simply

[PATCH v2 5/5] misc: sram: use devm_platform_ioremap_resource_wc()

2019-10-02 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the new devm_platform_ioremap_resource_wc() helper instead of devm_ioremap_wc() combinded with a call to platform_get_resource(). Also use devm_platform_ioremap_resource() where applicable. Signed-off-by: Bartosz Golaszewski --- drivers/misc/sram.c | 28

[PATCH v2 4/5] drivers: platform: provide devm_platform_ioremap_resource_wc()

2019-10-02 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Provide a write-combined variant of devm_platform_ioremap_resource(). While at it: in order not to duplicate code - pass the resource retrieved by platform_get_resource() directly to the appropriate devm_ioremap_resource() variant. Signed-off-by: Bartosz Golaszewski

[PATCH v2 3/5] lib: devres: provide devm_ioremap_resource_wc()

2019-10-02 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Provide a variant of devm_ioremap_resource() for write-combined ioremap. Signed-off-by: Bartosz Golaszewski --- Documentation/driver-api/driver-model/devres.rst | 1 + include/linux/device.h | 2 ++ lib/devres.c

[PATCH v2 0/5] drivers: add a new variant of devm_platform_ioremap_resource()

2019-10-02 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The new devm_platform_ioremap_resource() helper has now been widely adopted and used in many drivers. Users of the write-combined ioremap() variants could benefit from the same code shrinkage. This series provides a write-combined version of

[PATCH v2 1/5] Documentation: devres: add missing entry for devm_platform_ioremap_resource()

2019-10-02 Thread Bartosz Golaszewski
From: Bartosz Golaszewski devm_platform_ioremap_resource() should be documented in devres.rst. Add the missing entry. Signed-off-by: Bartosz Golaszewski --- Documentation/driver-api/driver-model/devres.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/driver-api/driver

[PATCH 0/9] drivers: add new variants of devm_platform_ioremap_resource()

2019-08-29 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The new devm_platform_ioremap_resource() helper has now been widely adopted and used in many drivers. Users of nocache and write-combined ioremap() variants could profit from the same code shrinkage. This series provides two new versions of

[PATCH 1/9] Documentation: devres: add missing entry for devm_platform_ioremap_resource()

2019-08-29 Thread Bartosz Golaszewski
From: Bartosz Golaszewski devm_platform_ioremap_resource() should be documented in devres.rst. Add the missing entry. Signed-off-by: Bartosz Golaszewski --- Documentation/driver-api/driver-model/devres.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/driver-api/driver

[PATCH 4/9] drivers: provide new variants of devm_platform_ioremap_resource()

2019-08-29 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Provide two new variants of devm_platform_ioremap_resource() - one for nocache and one for write-combined ioremap. Move the core functionality into a separate static function - __devm_platform_ioremap_resource() - that takes an additional type argument. Signed-off-by

[PATCH 5/9] gpio: em: use devm_platform_ioremap_resource_nocache()

2019-08-29 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the new devm_platform_ioremap_resource_nocache() helper for memory range mapping instead of devm_ioremap_nocache() combined with a call to platform_get_resource(). Signed-off-by: Bartosz Golaszewski --- drivers/gpio/gpio-em.c | 22 +- 1 file

[PATCH 6/9] gpio: ath79: use devm_platform_ioremap_resource_nocache()

2019-08-29 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the new devm_platform_ioremap_resource_nocache() helper for memory range mapping instead of devm_ioremap_nocache() combined with a call to platform_get_resource(). Signed-off-by: Bartosz Golaszewski --- drivers/gpio/gpio-ath79.c | 10 +++--- 1 file changed, 3

[PATCH 7/9] gpio: htc-egpio: use devm_platform_ioremap_resource_nocache()

2019-08-29 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the new devm_platform_ioremap_resource_nocache() helper for memory range mapping instead of devm_ioremap_nocache() combined with a call to platform_get_resource(). Signed-off-by: Bartosz Golaszewski --- drivers/gpio/gpio-htc-egpio.c | 13 ++--- 1 file

[PATCH 3/9] lib: devres: provide new variants for devm_ioremap_resource()

2019-08-29 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Provide two new variants of devm_ioremap_resource() - one for nocache and one for write-combined ioremap. Signed-off-by: Bartosz Golaszewski --- .../driver-api/driver-model/devres.rst| 2 ++ include/linux/device.h| 4 +++ lib

[PATCH 8/9] gpio: xgene: use devm_platform_ioremap_resource_nocache()

2019-08-29 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the new devm_platform_ioremap_resource_nocache() helper for memory range mapping instead of devm_ioremap_nocache() combined with a call to platform_get_resource(). Signed-off-by: Bartosz Golaszewski --- drivers/gpio/gpio-xgene.c | 14 +++--- 1 file

[PATCH 9/9] misc: sram: use devm_platform_ioremap_resource_wc()

2019-08-29 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the new devm_platform_ioremap_resource_wc() helper instead of devm_ioremap_wc() combinded with a call to platform_get_resource(). Also use devm_platform_ioremap_resource() where applicable. Signed-off-by: Bartosz Golaszewski --- drivers/misc/sram.c | 28

[PATCH 2/9] lib: devres: prepare devm_ioremap_resource() for more variants

2019-08-29 Thread Bartosz Golaszewski
From: Bartosz Golaszewski We want to add the nocache and write-combined variants of devm_ioremap_resource(). Let's first implement __devm_ioremap_resource() which takes an additional argument type. The types are the same as for __devm_ioremap(). The existing devm_ioremap_resource() now s

Re: [PATCH v2] Documentation: gpio: fix function links in the HTML docs

2019-07-30 Thread Bartosz Golaszewski
pon., 29 lip 2019 o 16:37 Jeremy Cline napisał(a): > > The shorthand [_data] and [devm_] cause the HTML documentation to not > link to the function documentation properly. This expands the references > to the complete function names with the exception of > devm_gpiochip_remove() which was dropped

Re: [PATCH] Documentation: gpio: driver: fix wire name for I2C

2019-01-17 Thread Bartosz Golaszewski
czw., 17 sty 2019 o 11:24 Geert Uytterhoeven napisał(a): > > On Thu, Jan 17, 2019 at 11:14 AM Wolfram Sang > wrote: > > Typo: the data line is called "SDA" not "SCA". > > > > Signed-off-by: Wolfram Sang > > Reviewed-by: Geert Uytterhoeven > Applied to for-next, thanks! Bart

Re: [PATCH v2 00/29] at24: remove at24_platform_data

2018-10-04 Thread Bartosz Golaszewski
śr., 3 paź 2018 o 23:04 Florian Fainelli napisał(a): > > > > On 10/3/2018 1:15 PM, Bartosz Golaszewski wrote: > > pt., 31 sie 2018 o 21:46 Brian Norris > > napisał(a): > >> > >> Hi, > >> > >> On Fri, Aug 10, 2018 at 10:04:57AM +0200,

Re: [PATCH v2 00/29] at24: remove at24_platform_data

2018-10-03 Thread Bartosz Golaszewski
pt., 31 sie 2018 o 21:46 Brian Norris napisał(a): > > Hi, > > On Fri, Aug 10, 2018 at 10:04:57AM +0200, Bartosz Golaszewski wrote: > > Most boards use the EEPROM to store the MAC address. This series adds > > support for cell lookups to the nvmem framework, registers re

[PATCH v2] nvmem: fix nvmem_cell_get_from_lookup()

2018-10-02 Thread Bartosz Golaszewski
From: Bartosz Golaszewski We check if the pointer returned by __nvmem_device_get() is not NULL while we should actually check if it is not IS_ERR(nvmem). Fix it. While we're at it: fix the next error path where we should assign an error value to cell before returning. Signed-off-by: Ba

Re: [PATCH] nvmem: fix nvmem_cell_get_from_lookup()

2018-10-02 Thread Bartosz Golaszewski
wt., 2 paź 2018 o 11:42 Bartosz Golaszewski napisał(a): > > From: Bartosz Golaszewski > > We check if the pointer returned by __nvmem_device_get() is not NULL > while we should actually check if it is not IS_ERR(nvmem). Fix it. > > While we're at it: fix the next

[PATCH] nvmem: fix nvmem_cell_get_from_lookup()

2018-10-02 Thread Bartosz Golaszewski
From: Bartosz Golaszewski We check if the pointer returned by __nvmem_device_get() is not NULL while we should actually check if it is not IS_ERR(nvmem). Fix it. While we're at it: fix the next error path where we should assign an error value to cell before returning. Signed-off-by: Ba

Re: [PATCH] nvmem: fix nvmem_cell_get_from_lookup()

2018-10-01 Thread Bartosz Golaszewski
pon., 1 paź 2018 o 18:03 David Lechner napisał(a): > > On 10/01/2018 05:00 AM, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > We check if the pointer returned by __nvmem_device_get() is not NULL > > while we should actually check if i

[PATCH] nvmem: fix nvmem_cell_get_from_lookup()

2018-10-01 Thread Bartosz Golaszewski
From: Bartosz Golaszewski We check if the pointer returned by __nvmem_device_get() is not NULL while we should actually check if it is not IS_ERR(nvmem). Fix it. While we're at it: fix the next error path where we should assign an error value to cell before returning. Signed-off-by: Ba

Re: [PATCH v2] gpiolib: add hogs support for machine code

2018-04-26 Thread Bartosz Golaszewski
2018-04-26 14:07 GMT+02:00 Linus Walleij : > On Tue, Apr 10, 2018 at 10:30 PM, Bartosz Golaszewski wrote: > >> Board files constitute a significant part of the users of the legacy >> GPIO framework. In many cases they only export a line and set its >> desired value. We

Re: [PATCH] gpiolib: add hogs support for machine code

2018-04-10 Thread Bartosz Golaszewski
te to > help improve the system] > > url: > https://github.com/0day-ci/linux/commits/Bartosz-Golaszewski/gpiolib-add-hogs-support-for-machine-code/20180410-232047 > base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git > for-next > config: i386

[PATCH v2] gpiolib: add hogs support for machine code

2018-04-10 Thread Bartosz Golaszewski
d the machine.h API with support for registering hog tables in board files. Signed-off-by: Bartosz Golaszewski --- v1 -> v2: - kbuild bot complains about enum gpiod_flags having incomplete type although it builds fine for me locally: change the type of dflags to int Documentation/driver-

[PATCH] gpiolib: add hogs support for machine code

2018-04-10 Thread Bartosz Golaszewski
d the machine.h API with support for registering hog tables in board files. Signed-off-by: Bartosz Golaszewski --- Documentation/driver-api/gpio/board.rst | 16 ++ drivers/gpio/gpiolib.c | 67 + include/linux/gpio/machine.h| 31 3

[PATCH v4 1/3] irq/irq_sim: add a simple interrupt simulator framework

2017-08-14 Thread Bartosz Golaszewski
struct. Signed-off-by: Bartosz Golaszewski Reviewed-by: Jonathan Cameron --- include/linux/irq_sim.h | 44 ++ kernel/irq/Kconfig | 5 ++ kernel/irq/Makefile | 1 + kernel/irq/irq_sim.c| 121 4 files changed, 171

[PATCH v4 0/3] simulated interrupts

2017-08-14 Thread Bartosz Golaszewski
ity in the gpio-mockup testing driver. NOTE: The next candidate for using this API would be iio-dummy-evgen. v1 -> v2: - added a call to irq_work_sync in irq_sim_fini() v2 -> v3: - added the license header to new files - added Acked-by's and Reviewed-by's v3 -> v4: - moved the .

[PATCH v4 3/3] gpio: mockup: use irq_sim

2017-08-14 Thread Bartosz Golaszewski
Shrink the driver by removing the code dealing with dummy interrupts and replacing it with calls to the irq_sim API. Signed-off-by: Bartosz Golaszewski Acked-by: Jonathan Cameron Reviewed-by: Linus Walleij --- drivers/gpio/Kconfig | 2 +- drivers/gpio/gpio-mockup.c | 77

[PATCH v4 2/3] irq/irq_sim: add a devres variant of irq_sim_init()

2017-08-14 Thread Bartosz Golaszewski
Add a resource managed version of irq_sim_init(). This can be conveniently used in device drivers. Signed-off-by: Bartosz Golaszewski Acked-by: Jonathan Cameron --- Documentation/driver-model/devres.txt | 1 + include/linux/irq_sim.h | 4 kernel/irq/irq_sim.c

Re: [PATCH v3 1/3] irq/irq_sim: add a simple interrupt simulator framework

2017-08-14 Thread Bartosz Golaszewski
2017-08-14 16:48 GMT+02:00 Thomas Gleixner : > On Mon, 14 Aug 2017, Bartosz Golaszewski wrote: >> 2017-08-14 15:06 GMT+02:00 Thomas Gleixner : >> > On Mon, 14 Aug 2017, Bartosz Golaszewski wrote: >> > >> >> Implement a simple, irq_work-based framework for sim

Re: [PATCH v3 1/3] irq/irq_sim: add a simple interrupt simulator framework

2017-08-14 Thread Bartosz Golaszewski
2017-08-14 15:06 GMT+02:00 Thomas Gleixner : > On Mon, 14 Aug 2017, Bartosz Golaszewski wrote: > >> Implement a simple, irq_work-based framework for simulating >> interrupts. Currently the API exposes routines for initializing and >> deinitializing the simulator object, e

[PATCH v3 1/3] irq/irq_sim: add a simple interrupt simulator framework

2017-08-14 Thread Bartosz Golaszewski
struct. Signed-off-by: Bartosz Golaszewski Reviewed-by: Jonathan Cameron --- include/linux/irq_sim.h | 44 ++ init/Kconfig| 4 ++ kernel/Makefile | 1 + kernel/irq_sim.c| 121 4 files changed, 170

[PATCH v3 0/3] simulated interrupts

2017-08-14 Thread Bartosz Golaszewski
ity in the gpio-mockup testing driver. NOTE: The next candidate for using this API would be iio-dummy-evgen. v1 -> v2: - added a call to irq_work_sync in irq_sim_fini() v2 -> v3: - added the license header to new files - added Acked-by's and Reviewed-by's Bartosz Golaszewski (3):

[PATCH v3 3/3] gpio: mockup: use irq_sim

2017-08-14 Thread Bartosz Golaszewski
Shrink the driver by removing the code dealing with dummy interrupts and replacing it with calls to the irq_sim API. Signed-off-by: Bartosz Golaszewski Acked-by: Jonathan Cameron Reviewed-by: Linus Walleij --- drivers/gpio/Kconfig | 2 +- drivers/gpio/gpio-mockup.c | 77

[PATCH v3 2/3] irq/irq_sim: add a devres variant of irq_sim_init()

2017-08-14 Thread Bartosz Golaszewski
Add a resource managed version of irq_sim_init(). This can be conveniently used in device drivers. Signed-off-by: Bartosz Golaszewski Acked-by: Jonathan Cameron --- Documentation/driver-model/devres.txt | 1 + include/linux/irq_sim.h | 4 kernel/irq_sim.c

Re: [PATCH v2 1/3] irq/irq_sim: add a simple interrupt simulator framework

2017-08-14 Thread Bartosz Golaszewski
2017-08-12 13:43 GMT+02:00 Jonathan Cameron : > On Tue, 1 Aug 2017 16:50:26 +0200 > Bartosz Golaszewski wrote: > >> Implement a simple, irq_work-based framework for simulating >> interrupts. Currently the API exposes routines for initializing and >> deinitia

[PATCH v2 2/3] irq/irq_sim: add a devres variant of irq_sim_init()

2017-08-01 Thread Bartosz Golaszewski
Add a resource managed version of irq_sim_init(). This can be conveniently used in device drivers. Signed-off-by: Bartosz Golaszewski --- Documentation/driver-model/devres.txt | 1 + include/linux/irq_sim.h | 4 kernel/irq_sim.c | 43

[PATCH v2 3/3] gpio: mockup: use irq_sim

2017-08-01 Thread Bartosz Golaszewski
Shrink the driver by removing the code dealing with dummy interrupts and replacing it with calls to the irq_sim API. Signed-off-by: Bartosz Golaszewski --- drivers/gpio/Kconfig | 2 +- drivers/gpio/gpio-mockup.c | 77 +- 2 files changed, 8

[PATCH v2 0/3] simulated interrupts

2017-08-01 Thread Bartosz Golaszewski
ity in the gpio-mockup testing driver. NOTE: The next candidate for using this API would be iio-dummy-evgen. v1 -> v2: - added a call to irq_work_sync in irq_sim_fini() Bartosz Golaszewski (3): irq/irq_sim: add a simple interrupt simulator framework irq/irq_sim: add a devres variant of

[PATCH v2 1/3] irq/irq_sim: add a simple interrupt simulator framework

2017-08-01 Thread Bartosz Golaszewski
struct. Signed-off-by: Bartosz Golaszewski --- include/linux/irq_sim.h | 37 +++ init/Kconfig| 4 ++ kernel/Makefile | 1 + kernel/irq_sim.c| 119 4 files changed, 161 insertions(+) create mode 100644

Re: [PATCH 1/3] irq/irq_sim: add a simple interrupt simulator framework

2017-07-23 Thread Bartosz Golaszewski
2017-07-22 22:59 GMT+02:00 Jonathan Cameron : >> + >> +/** >> + * irq_sim_fire - Enqueue an interrupt. >> + * >> + * @sim:The interrupt simulator object. >> + * @offset: Offset of the simulated interrupt which should be fired. >> + */ >> +void irq_sim_fire(struct irq_sim *sim, unsigned

Re: [PATCH 0/3] simulated interrupts

2017-07-19 Thread Bartosz Golaszewski
2017-07-19 14:25 GMT+02:00 Thomas Gleixner : > On Wed, 19 Jul 2017, Bartosz Golaszewski wrote: > >> Some frameworks (e.g. iio, gpiolib) use irq_work to implement simulated >> interrupts that can be 'fired' from process context when needed and >> requested ju

[PATCH 1/3] irq/irq_sim: add a simple interrupt simulator framework

2017-07-19 Thread Bartosz Golaszewski
struct. Signed-off-by: Bartosz Golaszewski --- include/linux/irq_sim.h | 37 +++ init/Kconfig| 4 ++ kernel/Makefile | 1 + kernel/irq_sim.c| 118 4 files changed, 160 insertions(+) create mode 100644

[PATCH 3/3] gpio: mockup: use irq_sim

2017-07-19 Thread Bartosz Golaszewski
Shrink the driver by removing the code dealing with dummy interrupts and replacing it with calls to the irq_sim API. Signed-off-by: Bartosz Golaszewski --- drivers/gpio/Kconfig | 2 +- drivers/gpio/gpio-mockup.c | 77 +- 2 files changed, 8

[PATCH 2/3] irq/irq_sim: add a devres variant of irq_sim_init()

2017-07-19 Thread Bartosz Golaszewski
Add a resource managed version of irq_sim_init(). This can be conveniently used in device drivers. Signed-off-by: Bartosz Golaszewski --- Documentation/driver-model/devres.txt | 1 + include/linux/irq_sim.h | 4 kernel/irq_sim.c | 43

[PATCH 0/3] simulated interrupts

2017-07-19 Thread Bartosz Golaszewski
ity in the gpio-mockup testing driver. NOTE: The next candidate for using this API would be iio-dummy-evgen. Bartosz Golaszewski (3): irq/irq_sim: add a simple interrupt simulator framework irq/irq_sim: add a devres variant of irq_sim_init() gpio: mockup: use irq_sim Documentation/dr

Re: [PATCH 0/5] irq: generic-chip: resource management improvements

2017-06-21 Thread Bartosz Golaszewski
2017-06-20 16:14 GMT+02:00 Thomas Gleixner : > On Tue, 20 Jun 2017, Bartosz Golaszewski wrote: >> 2017-06-20 12:41 GMT+02:00 Marc Zyngier : >> > There was a kbuild report from June 1st with worrying warnings on x86_64 >> > (though I couldn't see how that was r

Re: [PATCH 0/5] irq: generic-chip: resource management improvements

2017-06-20 Thread Bartosz Golaszewski
2017-06-20 12:41 GMT+02:00 Marc Zyngier : > On 20/06/17 11:31, Bartosz Golaszewski wrote: >> 2017-05-31 18:06 GMT+02:00 Bartosz Golaszewski : >>> This series is a follow-up to [1]. >>> >>> Some users of irq_alloc_generic_chip() are modules which can be >&g

Re: [PATCH 0/5] irq: generic-chip: resource management improvements

2017-06-20 Thread Bartosz Golaszewski
2017-05-31 18:06 GMT+02:00 Bartosz Golaszewski : > This series is a follow-up to [1]. > > Some users of irq_alloc_generic_chip() are modules which can be > removed (e.g. gpio-ml-ioh) but have no means of freeing the allocated > generic chip. > > Last time it was

[PATCH 1/5] irq: generic-chip: provide irq_free_generic_chip()

2017-05-31 Thread Bartosz Golaszewski
ff-by: Bartosz Golaszewski --- include/linux/irq.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/irq.h b/include/linux/irq.h index f887351..cba41a4 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -22,6 +22,7 @@ #include #include #include +#include #in

[PATCH 0/5] irq: generic-chip: resource management improvements

2017-05-31 Thread Bartosz Golaszewski
irq_alloc_generic_chip() & irq_setup_generic_chip(). They will be used in drivers where applicable. Device resources are released in reverse order so it's ok to call devm_irq_alloc_generic_chip() and then devm_irq_setup_generic_chip(). [1] https://lkml.org/lkml/2017/3/8/550 Bartosz Golaszewski (

[PATCH 3/5] irq: generic-chip: export irq_init_generic_chip() locally

2017-05-31 Thread Bartosz Golaszewski
This function will be used in the devres variant of irq_alloc_generic_chip(). Signed-off-by: Bartosz Golaszewski --- kernel/irq/generic-chip.c | 7 +++ kernel/irq/internals.h| 11 +++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/kernel/irq/generic-chip.c b

[PATCH 4/5] irq: generic-chip: provide devm_irq_alloc_generic_chip()

2017-05-31 Thread Bartosz Golaszewski
Provide a resource managed variant of irq_alloc_generic_chip(). Signed-off-by: Bartosz Golaszewski --- Documentation/driver-model/devres.txt | 1 + include/linux/irq.h | 5 + kernel/irq/devres.c | 34 ++ 3 files changed

[PATCH 5/5] irq: generic-chip: provide devm_irq_setup_generic_chip()

2017-05-31 Thread Bartosz Golaszewski
Provide a resource managed variant of irq_setup_generic_chip(). Signed-off-by: Bartosz Golaszewski --- Documentation/driver-model/devres.txt | 1 + include/linux/irq.h | 3 ++ kernel/irq/devres.c | 52 +++ 3 files changed, 56

[PATCH 2/5] irq: generic-chip: provide irq_destroy_generic_chip()

2017-05-31 Thread Bartosz Golaszewski
Most users of irq_alloc_generic_chip() call irq_setup_generic_chip() too. To simplify the cleanup provide a function that both removes a generic chip and frees its memory. Signed-off-by: Bartosz Golaszewski --- include/linux/irq.h | 8 1 file changed, 8 insertions(+) diff --git a

[PATCH v2] irqdesc: add a resource managed version of irq_alloc_descs()

2017-02-10 Thread Bartosz Golaszewski
Add a devres flavor of __devm_irq_alloc_descs() and corresponding helper macros. Signed-off-by: Bartosz Golaszewski --- v1 -> v2: - added kernel docs for the new function - made the from and cnt fields of struct irq_desc_devres unsigned integers as this is what irq_free_descs() expe

[PATCH] irqdesc: add memory managed version of irq_alloc_descs()

2017-02-07 Thread Bartosz Golaszewski
Add a devres flavor of __devm_irq_alloc_descs() and corresponding helper macros. Signed-off-by: Bartosz Golaszewski --- I initially sent this patch as part of the series extending the GPIO testing driver, but as suggested by Linus - I used the non-managed version for now and am sending this