Re: [PATCH AUTOSEL 5.11 17/23] i2c: mv64xxx: Fix random system lock caused by runtime PM

2021-04-20 Thread Marek Behún
On Mon, 19 Apr 2021 16:43:36 -0400 Sasha Levin wrote: > This first appeared with commit e5c02cf54154 ("i2c: mv64xxx: Add runtime > PM support"). I forgot to add Fixes: tag to this commit. But the bug first appeared with commit e5c02cf54154 ("i2c: mv64xxx: Add runtime PM support") which is in

Re: [PATCH] net: phy: marvell: fix detection of PHY on Topaz switches

2021-04-12 Thread Marek Behún
On Mon, 12 Apr 2021 18:38:29 +0200 Pali Rohár wrote: > On Monday 12 April 2021 18:12:35 Andrew Lunn wrote: > > On Mon, Apr 12, 2021 at 05:52:39PM +0200, Pali Rohár wrote: > > > On Monday 12 April 2021 17:32:33 Andrew Lunn wrote: > > > > > Anyway, now I'm looking at phy/marvell.c driver again

Re: [PATCH net-next 1/2] net: phy: marvell-88x2222: check that link is operational

2021-04-12 Thread Marek Behún
On Mon, 12 Apr 2021 15:16:59 +0300 Ivan Bornyakov wrote: > Some SFP modules uses RX_LOS for link indication. In such cases link > will be always up, even without cable connected. RX_LOS changes will > trigger link_up()/link_down() upstream operations. Thus, check that SFP > link is operational

Re: [PATCH v2] net: phy: marvell: fix detection of PHY on Topaz switches

2021-04-12 Thread Marek Behún
> + /* Some internal PHYs don't have a model number. */ > + if (reg == MII_PHYSID2 && !(val & 0x3f0) && > + chip->info->family < ARRAY_SIZE(family_prod_id_table)) { > + prod_id = family_prod_id_table[chip->info->family]; > + if (prod_id) > +

Re: [PATCH mvebu v2 09/10] cpufreq: armada-37xx: Remove cur_frequency variable

2021-03-29 Thread Marek Behún
On Mon, 29 Mar 2021 17:00:12 +0200 Gregory CLEMENT wrote: > Pali Rohár writes: > > > Variable cur_frequency in armada37xx_cpufreq_driver_init() is unused. > > > > Signed-off-by: Pali Rohár > > Acked-by: Gregory CLEMENT Gregory, THX for the acks. Will you be merging these patches or

Re: [PATCH] PCI: Disallow retraining link for Atheros QCA98xx chips on non-Gen1 PCIe bridges

2021-03-27 Thread Marek Behún
On Sat, 27 Mar 2021 14:29:59 +0100 Pali Rohár wrote: > I can change this to 'if (!ret)' if needed, no problem. > > I use 'if (!val)' mostly for boolean and pointer variables. If > variable can contain more integer values then I lot of times I use > '=='. Comparing integer varibales with

[PATCH 2/2] treewide: change my e-mail address, fix my name

2021-03-25 Thread Marek Behún
Change my e-mail address to ka...@kernel.org, and fix my name in non-code parts (add diacritical mark). Signed-off-by: Marek Behún --- Documentation/ABI/testing/debugfs-moxtet | 4 ++-- Documentation/ABI/testing/debugfs-turris-mox-rwtm | 2 +- Documentation/ABI/testing

[PATCH 1/2] MAINTAINERS: update CZ.NIC's Turris information

2021-03-25 Thread Marek Behún
Add all the files maintained by Turris team, not only for MOX, but also for Omnia. Change website. Signed-off-by: Marek Behún --- MAINTAINERS | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 8d23b0ec0c90..2cf388c89196 100644

Re: [PATCH mvebu v3 00/10] Armada 37xx: Fix cpufreq changing base CPU speed to 800 MHz from 1000 MHz

2021-03-12 Thread Marek Behún
On Fri, 12 Mar 2021 10:12:06 +0100 Gregory CLEMENT wrote: > Hello Pali, > > > Hello Gregory! > > > > Patches are the for almost two months and more people have tested them. > > They are marked with Fixed/CC-stable tags, they should go also into > > stable trees as they are fixing CPU scaling

Re: [PATCH] ARM: dts: turris-omnia: fix hardware buffer management

2021-02-17 Thread Marek Behún
On Wed, 17 Feb 2021 17:22:17 +0100 Andrew Lunn wrote: > On Wed, Feb 17, 2021 at 03:30:38PM +, Rui Salvaterra wrote: > > Hardware buffer management has never worked on the Turris Omnia, as the > > required MBus window hadn't been reserved. Fix thusly. > > Hi Rui > > I don't know all the

Re: [PATCH] ARM: dts: turris-omnia: fix hardware buffer management

2021-02-17 Thread Marek Behún
Rui, in the future make the subject prefix [PATCH mvebu-dt] or [PATCH mvebu/dt] so that Gregory knows its for him and for which branch. Marek

Re: [PATCH] ARM: dts: turris-omnia: fix hardware buffer management

2021-02-17 Thread Marek Behún
gt; > Signed-off-by: Rui Salvaterra Reviewed-by: Marek Behún

Re: [PATCH] ARM: dts: turris-omnia: fix hardware buffer management

2021-02-17 Thread Marek Behún
/o\ How did I manage to miss this? Please wait a few minutes I am just going to do a fast compile and test. Marek

Re: [PATCH mvebu v2 00/10] Armada 37xx: Fix cpufreq changing base CPU speed to 800 MHz from 1000 MHz

2021-02-10 Thread Marek Behún
On Wed, 10 Feb 2021 11:08:59 -0800 nnet wrote: > => md d0012604 1; md d0012604 1; md d0012604 1 > d0012604: 2b417501 .uA+ > d0012604: 945b [... > d0012604: So this means that in OTP you

Re: [PATCH mvebu v2 00/10] Armada 37xx: Fix cpufreq changing base CPU speed to 800 MHz from 1000 MHz

2021-02-09 Thread Marek Behún
On Tue, 09 Feb 2021 17:51:53 -0800 nnet wrote: > On Tue, Feb 9, 2021, at 5:31 PM, nnet wrote: > > On Tue, Feb 9, 2021, at 3:26 PM, Marek Behún wrote: > > > On Tue, 09 Feb 2021 15:16:45 -0800 > > > nnet wrote: > > > > > > > I've two of

Re: [PATCH mvebu v2 00/10] Armada 37xx: Fix cpufreq changing base CPU speed to 800 MHz from 1000 MHz

2021-02-09 Thread Marek Behún
On Tue, 09 Feb 2021 15:16:45 -0800 nnet wrote: > I've two of these and I've just swapped them (and re-pasted the heat sinks). > > The second one ran under load for awhile and now has frozen as well. > > Under a moderate load `wget -O /dev/null ` @X00Mbits they are fine. > > Under a 1 min

Re: [PATCH] Signed-off-by: giladreti

2021-01-11 Thread Marek Behún
The Signed-off-by line should be last in the commit message, not first. First line (which becomes e-mail subject) should describe what the commit does (in a short one liner) and where it does it. So for your patch it could be something like bpf: support pointer to mem register spilling in

Re: [PATCH net-next 0/2] dsa: add MT7530 GPIO support

2021-01-11 Thread Marek Behún
Qingfang, what modes does the LED support? Does it support blinking on rx/tx? What about link status? I'd like to know because I am still working on patches which add ethernet PHY/switch LEDs, with transparent offloading of netdev trigger. Marek On Mon, 11 Jan 2021 13:44:26 +0800 DENG Qingfang

Re: [PATCH v3 2/2] net: sfp: add mode quirk for GPON module Ubiquiti U-Fiber Instant

2021-01-11 Thread Marek Behún
On Mon, 11 Jan 2021 12:39:09 +0100 Pali Rohár wrote: > SFP GPON module Ubiquiti U-Fiber Instant has in its EEPROM stored nonsense > information. It claims that support all transceiver types including 10G > Ethernet which is not truth. So clear all claimed modes and set only one > mode which

Re: [PATCH v3 1/2] net: sfp: add workaround for Realtek RTL8672 and RTL9601C chips

2021-01-11 Thread Marek Behún
Hi Pali, I have rewritten the commit message a little: The workaround for VSOL V2801F brand based GPON SFP modules added in commit 0d035bed2a4a ("net: sfp: VSOL V2801F / CarlitoxxPro CPGOS03-0490 v2.0 workaround") works only for IDs added explicitly to the list. Since there are rebranded modules

Re: [PATCH v2 1/3] net: sfp: add workaround for Realtek RTL8672 and RTL9601C chips

2021-01-07 Thread Marek Behún
On Thu, 7 Jan 2021 19:45:49 + Russell King - ARM Linux admin wrote: > I think you're not reading the code very well. It checks for bytes at > offset 1..blocksize-1, blocksize+1..2*blocksize-1, etc are zero. It > does _not_ check that byte 0 or the byte at N*blocksize is zero - these > bytes

Re: [net-next PATCH v12 4/4] net: dsa: mv88e6xxx: Add support for mv88e6393x family of Marvell

2021-01-06 Thread Marek Behún
On Wed, 6 Jan 2021 10:45:30 +1000 Pavana Sharma wrote: > Thanks Marek for catching this. > > I will have a closer look and update the patchset. I also sent a reply patch with subject "patch fixing mv88e6393x SERDES IRQ for Pavana's series" it contains the changes necessary to your series.

Re: [net-next PATCH v12 4/4] net: dsa: mv88e6xxx: Add support for mv88e6393x family of Marvell

2021-01-05 Thread Marek Behún
On Fri, 11 Dec 2020 22:51:01 +1000 Pavana Sharma wrote: > +int mv88e6393x_serdes_irq_enable(struct mv88e6xxx_chip *chip, int port, > + int lane, bool enable) > +{ > + u8 cmode = chip->ports[port].cmode; > + int err = 0; > + > + switch (cmode) { > +

Re: [PATCH 2/4] net: sfp: allow to use also SFP modules which are detected as SFF

2020-12-30 Thread Marek Behún
On Wed, 30 Dec 2020 18:06:52 +0100 Pali Rohár wrote: > if (!sfp->type->module_supported() && > (memcmp(id.base.vendor_name, "UBNT", 16) || >memcmp(id.base.vendor_pn, "UF-INSTANT ", 16))) I would rather add a quirk member (bitfield) to the sfp

Re: [PATCH net-next] net: mvneta: Fix validation of 2.5G HSGMII without comphy

2020-11-15 Thread Marek Behún
On Sun, 15 Nov 2020 03:26:01 +0100 Andreas Färber wrote: > Hi Russell, > > On 15.11.20 02:02, Russell King - ARM Linux admin wrote: > > On Sun, Nov 15, 2020 at 01:41:51AM +0100, Andreas Färber wrote: > >> Commit 1a642ca7f38992b086101fe204a1ae3c90ed8016 (net: ethernet: mvneta: > >> Add

Re: [PATCH net-next] net: mvneta: Fix validation of 2.5G HSGMII without comphy

2020-11-15 Thread Marek Behún
On Sun, 15 Nov 2020 01:41:51 +0100 Andreas Färber wrote: > - if (pp->comphy || state->interface == PHY_INTERFACE_MODE_2500BASEX) { > + if (pp->comphy || state->interface == PHY_INTERFACE_MODE_2500BASEX > +|| state->interface == PHY_INTERFACE_MODE_NA) { >

Re: [PATCH] clk: mvebu: a3700: fix the XTAL MODE pin to MPP1_9

2020-11-06 Thread Marek Behún
Also, this is how A3720 WTMI code and ATF determines XTAL clock rate. No reason for kernel to do it differently. Reviewed-by: Marek Behún On Fri, 6 Nov 2020 11:00:39 +0100 Pali Rohár wrote: > From: Terry Zhou > > There is an error in the current code that the XTAL MODE > pin w

Re: disabling CONFIG_LED_CLASS (SND_HDA_CODEC_REALTEK)

2020-10-19 Thread Marek Behún
On Mon, 19 Oct 2020 10:35:12 +0200 Udo van den Heuvel wrote: > People, > > At https://www.kernel.org/doc/html/latest/leds/leds-class.html we can > read that the LEDS code supposedly optimizes away when certain > conditions are met. > Especially the Realtek HDA driver *unconditionally* (as found

Re: [PATCH] net: phy: marvell: Use phy_read_paged() instead of open coding it

2020-10-05 Thread Marek Behún
Reviewed-by: Marek Behún

Re: [PATCH v2] leds: tlc591xx: fix leak of device node iterator

2020-09-25 Thread Marek Behún
"couldn't register LED %s\n", > led->ldev.name); > + } > } > return 0; > } Reviewed-by: Marek Behún

Re: [PATCH 2/2] leds: lm36274: Fix warning for undefined parameters

2020-09-23 Thread Marek Behún
.probe = lm36274_probe, > .driver = { > .name = "lm36274-leds", > + .of_match_table = of_lm36274_leds_match, > }, > }; > module_platform_driver(lm36274_driver) Reviewed-by: Marek Behún

[PATCH leds] leds: regulator: remove driver

2020-09-20 Thread Marek Behún
The leds-regulator driver only supports the old platform data binding and no in-tree code uses it. It also seems that no OpenWRT board uses it. Remove this driver. Signed-off-by: Marek Behún --- drivers/leds/Kconfig | 7 -- drivers/leds/Makefile | 1 - drivers/leds/leds

[PATCH leds v2 03/50] leds: fsg: compile if COMPILE_TEST=y

2020-09-17 Thread Marek Behún
This driver can be compiled on other platforms with small change if COMPILE_TEST=y. Signed-off-by: Marek Behún Cc: Pavel Machek Cc: Dan Murphy Cc: Rod Whitby --- drivers/leds/Kconfig| 2 +- drivers/leds/leds-fsg.c | 6 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git

[PATCH leds v2 07/50] leds: lt3593: do not rewrite .of_node of new LED device to wrong value

2020-09-17 Thread Marek Behún
The devm_led_classdev_register_ext is given init_data with fwnode set, so the LED core sets .of_node of the new LED classdev correctly. Do not rewrite this value to parent of_node. Signed-off-by: Marek Behún Cc: Daniel Mack --- drivers/leds/leds-lt3593.c | 1 - 1 file changed, 1 deletion

[PATCH leds v2 09/50] leds: various: fix OF node leaks

2020-09-17 Thread Marek Behún
Fix OF node leaks by calling of_node_put in for_each_available_child_of_node when the cycle breaks or returns. Signed-off-by: Marek Behún Cc: Nikita Travkin Cc: Milo Kim Cc: Dan Murphy --- drivers/leds/leds-aw2013.c| 4 +++- drivers/leds/leds-lp55xx-common.c | 8 ++-- drivers

[PATCH leds v2 16/50] leds: max77650: use struct led_init_data when registering

2020-09-17 Thread Marek Behún
, the code composed name for the LED in the form "max77650::" For backwards compatibility we therefore set init_data->default_label = ":"; so that the LED will not get a different name if `label` property is not present. Signed-off-by: Marek Behún Cc: Bartosz Golaszewski

[PATCH leds v2 08/50] leds: various: use only available OF children

2020-09-17 Thread Marek Behún
. Signed-off-by: Marek Behún Cc: Andrew Lunn Cc: Andrey Utkin Cc: Baolin Wang Cc: Baolin Wang Cc: Benjamin Herrenschmidt Cc: Christian Mauderer Cc: Chunyan Zhang Cc: Dan Murphy Cc: David Rivshin Cc: Haojian Zhuang Cc: H. Nikolaus Schaller Cc: Michael Ellerman Cc: Milo Kim Cc: NeilBrown Cc

[PATCH leds v2 12/50] leds: bcm6328: cosmetic: use reverse christmas tree

2020-09-17 Thread Marek Behún
Only a cosmetic change: use reverse christmas tree variables declaration. Signed-off-by: Marek Behún Cc: Álvaro Fernández Rojas Cc: Kevin Cernekee Cc: Jaedon Shin --- drivers/leds/leds-bcm6328.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers

[PATCH leds v2 06/50] leds: various: use dev_of_node(dev) instead of dev->of_node

2020-09-17 Thread Marek Behún
The dev_of_node function should be preferred. Signed-off-by: Marek Behún Cc: Orson Zhai Cc: Baolin Wang Cc: Chunyan Zhang Cc: Sean Wang Cc: Matthias Brugger Cc: Riku Voipio --- drivers/leds/leds-88pm860x.c | 4 ++-- drivers/leds/leds-aat1290.c | 2 +- drivers/leds/leds-an30259a.c

[PATCH leds v2 11/50] leds: bcm6328, bcm6358: use struct led_init_data when registering

2020-09-17 Thread Marek Behún
By using struct led_init_data when registering we do not need to parse `label` DT property. Moreover `label` is deprecated and if it is not present but `color` and `function` are, LED core will compose a name from these properties instead. Signed-off-by: Marek Behún Cc: Álvaro Fernández Rojas

[PATCH leds v2 13/50] leds: bcm6358: cosmetic: use reverse christmas tree

2020-09-17 Thread Marek Behún
Only a cosmetic change: use reverse christmas tree variables declaration. Signed-off-by: Marek Behún Cc: Álvaro Fernández Rojas Cc: Kevin Cernekee Cc: Jaedon Shin --- drivers/leds/leds-bcm6358.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/leds/leds

[PATCH leds v2 32/50] leds: lm36274: cosmetic: rename lm36274_data to chip

2020-09-17 Thread Marek Behún
Rename this variable so that it is easier to read and easier to write in 80 columns. Signed-off-by: Marek Behún Cc: Dan Murphy --- drivers/leds/leds-lm36274.c | 73 ++--- 1 file changed, 35 insertions(+), 38 deletions(-) diff --git a/drivers/leds/leds-lm36274.c

[PATCH leds v2 19/50] leds: mt6323: cosmetic change: use helper variable

2020-09-17 Thread Marek Behún
Use helper variable dev instead of always writing >dev. Signed-off-by: Marek Behún Cc: Sean Wang Cc: John Crispin Cc: Ryder Lee --- drivers/leds/leds-mt6323.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/leds/leds-mt6323.c b/drivers/leds/leds-mt632

[PATCH leds v2 05/50] leds: various: guard of_match_table member value with of_match_ptr

2020-09-17 Thread Marek Behún
Change .of_match_table = xxx, to .of_match_table = of_match_ptr(xxx), in various drivers. This should be standard even for drivers that depend on OF. Signed-off-by: Marek Behún Cc: Sakari Ailus Cc: Bartosz Golaszewski Cc: Sean Wang Cc: Matthias Brugger Cc: Michael Ellerman Cc: Benjamin

[PATCH leds v2 24/50] leds: is31fl32xx: use struct led_init_data when registering

2020-09-17 Thread Marek Behún
By using struct led_init_data when registering we do not need to parse `label` DT property. Moreover `label` is deprecated and if it is not present but `color` and `function` are, LED core will compose a name from these properties instead. Signed-off-by: Marek Behún Cc: H. Nikolaus Schaller Cc

[PATCH leds v2 15/50] leds: lm3697: cosmetic change: use helper variable, reverse christmas tree

2020-09-17 Thread Marek Behún
Use helper variable dev instead of always writing >dev, or >client->dev, or even >priv->client->dev. With one more line moved reverse christmas tree is also achieved. Signed-off-by: Marek Behún Cc: Dan Murphy --- drivers/leds/leds-lm3697.c | 75 ++--

[PATCH leds v2 10/50] leds: bcm6328, bcm6358: use devres LED registering function

2020-09-17 Thread Marek Behún
These two drivers do not provide remove method and use devres for allocation of other resources, yet they use led_classdev_register instead of the devres variant, devm_led_classdev_register. Fix this. Signed-off-by: Marek Behún Cc: Álvaro Fernández Rojas Cc: Kevin Cernekee Cc: Jaedon Shin

[PATCH leds v2 18/50] leds: mt6323: use struct led_init_data when registering

2020-09-17 Thread Marek Behún
not need to set the of_node member of the newly created LED classdev. Signed-off-by: Marek Behún Cc: Sean Wang Cc: John Crispin Cc: Ryder Lee --- drivers/leds/leds-mt6323.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/leds/leds-mt6323.c b/drivers/leds/leds

[PATCH leds v2 30/50] leds: is31fl319x: use struct led_init_data when registering

2020-09-17 Thread Marek Behún
By using struct led_init_data when registering we do not need to parse `label` DT property. Moreover `label` is deprecated and if it is not present but `color` and `function` are, LED core will compose a name from these properties instead. Signed-off-by: Marek Behún Cc: H. Nikolaus Schaller Cc

[PATCH leds v2 31/50] leds: lm36274: use devres LED registering function

2020-09-17 Thread Marek Behún
By using devres version of LED registering function we can remove the .remove method from this driver. Signed-off-by: Marek Behún Cc: Dan Murphy --- drivers/leds/leds-lm36274.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/leds/leds-lm36274.c b

[PATCH leds v2 35/50] leds: lm36274: do not set chip settings in DT parsing function

2020-09-17 Thread Marek Behún
These settings are not parsed from DT and therefore semantically should not be set in function with a name lm36274_parse_dt. Signed-off-by: Marek Behún Cc: Dan Murphy --- drivers/leds/leds-lm36274.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers

[PATCH leds v2 21/50] leds: pm8058: cosmetic change: use helper variable

2020-09-17 Thread Marek Behún
Use helper variable dev instead of always writing >dev. Signed-off-by: Marek Behún Cc: Linus Walleij Cc: Bjorn Andersson --- drivers/leds/leds-pm8058.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/leds/leds-pm8058.c b/drivers/leds/l

[PATCH leds v2 28/50] leds: is31fl319x: refactor to register LEDs while parsing DT

2020-09-17 Thread Marek Behún
Refactor the code so that LEDs are registered while device tree is being parsed. Signed-off-by: Marek Behún Cc: H. Nikolaus Schaller Cc: Grant Feng --- drivers/leds/leds-is31fl319x.c | 174 ++--- 1 file changed, 76 insertions(+), 98 deletions(-) diff --git

[PATCH leds v2 22/50] leds: pm8058: cosmetic change: no need to return in if guard

2020-09-17 Thread Marek Behún
We can return the last ret value. Signed-off-by: Marek Behún Cc: Linus Walleij Cc: Bjorn Andersson --- drivers/leds/leds-pm8058.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/leds/leds-pm8058.c b/drivers/leds/leds-pm8058.c index 70b4d06488fec

[PATCH leds v2 36/50] leds: ns2: use devres LED registering function

2020-09-17 Thread Marek Behún
By using devres version of LED registering function we can remove the .remove method from this driver. The probe method also gets simpler. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij --- drivers/leds/leds-ns2.c

[PATCH leds v2 17/50] leds: max77650: use reverse christmas tree

2020-09-17 Thread Marek Behún
Only a cosmetic change: use reverse christmas tree variables declaration. Signed-off-by: Marek Behún Cc: Bartosz Golaszewski --- drivers/leds/leds-max77650.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/leds/leds-max77650.c b/drivers/leds/leds-max77650.c index

[PATCH leds v2 37/50] leds: ns2: alloc simple array instead of struct ns2_led_priv

2020-09-17 Thread Marek Behún
Since .remove method is not needed now that we use devres, there is no need to remember the number of LEDs in struct ns2_led_priv. Alloc simple array of ns2_led_data structs. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus

[PATCH leds v2 29/50] leds: is31fl319x: cosmetic: use reverse christmas tree

2020-09-17 Thread Marek Behún
Only a cosmetic change: use reverse christmas tree variables declaration. Signed-off-by: Marek Behún Cc: H. Nikolaus Schaller Cc: Grant Feng --- drivers/leds/leds-is31fl319x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/leds/leds-is31fl319x.c b/drivers

[PATCH leds v2 43/50] leds: ns2: cosmetic change

2020-09-17 Thread Marek Behún
Return directly instead of setting result and breaking. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij --- drivers/leds/leds-ns2.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH leds v2 33/50] leds: lm36274: don't iterate through children since there is only one

2020-09-17 Thread Marek Behún
Do not use device_for_each_child_node. Since this driver works only with once child node present, use device_get_next_child_node instead. This also saves one level of indentation. Signed-off-by: Marek Behún Cc: Dan Murphy --- drivers/leds/leds-lm36274.c | 50

[PATCH leds v2 46/50] leds: ns2: remove unneeded variable

2020-09-17 Thread Marek Behún
No need to use variable found, we can determine whether the mode was found by comparing iterator variable to its limit. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij --- drivers/leds/leds-ns2.c | 7 ++- 1 file

[PATCH leds v2 42/50] leds: ns2: cosmetic variable rename

2020-09-17 Thread Marek Behún
Rename variable led_dat to led in various functions. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij --- drivers/leds/leds-ns2.c | 103 ++-- 1 file changed, 47 insertions(+), 56

[PATCH leds v2 40/50] leds: ns2: use devres API for getting GPIO descriptors

2020-09-17 Thread Marek Behún
This drivers leaks GPIO descriptors on driver removal. Use devres API function devm_gpiod_get_from_of_node instead of gpiod_get_from_of_node to avoid this. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij --- drivers

[PATCH leds v2 27/50] leds: is31fl319x: don't store audio gain value, simply set it

2020-09-17 Thread Marek Behún
Since this value is only used in device probe, don't store it in private structure. Simply parse the value and set it. Signed-off-by: Marek Behún Cc: H. Nikolaus Schaller Cc: Grant Feng --- drivers/leds/leds-is31fl319x.c | 24 1 file changed, 16 insertions(+), 8

[PATCH leds v2 39/50] leds: ns2: move parsing of one LED into separate function

2020-09-17 Thread Marek Behún
Move parsing of DT properties of one LED into separate function. This saves indentation level and is nicer to read. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij --- drivers/leds/leds-ns2.c | 120

[PATCH leds v2 44/50] leds: ns2: cosmetic change: use helper variable

2020-09-17 Thread Marek Behún
Use helper variable dev instead of always writing >dev. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij --- drivers/leds/leds-ns2.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --

[PATCH leds v2 23/50] leds: pm8058: cosmetic: use reverse christmas tree

2020-09-17 Thread Marek Behún
Only a cosmetic change: use reverse christmas tree variables declaration. Signed-off-by: Marek Behún Cc: Linus Walleij Cc: Bjorn Andersson --- drivers/leds/leds-pm8058.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/leds/leds-pm8058.c b/drivers/leds/leds

[PATCH leds v2 48/50] leds: ns2: reorder headers alphabetically

2020-09-17 Thread Marek Behún
Reorder #includes alphabetically. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij --- drivers/leds/leds-ns2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/leds/leds-ns2.c b

[PATCH leds v2 49/50] leds: ns2: use struct led_init_data when registering

2020-09-17 Thread Marek Behún
By using struct led_init_data when registering we do not need to parse `label` DT property. Moreover `label` is deprecated and if it is not present but `color` and `function` are, LED core will compose a name from these properties instead. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon

[PATCH leds v2 45/50] leds: ns2: register LED immediately after parsing DT properties

2020-09-17 Thread Marek Behún
Register each LED immediately after parsing OF properties. This simplifies the driver. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij --- drivers/leds/leds-ns2.c | 143 +++- 1

[PATCH leds v2 41/50] leds: ns2: cosmetic structure rename

2020-09-17 Thread Marek Behún
Rename structures: ns2_led -> ns2_led_of_one ns2_led_data -> ns2_led. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij --- drivers/leds/leds-ns2.c | 34 +- 1 file chang

[PATCH leds v2 20/50] leds: pm8058: use struct led_init_data when registering

2020-09-17 Thread Marek Behún
By using struct led_init_data when registering we do not need to parse `label` DT property. Moreover `label` is deprecated and if it is not present but `color` and `function` are, LED core will compose a name from these properties instead. Signed-off-by: Marek Behún Cc: Linus Walleij Cc: Bjorn

[PATCH leds v2 38/50] leds: ns2: support OF probing only, forget platdata

2020-09-17 Thread Marek Behún
evice tree, change the code to work with device tree only. As Linus Walleij wrote, the device tree should be the preferred way forward anyway. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij --- drivers/leds/leds-

[PATCH leds v2 00/50] Start moving parsing of `linux,default-trigger` to LED core (a cleanup of LED drivers)

2020-09-17 Thread Marek Behún
: "Uwe Kleine-König" Cc: Vasant Hegde Cc: Vincent Donnefort Cc: Xiaotong Lu Marek Behún (50): leds: various: compile if COMPILE_TEST=y leds: ip30: compile if COMPILE_TEST=y leds: fsg: compile if COMPILE_TEST=y leds: various: use device_get_match_data leds: various: guard of_m

[PATCH leds v2 02/50] leds: ip30: compile if COMPILE_TEST=y

2020-09-17 Thread Marek Behún
This driver can be compiled on other platforms with small change if COMPILE_TEST=y. Signed-off-by: Marek Behún Cc: Pavel Machek Cc: Dan Murphy Cc: Thomas Bogendoerfer --- drivers/leds/Kconfig | 2 +- drivers/leds/leds-ip30.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff

[PATCH leds v2 50/50] leds: parse linux,default-trigger DT property in LED core

2020-09-17 Thread Marek Behún
-by: Marek Behún --- drivers/leds/led-class.c | 5 + drivers/leds/leds-an30259a.c | 3 --- drivers/leds/leds-aw2013.c | 3 --- drivers/leds/leds-bcm6328.c | 4 drivers/leds/leds-bcm6358.c | 4 drivers/leds/leds-cr0014114.c| 3 --- drivers/leds/leds-el15203000

[PATCH leds v2 34/50] leds: lm36274: use struct led_init_data when registering

2020-09-17 Thread Marek Behún
, the code composed name for the LED in the form "parent_name::" For backwards compatibility we therefore set init_data->default_label = ":"; so that the LED will not get a different name if `label` property is not present, nor are `color` and `function`. Signed-off-by: Mare

[PATCH leds v2 26/50] leds: is31fl319x: don't store shutdown gpio descriptor

2020-09-17 Thread Marek Behún
Since the shutdown gpio descriptor is only accessed in device probe method there is no need to store it in the private structure. Signed-off-by: Marek Behún Cc: H. Nikolaus Schaller Cc: Grant Feng --- drivers/leds/leds-is31fl319x.c | 31 +++ 1 file changed, 15

[PATCH leds v2 47/50] leds: ns2: cosmetic: use reverse christmas tree

2020-09-17 Thread Marek Behún
Only a cosmetic change: use reverse christmas tree variables declaration. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij --- drivers/leds/leds-ns2.c | 16 ++-- 1 file changed, 10 insertions(+), 6

[PATCH leds v2 14/50] leds: lm3697: use struct led_init_data when registering

2020-09-17 Thread Marek Behún
, the code composed name for the LED in the form "parent_name::" For backwards compatibility we therefore set init_data->default_label = ":"; so that the LED will not get a different name if `label` property is not present. Signed-off-by: Marek Behún Cc: Dan Murphy --- dri

[PATCH leds v2 04/50] leds: various: use device_get_match_data

2020-09-17 Thread Marek Behún
Simply use device_get_match_data instead of matching against the match table again. Signed-off-by: Marek Behún Cc: H. Nikolaus Schaller Cc: David Rivshin Cc: Sebastian Reichel Cc: Christian Mauderer Cc: Andrew Lunn --- drivers/leds/leds-cpcap.c | 7 +-- drivers/leds/leds

[PATCH leds v2 25/50] leds: is31fl319x: compute aggregated max current separately

2020-09-17 Thread Marek Behún
Parse `led-max-current` property of child nodes and compute aggregated value in a separate function. The controller cannot set this value separately for every LED, so there is no need to store this value for every LED. Signed-off-by: Marek Behún Cc: H. Nikolaus Schaller --- drivers/leds/leds

[PATCH leds v2 01/50] leds: various: compile if COMPILE_TEST=y

2020-09-17 Thread Marek Behún
These drivers can be compiled without modification when COMPILE_TEST=y: cobalt-qube, cobalt-raq, netxbig, ns2 and s3c24xx Signed-off-by: Marek Behún Cc: Pavel Machek Cc: Dan Murphy --- drivers/leds/Kconfig | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH mfd] mfd: asic3: build if COMPILE_TEST=y

2020-09-17 Thread Marek Behún
Build this driver on another platforms if COMPILE_TEST=y. Another drivers may depend on this, for example leds-asic3. Signed-off-by: Marek Behún Cc: Lee Jones Cc: Pavel Machek Cc: Phil Blundell Cc: Samuel Ortiz --- drivers/mfd/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[PATCH leds v1 10/10] leds: ns2: refactor and use struct led_init_data

2020-09-16 Thread Marek Behún
MPILE_TEST is enabled. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij --- drivers/leds/Kconfig| 2 +- drivers/leds/leds-ns2.c | 361 2 files changed, 112 insertions(+), 251

[PATCH leds v1 05/10] leds: mt6323: use struct led_init_data when registering

2020-09-16 Thread Marek Behún
By using struct led_init_data when registering we do not need to parse `label` DT property nor `linux,default-trigger` property. Signed-off-by: Marek Behún Cc: Sean Wang Cc: John Crispin Cc: Ryder Lee --- drivers/leds/leds-mt6323.c | 13 ++--- 1 file changed, 6 insertions(+), 7

[PATCH leds v1 09/10] leds: lm36274: use struct led_init_data when registering

2020-09-16 Thread Marek Behún
"; so that the LED will not get a different name if `label` property is not present. Signed-off-by: Marek Behún Cc: Dan Murphy --- drivers/leds/leds-lm36274.c | 100 ++-- 1 file changed, 49 insertions(+), 51 deletions(-) diff --git a/drivers/leds/leds-lm36274.c b/dr

[PATCH leds v1 06/10] leds: pm8058: use struct led_init_data when registering

2020-09-16 Thread Marek Behún
By using struct led_init_data when registering we do not need to parse `label` DT property nor `linux,default-trigger` property. Signed-off-by: Marek Behún Cc: Linus Walleij Cc: Bjorn Andersson --- drivers/leds/leds-pm8058.c | 38 +++--- 1 file changed, 19

[PATCH leds v1 02/10] leds: bcm6328, bcm6358: use struct led_init_data when registering

2020-09-16 Thread Marek Behún
By using struct led_init_data when registering we do not need to parse `label` DT property nor `linux,default-trigger` property. Signed-off-by: Marek Behún Cc: Álvaro Fernández Rojas Cc: Kevin Cernekee Cc: Jaedon Shin --- drivers/leds/leds-bcm6328.c | 10 -- drivers/leds/leds-bcm6358

[PATCH leds v1 08/10] leds: is31fl319x: use struct led_init_data when registering

2020-09-16 Thread Marek Behún
By using struct led_init_data when registering we do not need to parse `label` DT property nor `linux,default-trigger` property. This driver needed bigger refactor because it first parsed DT for all LEDs and only after that started registering them. Signed-off-by: Marek Behún Cc: H. Nikolaus

[PATCH leds v1 00/10] Start moving parsing of `linux,default-trigger` to LED core (a cleanup of LED drivers)

2020-09-16 Thread Marek Behún
: Thomas Petazzoni Cc: Vincent Donnefort Marek Behún (10): leds: parse linux,default-trigger DT property in LED core leds: bcm6328, bcm6358: use struct led_init_data when registering leds: lm3697: use struct led_init_data when registering leds: max77650: use struct led_init_data when

[PATCH leds v1 07/10] leds: is31fl32xx: use struct led_init_data when registering

2020-09-16 Thread Marek Behún
By using struct led_init_data when registering we do not need to parse `label` DT property nor `linux,default-trigger` property. This driver needed small refactoring for this to work nicely. Signed-off-by: Marek Behún Cc: H. Nikolaus Schaller Cc: David Rivshin --- drivers/leds/leds

[PATCH leds v1 03/10] leds: lm3697: use struct led_init_data when registering

2020-09-16 Thread Marek Behún
refore set init_data->default_label = ":"; so that the LED will not get a different name if `label` property is not present. Signed-off-by: Marek Behún Cc: Dan Murphy --- drivers/leds/leds-lm3697.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --

[PATCH leds v1 04/10] leds: max77650: use struct led_init_data when registering

2020-09-16 Thread Marek Behún
refore set init_data->default_label = ":"; so that the LED will not get a different name if `label` property is not present. Signed-off-by: Marek Behún Cc: Bartosz Golaszewski --- drivers/leds/leds-max77650.c | 24 1 file changed, 8 insertions(+), 16 deletions(-

[PATCH leds v1 01/10] leds: parse linux,default-trigger DT property in LED core

2020-09-16 Thread Marek Behún
registering function. Signed-off-by: Marek Behún --- drivers/leds/led-class.c | 5 + drivers/leds/leds-an30259a.c | 3 --- drivers/leds/leds-aw2013.c | 3 --- drivers/leds/leds-cr0014114.c| 3 --- drivers/leds/leds-el15203000.c | 3 --- drivers/leds/leds-gpio.c

[PATCH leds + devicetree v2 0/2] Parse DT property `trigger-sources` for netdev LED trigger

2020-09-15 Thread Marek Behún
s not yet implemented: led { color = ; function = LED_FUNCTION_LINK, LED_FUNCTION_ACTIVITY; trigger-sources = <>; }; Marek Marek Behún (2): leds: trigger: add trigger sources validating method and helper functions leds: trigger: netdev: parse `trigger-sources` from device

[PATCH leds + devicetree v2 2/2] leds: trigger: netdev: parse `trigger-sources` from device tree

2020-09-15 Thread Marek Behún
t;xyz"; #trigger-source-cells = <0>; }; led { color = ; function = LED_FUNCTION_LINK; trigger-sources = <>; }; Signed-off-by: Marek Behún Cc: Rob Herring Cc: devicet...@vger.kernel.org --- drivers/leds/trigger/ledtrig-netdev.c | 80 ++

[PATCH leds + devicetree v2 1/2] leds: trigger: add trigger sources validating method and helper functions

2020-09-15 Thread Marek Behún
` refers to a device compatible with the trigger. For this two new helper functions, of_led_count_trigger_sources and of_led_get_trigger_source, are implemented. Signed-off-by: Marek Behún Cc: Rob Herring Cc: devicet...@vger.kernel.org --- drivers/leds/led-triggers.c | 68

[PATCH leds + devicetree v1 0/2] Parse DT property `trigger-sources` for netdev LED trigger

2020-09-14 Thread Marek Behún
have the `function` property. Multiple modes can be achieved by string array, but this is not yet implemented: led { color = ; function = LED_FUNCTION_LINK, LED_FUNCTION_ACTIVITY; trigger-sources = <>; }; Marek Marek Behún (2): leds: trigger: add DT `trigger-source` validat

[PATCH leds + devicetree v1 1/2] leds: trigger: add DT `trigger-sources` validating method

2020-09-14 Thread Marek Behún
` refers to a device compatible with the trigger. Signed-off-by: Marek Behún Cc: Rob Herring Cc: devicet...@vger.kernel.org --- drivers/leds/led-triggers.c | 26 ++ include/linux/leds.h| 6 ++ 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/drivers

  1   2   >