[PATCH v2 3/8] vhost: vringh: use krealloc_array()

2020-11-03 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski Acked-by: Michael S. Tsirkin --- drivers/vhost/vringh.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH v2 5/8] edac: ghes: use krealloc_array()

2020-11-03 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski Acked-by: Borislav Petkov --- drivers/edac/ghes_edac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v2 1/8] mm: slab: provide krealloc_array()

2020-11-03 Thread Bartosz Golaszewski
From: Bartosz Golaszewski When allocating an array of elements, users should check for multiplication overflow or preferably use one of the provided helpers like: kmalloc_array(). There's no krealloc_array() counterpart but there are many users who use regular krealloc() to reallocate a

[PATCH v2 0/8] slab: provide and use krealloc_array()

2020-11-03 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Andy brought to my attention the fact that users allocating an array of equally sized elements should check if the size multiplication doesn't overflow. This is why we have helpers like kmalloc_array(). However we don't have krealloc_array() equivalent and

[PATCH v2 7/8] hwtracing: intel: use krealloc_array()

2020-11-03 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski --- drivers/hwtracing/intel_th/msu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH v2 4/8] pinctrl: use krealloc_array()

2020-11-03 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/pinctrl-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v2 2/8] ALSA: pcm: use krealloc_array()

2020-11-03 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski Reviewed-by: Takashi Iwai --- sound/core/pcm_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v2 6/8] drm: atomic: use krealloc_array()

2020-11-03 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski Acked-by: Daniel Vetter --- drivers/gpu/drm/drm_atomic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH v2 8/8] dma-buf: use krealloc_array()

2020-11-03 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski Acked-by: Christian König --- drivers/dma-buf/sync_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

Re: [PATCH v2 1/8] mm: slab: provide krealloc_array()

2020-11-03 Thread Bartosz Golaszewski
On Mon, Nov 2, 2020 at 4:41 PM Matthew Wilcox wrote: > > On Mon, Nov 02, 2020 at 04:20:30PM +0100, Bartosz Golaszewski wrote: > > +Chunks allocated with `kmalloc` can be resized with `krealloc`. Similarly > > +to `kmalloc_array`: a helper for resising arrays is provi

Re: [PATCH v2 0/8] slab: provide and use krealloc_array()

2020-11-04 Thread Bartosz Golaszewski
On Tue, Nov 3, 2020 at 5:14 AM Joe Perches wrote: > > On Mon, 2020-11-02 at 16:20 +0100, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > Andy brought to my attention the fact that users allocating an array of > > equally sized elements should ch

[PATCH v3 0/9] slab: provide and use krealloc_array()

2020-11-10 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Andy brought to my attention the fact that users allocating an array of equally sized elements should check if the size multiplication doesn't overflow. This is why we have helpers like kmalloc_array(). However we don't have krealloc_array() equivalent and

[PATCH v3 1/9] mm: slab: clarify krealloc()'s behavior with __GFP_ZERO

2020-11-10 Thread Bartosz Golaszewski
From: Bartosz Golaszewski __GFP_ZERO is ignored by krealloc() (unless we fall-back to kmalloc() path, in which case it's honored). Point that out in the kerneldoc. Signed-off-by: Bartosz Golaszewski --- mm/slab_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --

[PATCH v3 3/9] ALSA: pcm: use krealloc_array()

2020-11-10 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski Reviewed-by: Takashi Iwai --- sound/core/pcm_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v3 4/9] vhost: vringh: use krealloc_array()

2020-11-10 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski Acked-by: Michael S. Tsirkin --- drivers/vhost/vringh.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH v3 2/9] mm: slab: provide krealloc_array()

2020-11-10 Thread Bartosz Golaszewski
From: Bartosz Golaszewski When allocating an array of elements, users should check for multiplication overflow or preferably use one of the provided helpers like: kmalloc_array(). There's no krealloc_array() counterpart but there are many users who use regular krealloc() to reallocate a

[PATCH v3 5/9] pinctrl: use krealloc_array()

2020-11-10 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/pinctrl-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v3 9/9] dma-buf: use krealloc_array()

2020-11-10 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski Acked-by: Christian König --- drivers/dma-buf/sync_file.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH v3 7/9] drm: atomic: use krealloc_array()

2020-11-10 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski Acked-by: Daniel Vetter --- drivers/gpu/drm/drm_atomic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH v3 8/9] hwtracing: intel: use krealloc_array()

2020-11-10 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski --- drivers/hwtracing/intel_th/msu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH v3 6/9] edac: ghes: use krealloc_array()

2020-11-10 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski Acked-by: Borislav Petkov --- drivers/edac/ghes_edac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

Re: [PATCH] dt-bindings: Add missing array size constraints

2021-01-06 Thread Bartosz Golaszewski
+++ b/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml > @@ -81,6 +81,7 @@ properties: > const: 2 > >reset-gpios: > +maxItems: 1 > description: >GPIO specification for the RESET input. This is an active low signal to >

[PATCH 07/12] fbdev: da8xx: add support for a regulator

2019-06-25 Thread Bartosz Golaszewski
From: Bartosz Golaszewski We want to remove the hacky platform data callback for power control. Add a regulator to the driver data and enable/disable it next to the current panel_power_ctrl() calls. We will use it in subsequent patch on da850-evm. Signed-off-by: Bartosz Golaszewski

[PATCH 08/12] ARM: davinci: da850-evm: switch to using a fixed regulator for lcdc

2019-06-25 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Now that the da8xx fbdev driver supports power control with an actual regulator, switch to using a fixed power supply for da850-evm. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/board-da850-evm.c | 62 ++--- 1 file changed, 44

[PATCH 10/12] fbdev: da8xx-fb: use devm_platform_ioremap_resource()

2019-06-25 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Shrink the code a bit by using the new helper wrapping the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by: Bartosz Golaszewski --- drivers/video/fbdev/da8xx-fb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff

[PATCH 04/12] ARM: davinci: refresh davinci_all_defconfig

2019-06-25 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Refresh davinci_all_defconfig with current master. Signed-off-by: Bartosz Golaszewski --- arch/arm/configs/davinci_all_defconfig | 27 ++ 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/arch/arm/configs/davinci_all_defconfig b

[PATCH 09/12] fbdev: da8xx: remove panel_power_ctrl() callback from platform data

2019-06-25 Thread Bartosz Golaszewski
From: Bartosz Golaszewski There are no more users of panel_power_ctrl(). Remove it from the driver. Signed-off-by: Bartosz Golaszewski --- drivers/video/fbdev/da8xx-fb.c | 25 + include/video/da8xx-fb.h | 1 - 2 files changed, 5 insertions(+), 21 deletions

[PATCH 05/12] ARM: davinci_all_defconfig: enable GPIO backlight

2019-06-25 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Enable the GPIO backlight module in davinci_all_defconfig. Signed-off-by: Bartosz Golaszewski --- arch/arm/configs/davinci_all_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/davinci_all_defconfig b/arch/arm/configs

[PATCH 11/12] fbdev: da8xx-fb: drop a redundant if

2019-06-25 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The driver data is always set in probe. The remove() callback won't be called if probe failed which is the only way for it to be NULL. Remove the redundant if. Signed-off-by: Bartosz Golaszewski --- drivers/video/fbdev/da8xx-fb.c

[PATCH 12/12] fbdev: da8xx: use resource management for dma

2019-06-25 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use managed variants of dma alloc functions in the da8xx fbdev driver. Signed-off-by: Bartosz Golaszewski --- drivers/video/fbdev/da8xx-fb.c | 32 ++-- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/drivers/video/fbdev

[PATCH 00/12] ARM: davinci: da850-evm: remove more legacy GPIO calls

2019-06-25 Thread Bartosz Golaszewski
From: Bartosz Golaszewski This is another small step on the path to liberating davinci from legacy GPIO API calls and shrinking the davinci GPIO driver by not having to support the base GPIO number anymore. This time we're removing the legacy calls used indirectly by the LCDC fbdev driver.

dri-devel@lists.freedesktop.org

2019-06-25 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Instead of dereferencing pdev each time, use a helper variable for the associated device pointer. Signed-off-by: Bartosz Golaszewski --- drivers/video/backlight/gpio_backlight.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a

[PATCH 03/12] backlight: gpio: pull the non-pdata device probing code into probe()

2019-06-25 Thread Bartosz Golaszewski
From: Bartosz Golaszewski There's no good reason to have the generic probing code in a separate routine. This function is short and is inlined by the compiler anyway. Move it into probe under the pdata-specific part. Signed-off-by: Bartosz Golaszewski --- drivers/video/back

[PATCH 06/12] ARM: davinci: da850-evm: model the backlight GPIO as an actual device

2019-06-25 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Instead of enabling the panel backlight in a callback defined in board file using deprecated legacy GPIO API calls, model the line as a GPIO backlight device. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/board-da850-evm.c | 40

[PATCH 01/12] backlight: gpio: allow to probe non-pdata devices from board files

2019-06-25 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Currently we can only probe devices that either use device tree or pass platform data to probe(). Rename gpio_backlight_probe_dt() to gpio_backlight_probe_prop() and use generic device properties instead of OF specific helpers. Reverse the logic checking the presence of

[PATCH RFT 3/4] sh: ecovec24: don't set unused fields in platform data

2019-06-28 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Platform data fields other than fbdev are no longer used by the backlight driver. Remove them. Signed-off-by: Bartosz Golaszewski --- arch/sh/boards/mach-ecovec24/setup.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/sh/boards/mach-ecovec24/setup.c b

[PATCH RFT 0/4] backlight: gpio: simplify the driver

2019-06-28 Thread Bartosz Golaszewski
From: Bartosz Golaszewski While working on my other series related to gpio-backlight[1] I noticed that we could simplify the driver if we made the only user of platform data use GPIO lookups and device properties. This series tries to do that. The first patch sets up all the required structures

[PATCH RFT 2/4] backlight: gpio: simplify the platform data handling

2019-06-28 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Now that the last user of platform data (sh ecovec24) defines a proper GPIO lookup and sets the 'default-on' device property, we can drop the platform_data-specific GPIO handling and unify a big chunk of code. The only field used from the platform data is now

[PATCH RFT 4/4] backlight: gpio: remove unused fields from platform data

2019-06-28 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Remove the platform data fields that nobody uses. Signed-off-by: Bartosz Golaszewski --- include/linux/platform_data/gpio_backlight.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/linux/platform_data/gpio_backlight.h b/include/linux/platform_data

[PATCH RFT 1/4] sh: ecovec24: add additional properties to the backlight device

2019-06-28 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Add a GPIO lookup entry and a device property for GPIO backlight to the board file. Tie them to the platform device which is now registered using platform_device_register_full() because of the properties. These changes are inactive now but will be used once the gpio

[PATCH v2 1/7] sh: ecovec24: add additional properties to the backlight device

2019-07-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Add a GPIO lookup entry and a device property for GPIO backlight to the board file. Tie them to the platform device which is now registered using platform_device_register_full() because of the properties. These changes are inactive now but will be used once the gpio

[PATCH v2 4/7] backlight: gpio: remove unused fields from platform data

2019-07-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Remove the platform data fields that nobody uses. Signed-off-by: Bartosz Golaszewski --- include/linux/platform_data/gpio_backlight.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/linux/platform_data/gpio_backlight.h b/include/linux/platform_data

[PATCH v2 5/7] backlight: gpio: remove dev from struct gpio_backlight

2019-07-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski This field is unused. Remove it. Signed-off-by: Bartosz Golaszewski --- drivers/video/backlight/gpio_backlight.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/video/backlight/gpio_backlight.c b/drivers/video/backlight/gpio_backlight.c index

[PATCH v2 6/7] backlight: gpio: remove def_value from struct gpio_backlight

2019-07-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski This field is unused outside of probe(). There's no need to store it. We can make it into a local variable. Signed-off-by: Bartosz Golaszewski --- drivers/video/backlight/gpio_backlight.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --

[PATCH v2 3/7] sh: ecovec24: don't set unused fields in platform data

2019-07-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Platform data fields other than fbdev are no longer used by the backlight driver. Remove them. Signed-off-by: Bartosz Golaszewski --- arch/sh/boards/mach-ecovec24/setup.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/sh/boards/mach-ecovec24/setup.c b

[PATCH v2 2/7] backlight: gpio: simplify the platform data handling

2019-07-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Now that the last user of platform data (sh ecovec24) defines a proper GPIO lookup and sets the 'default-on' device property, we can drop the platform_data-specific GPIO handling and unify a big chunk of code. The only field used from the platform data is now

[PATCH v2 0/7] backlight: gpio: simplify the driver

2019-07-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski While working on my other series related to gpio-backlight[1] I noticed that we could simplify the driver if we made the only user of platform data use GPIO lookups and device properties. This series tries to do that. The first patch adds all necessary data structures

dri-devel@lists.freedesktop.org

2019-07-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Instead of dereferencing pdev each time, use a helper variable for the associated device pointer. Signed-off-by: Bartosz Golaszewski --- drivers/video/backlight/gpio_backlight.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff

Re: [PATCH v2 2/7] backlight: gpio: simplify the platform data handling

2019-07-22 Thread Bartosz Golaszewski
pon., 22 lip 2019 o 18:06 Andy Shevchenko napisał(a): > > On Mon, Jul 22, 2019 at 05:02:57PM +0200, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > Now that the last user of platform data (sh ecovec24) defines a proper > > GPIO lookup and sets th

dri-devel@lists.freedesktop.org

2019-07-22 Thread Bartosz Golaszewski
pon., 22 lip 2019 o 18:09 Andy Shevchenko napisał(a): > > On Mon, Jul 22, 2019 at 05:03:02PM +0200, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > Instead of dereferencing pdev each time, use a helper variable for > > the associated dev

[PATCH v3 3/7] sh: ecovec24: don't set unused fields in platform data

2019-07-24 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Platform data fields other than fbdev are no longer used by the backlight driver. Remove them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- arch/sh/boards/mach-ecovec24/setup.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/sh

[PATCH v3 2/7] backlight: gpio: simplify the platform data handling

2019-07-24 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Now that the last user of platform data (sh ecovec24) defines a proper GPIO lookup and sets the 'default-on' device property, we can drop the platform_data-specific GPIO handling and unify a big chunk of code. The only field used from the platform data is now

[PATCH v3 6/7] backlight: gpio: remove def_value from struct gpio_backlight

2019-07-24 Thread Bartosz Golaszewski
From: Bartosz Golaszewski This field is unused outside of probe(). There's no need to store it. We can make it into a local variable. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/video/backlight/gpio_backlight.c | 9 - 1 file changed, 4 insertions(

dri-devel@lists.freedesktop.org

2019-07-24 Thread Bartosz Golaszewski
wt., 23 lip 2019 o 17:34 Andy Shevchenko napisał(a): > > On Tue, Jul 23, 2019 at 08:29:52AM +0200, Bartosz Golaszewski wrote: > > pon., 22 lip 2019 o 18:09 Andy Shevchenko > > napisał(a): > > > > > > On Mon, Jul 22, 2019 at 05:03:02PM +0200, Bartosz Gola

Re: [PATCH v2 2/7] backlight: gpio: simplify the platform data handling

2019-07-24 Thread Bartosz Golaszewski
wt., 23 lip 2019 o 17:32 Andy Shevchenko napisał(a): > > On Tue, Jul 23, 2019 at 08:28:00AM +0200, Bartosz Golaszewski wrote: > > pon., 22 lip 2019 o 18:06 Andy Shevchenko > > napisał(a): > > > > > > On Mon, Jul 22, 2019 at 05:02:57PM +0200, Bartosz Gola

Re: [PATCH v3 0/7] backlight: gpio: simplify the driver

2019-07-24 Thread Bartosz Golaszewski
śr., 24 lip 2019 o 10:25 Bartosz Golaszewski napisał(a): > > From: Bartosz Golaszewski > > While working on my other series related to gpio-backlight[1] I noticed > that we could simplify the driver if we made the only user of platform > data use GPIO lookups and device prope

[PATCH v3 5/7] backlight: gpio: remove dev from struct gpio_backlight

2019-07-24 Thread Bartosz Golaszewski
From: Bartosz Golaszewski This field is unused. Remove it. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/video/backlight/gpio_backlight.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/video/backlight/gpio_backlight.c b/drivers/video/backlight

[PATCH v3 0/7] backlight: gpio: simplify the driver

2019-07-24 Thread Bartosz Golaszewski
From: Bartosz Golaszewski While working on my other series related to gpio-backlight[1] I noticed that we could simplify the driver if we made the only user of platform data use GPIO lookups and device properties. This series tries to do that. The first patch adds all necessary data structures

[PATCH v3 4/7] backlight: gpio: remove unused fields from platform data

2019-07-24 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Remove the platform data fields that nobody uses. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- include/linux/platform_data/gpio_backlight.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/linux/platform_data/gpio_backlight.h b

dri-devel@lists.freedesktop.org

2019-07-24 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Instead of dereferencing pdev each time, use a helper variable for the associated device pointer. Signed-off-by: Bartosz Golaszewski --- drivers/video/backlight/gpio_backlight.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a

[PATCH v3 1/7] sh: ecovec24: add additional properties to the backlight device

2019-07-24 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Add a GPIO lookup entry and a device property for GPIO backlight to the board file. Tie them to the platform device which is now registered using platform_device_register_full() because of the properties. These changes are inactive now but will be used once the gpio

Re: [PATCH] dt-bindings: Fix properties without any type

2022-05-22 Thread Bartosz Golaszewski
/bindings/serial/8250.yaml| 1 + > .../devicetree/bindings/sound/audio-graph-card2.yaml | 3 +++ > .../devicetree/bindings/sound/imx-audio-hdmi.yaml | 3 +++ > Documentation/devicetree/bindings/usb/smsc,usb3503.yaml | 1 + > 25 files changed, 55 insertions(+), 8 deletions(-) > For GPIO: Acked-by: Bartosz Golaszewski

Re: [PATCH v7 0/9] backlight: gpio: simplify the driver

2019-11-04 Thread Bartosz Golaszewski
47:26AM +0100, Lee Jones wrote: > > > > On Wed, 23 Oct 2019, Daniel Thompson wrote: > > > > > > > > > On Tue, Oct 22, 2019 at 11:29:54AM +0200, Bartosz Golaszewski wrote: > > > > > > wt., 22 paź 2019 o 10:36 Bartosz Golaszewski > > &g

Re: [PATCH v7 0/9] backlight: gpio: simplify the driver

2019-11-10 Thread Bartosz Golaszewski
pon., 4 lis 2019 o 10:22 Bartosz Golaszewski napisał(a): > > pt., 1 lis 2019 o 16:39 Jacopo Mondi napisał(a): > > > > Hello, > > as promised... > > > > On Fri, Nov 01, 2019 at 08:58:03AM +, Lee Jones wrote: > > > On Thu, 24 Oct

Re: [PATCH v4 7/7] backlight: gpio: pull gpio_backlight_initial_power_state() into probe

2019-10-04 Thread Bartosz Golaszewski
śr., 2 paź 2019 o 16:40 Daniel Thompson napisał(a): > > On Wed, Oct 02, 2019 at 01:46:17PM +0200, Bartosz Golaszewski wrote: > > śr., 2 paź 2019 o 12:33 Daniel Thompson > > napisał(a): > > > > > > On Tue, Oct 01, 2019 at 02:58:37PM +0200, Bartosz Gola

[PATCH v5 0/7] backlight: gpio: simplify the driver

2019-10-06 Thread Bartosz Golaszewski
From: Bartosz Golaszewski While working on my other series related to gpio-backlight[1] I noticed that we could simplify the driver if we made the only user of platform data use GPIO lookups and device properties. This series tries to do that. The first patch adds all necessary data structures

[PATCH v5 0/7] backlight: gpio: simplify the driver

2019-10-06 Thread Bartosz Golaszewski
From: Bartosz Golaszewski While working on my other series related to gpio-backlight[1] I noticed that we could simplify the driver if we made the only user of platform data use GPIO lookups and device properties. This series tries to do that. The first patch adds all necessary data structures

[PATCH v5 1/7] backlight: gpio: remove unneeded include

2019-10-06 Thread Bartosz Golaszewski
From: Bartosz Golaszewski We no longer use any symbols from of_gpio.h. Remove this include. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Reviewed-by: Andy Shevchenko --- drivers/video/backlight/gpio_backlight.c | 1 - 1 file changed, 1 deletion

[PATCH v5 2/7] sh: ecovec24: add additional properties to the backlight device

2019-10-06 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Add a GPIO lookup entry and a device property for GPIO backlight to the board file. Tie them to the platform device which is now registered using platform_device_register_full() because of the properties. These changes are inactive now but will be used once the gpio

dri-devel@lists.freedesktop.org

2019-10-07 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Instead of dereferencing pdev each time, use a helper variable for the associated device pointer. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Reviewed-by: Andy Shevchenko --- drivers/video/backlight/gpio_backlight.c

[PATCH v5 5/7] backlight: gpio: remove unused fields from platform data

2019-10-07 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Remove the platform data fields that nobody uses. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson --- include/linux/platform_data/gpio_backlight.h | 3 --- 1 file changed, 3 deletions(-) diff

[PATCH v5 4/7] sh: ecovec24: don't set unused fields in platform data

2019-10-07 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Platform data fields other than fbdev are no longer used by the backlight driver. Remove them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij --- arch/sh/boards/mach-ecovec24/setup.c | 3 --- 1 file changed, 3 deletions

[PATCH v5 3/7] backlight: gpio: simplify the platform data handling

2019-10-07 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Now that the last user of platform data (sh ecovec24) defines a proper GPIO lookup and sets the 'default-on' device property, we can drop the platform_data-specific GPIO handling and unify a big chunk of code. The only field used from the platform data is now

[PATCH v5 7/7] backlight: gpio: pull gpio_backlight_initial_power_state() into probe

2019-10-07 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The probe function in the gpio-backlight driver is quite short. If we pull gpio_backlight_initial_power_state() into probe we can drop two more fields from struct gpio_backlight and shrink the driver code. Signed-off-by: Bartosz Golaszewski --- drivers/video

Re: [PATCH v5 0/7] backlight: gpio: simplify the driver

2019-10-14 Thread Bartosz Golaszewski
pon., 14 paź 2019 o 10:12 Lee Jones napisał(a): > > On Mon, 07 Oct 2019, Bartosz Golaszewski wrote: > > > From: Bartosz Golaszewski > > > > While working on my other series related to gpio-backlight[1] I noticed > > that we could simplify the driver if we made t

Re: [PATCH v5 0/7] backlight: gpio: simplify the driver

2019-10-18 Thread Bartosz Golaszewski
pt., 18 paź 2019 o 17:02 Jacopo Mondi napisał(a): > > Hi, > > On Thu, Oct 17, 2019 at 08:25:50AM +0100, Lee Jones wrote: > > On Wed, 16 Oct 2019, Jacopo Mondi wrote: > > > > > Hi, sorry for not having replied earlier > > > > > > On Wed, Oct 16, 2019 at 02:56:57PM +0200, Linus Walleij wrote: > > >

[PATCH v6 7/9] backlight: gpio: remove unused fields from platform data

2019-10-19 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Remove the platform data fields that nobody uses. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson --- include/linux/platform_data/gpio_backlight.h | 3 --- 1 file changed, 3 deletions(-) diff

[PATCH v6 6/9] sh: ecovec24: don't set unused fields in platform data

2019-10-19 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Platform data fields other than fbdev are no longer used by the backlight driver. Remove them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij --- arch/sh/boards/mach-ecovec24/setup.c | 3 --- 1 file changed, 3 deletions

[PATCH v6 5/9] backlight: gpio: simplify the platform data handling

2019-10-19 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Now that the last user of platform data (sh ecovec24) defines a proper GPIO lookup and sets the 'default-on' device property, we can drop the platform_data-specific GPIO handling and unify a big chunk of code. The only field used from the platform data is now

[PATCH v6 4/9] sh: ecovec24: add additional properties to the backlight device

2019-10-19 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Add a GPIO lookup entry and a device property for GPIO backlight to the board file. Tie them to the platform device which is now registered using platform_device_register_full() because of the properties. These changes are inactive now but will be used once the gpio

[PATCH v6 3/9] backlight: gpio: explicitly set the direction of the GPIO

2019-10-19 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The GPIO backlight driver currently requests the line 'as is', without acively setting its direction. This can lead to problems: if the line is in input mode by default, we won't be able to drive it later when updating the status and also reading it

dri-devel@lists.freedesktop.org

2019-10-19 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Instead of dereferencing pdev each time, use a helper variable for the associated device pointer. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Reviewed-by: Andy Shevchenko --- drivers/video/backlight/gpio_backlight.c

[PATCH v6 0/9] backlight: gpio: simplify the driver

2019-10-19 Thread Bartosz Golaszewski
From: Bartosz Golaszewski While working on my other series related to gpio-backlight[1] I noticed that we could simplify the driver if we made the only user of platform data use GPIO lookups and device properties. This series tries to do that. First two patches contain minor fixes. Third patch

[PATCH v6 2/9] backlight: gpio: remove stray newline

2019-10-19 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Remove a double newline from the driver. Signed-off-by: Bartosz Golaszewski --- drivers/video/backlight/gpio_backlight.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/backlight/gpio_backlight.c b/drivers/video/backlight/gpio_backlight.c index

[PATCH v6 1/9] backlight: gpio: remove unneeded include

2019-10-19 Thread Bartosz Golaszewski
From: Bartosz Golaszewski We no longer use any symbols from of_gpio.h. Remove this include. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Reviewed-by: Andy Shevchenko --- drivers/video/backlight/gpio_backlight.c | 1 - 1 file changed, 1 deletion

[PATCH v6 9/9] backlight: gpio: pull gpio_backlight_initial_power_state() into probe

2019-10-19 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The probe function in the gpio-backlight driver is quite short. If we pull gpio_backlight_initial_power_state() into probe we can drop two more fields from struct gpio_backlight and shrink the driver code. Signed-off-by: Bartosz Golaszewski Acked-by: Daniel Thompson

Re: [PATCH v6 3/9] backlight: gpio: explicitly set the direction of the GPIO

2019-10-21 Thread Bartosz Golaszewski
pon., 21 paź 2019 o 12:45 Daniel Thompson napisał(a): > > On Sat, Oct 19, 2019 at 10:35:50AM +0200, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > The GPIO backlight driver currently requests the line 'as is', without > > acively setting

[PATCH v7 6/9] sh: ecovec24: don't set unused fields in platform data

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Platform data fields other than fbdev are no longer used by the backlight driver. Remove them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij --- arch/sh/boards/mach-ecovec24/setup.c | 3 --- 1 file changed, 3 deletions

[PATCH v7 5/9] backlight: gpio: simplify the platform data handling

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Now that the last user of platform data (sh ecovec24) defines a proper GPIO lookup and sets the 'default-on' device property, we can drop the platform_data-specific GPIO handling and unify a big chunk of code. The only field used from the platform data is now

[PATCH v7 1/9] backlight: gpio: remove unneeded include

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski We no longer use any symbols from of_gpio.h. Remove this include. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Reviewed-by: Andy Shevchenko --- drivers/video/backlight/gpio_backlight.c | 1 - 1 file changed, 1 deletion

[PATCH v7 4/9] sh: ecovec24: add additional properties to the backlight device

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Add a GPIO lookup entry and a device property for GPIO backlight to the board file. Tie them to the platform device which is now registered using platform_device_register_full() because of the properties. These changes are inactive now but will be used once the gpio

[PATCH v7 0/9] backlight: gpio: simplify the driver

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski While working on my other series related to gpio-backlight[1] I noticed that we could simplify the driver if we made the only user of platform data use GPIO lookups and device properties. This series tries to do that. First two patches contain minor fixes. Third patch

Re: [PATCH v7 0/9] backlight: gpio: simplify the driver

2019-10-22 Thread Bartosz Golaszewski
wt., 22 paź 2019 o 10:36 Bartosz Golaszewski napisał(a): > > From: Bartosz Golaszewski > > While working on my other series related to gpio-backlight[1] I noticed > that we could simplify the driver if we made the only user of platform > data use GPIO lookups and device prope

[PATCH v7 3/9] backlight: gpio: explicitly set the direction of the GPIO

2019-10-23 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The GPIO backlight driver currently requests the line 'as is', without acively setting its direction. This can lead to problems: if the line is in input mode by default, we won't be able to drive it later when updating the status and also reading it

[PATCH v7 2/9] backlight: gpio: remove stray newline

2019-10-23 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Remove a double newline from the driver. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Daniel Thompson --- drivers/video/backlight/gpio_backlight.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/backlight

[PATCH v7 7/9] backlight: gpio: remove unused fields from platform data

2019-10-23 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Remove the platform data fields that nobody uses. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson --- include/linux/platform_data/gpio_backlight.h | 3 --- 1 file changed, 3 deletions(-) diff

[PATCH v7 9/9] backlight: gpio: pull gpio_backlight_initial_power_state() into probe

2019-10-23 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The probe function in the gpio-backlight driver is quite short. If we pull gpio_backlight_initial_power_state() into probe we can drop two more fields from struct gpio_backlight and shrink the driver code. Signed-off-by: Bartosz Golaszewski Acked-by: Daniel Thompson

dri-devel@lists.freedesktop.org

2019-10-23 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Instead of dereferencing pdev each time, use a helper variable for the associated device pointer. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Reviewed-by: Andy Shevchenko --- drivers/video/backlight/gpio_backlight.c

[PATCH v4 2/7] sh: ecovec24: add additional properties to the backlight device

2019-10-01 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Add a GPIO lookup entry and a device property for GPIO backlight to the board file. Tie them to the platform device which is now registered using platform_device_register_full() because of the properties. These changes are inactive now but will be used once the gpio

[PATCH v4 0/7] backlight: gpio: simplify the driver

2019-10-01 Thread Bartosz Golaszewski
From: Bartosz Golaszewski While working on my other series related to gpio-backlight[1] I noticed that we could simplify the driver if we made the only user of platform data use GPIO lookups and device properties. This series tries to do that. The first patch adds all necessary data structures

  1   2   3   4   >