Re: [PATCH 1/2] leds: bcm6328: improve write and read functions

2021-02-24 Thread Pavel Machek
Hi! > > Less code duplication? It is immediately clear that driver including > > this is specific for brcm SoCs and would not try to work somewhere else? > > Yes maybe, there still does not feel like this deserves a shared header, > but as long as the generated code is the same, why not. Ok, it

Re: [PATCH 1/2] leds: bcm6328: improve write and read functions

2021-02-24 Thread Florian Fainelli
On 2/24/2021 9:36 AM, Pavel Machek wrote: > Hi! > Yeah, but ideally you should not be copying comments; there should be one central place which does it and does it right. >>> >>> I’m open to suggestions :). >>> Which central place would be a good place for you? >> >> I did consider cr

Re: [PATCH 1/2] leds: bcm6328: improve write and read functions

2021-02-24 Thread Pavel Machek
Hi! > >> Yeah, but ideally you should not be copying comments; there should be > >> one central place which does it and does it right. > > > > I’m open to suggestions :). > > Which central place would be a good place for you? > > I did consider creating an include/linux/brcm/brcm_io.h header or

Re: [PATCH 1/2] leds: bcm6328: improve write and read functions

2021-02-23 Thread Florian Fainelli
On 2/23/2021 1:05 AM, Álvaro Fernández Rojas wrote: > > >> El 23 feb 2021, a las 9:58, Pavel Machek escribió: >> >> Hi! >> > This is proven to work in BMIPS BE/LE and ARM BE/LE, as used in > bcm2835-rng > and bcmgenet drivers. > Both should also be inline functions.

Re: [PATCH 1/2] leds: bcm6328: improve write and read functions

2021-02-23 Thread Álvaro Fernández Rojas
> El 23 feb 2021, a las 9:58, Pavel Machek escribió: > > Hi! > This is proven to work in BMIPS BE/LE and ARM BE/LE, as used in bcm2835-rng and bcmgenet drivers. Both should also be inline functions. >>> >>> >>> -#ifdef CONFIG_CPU_BIG_ENDIAN - iowrite32be(data, reg

Re: [PATCH 1/2] leds: bcm6328: improve write and read functions

2021-02-23 Thread Pavel Machek
Hi! > >> This is proven to work in BMIPS BE/LE and ARM BE/LE, as used in bcm2835-rng > >> and bcmgenet drivers. > >> Both should also be inline functions. > > > > > > > >> -#ifdef CONFIG_CPU_BIG_ENDIAN > >> - iowrite32be(data, reg); > >> -#else > >> - writel(data, reg); > >> -#endif > >> + /

Re: [PATCH 1/2] leds: bcm6328: improve write and read functions

2021-02-23 Thread Álvaro Fernández Rojas
Hi Pavel, > El 23 feb 2021, a las 9:34, Pavel Machek escribió: > > On Tue 2021-02-23 09:17:31, Álvaro Fernández Rojas wrote: >> This is proven to work in BMIPS BE/LE and ARM BE/LE, as used in bcm2835-rng >> and bcmgenet drivers. >> Both should also be inline functions. > > > >> -#ifdef CONFIG

Re: [PATCH 1/2] leds: bcm6328: improve write and read functions

2021-02-23 Thread Pavel Machek
On Tue 2021-02-23 09:17:31, Álvaro Fernández Rojas wrote: > This is proven to work in BMIPS BE/LE and ARM BE/LE, as used in bcm2835-rng > and bcmgenet drivers. > Both should also be inline functions. > -#ifdef CONFIG_CPU_BIG_ENDIAN > - iowrite32be(data, reg); > -#else > - writel(data, re

[PATCH 1/2] leds: bcm6328: improve write and read functions

2021-02-23 Thread Álvaro Fernández Rojas
This is proven to work in BMIPS BE/LE and ARM BE/LE, as used in bcm2835-rng and bcmgenet drivers. Both should also be inline functions. Signed-off-by: Álvaro Fernández Rojas --- drivers/leds/leds-bcm6328.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --