Re: [PATCH] staging: mt7621-pci: pci-mt7621: Remove unneeded variable err

2019-05-23 Thread Sergio Paracuellos
resources(dev, res); > - if (err < 0) > - return err; > - > - return 0; > + return devm_request_pci_bus_resources(dev, res); > } > In the patch title, the "mt7621-pci" is repeated twice. With that changed: Reviewed-by: Sergio Paracuellos >

Re: staging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function

2019-05-26 Thread Sergio Paracuellos
Hi Greg, On Mon, May 27, 2019 at 6:37 AM Greg Ungerer wrote: > > Hi Sergio, > > On 24/5/19 3:35 pm, Sergio Paracuellos wrote: > > On Fri, May 24, 2019 at 2:35 AM Greg Ungerer wrote: > >> On 23/5/19 3:26 pm, Sergio Paracuellos wrote: > >>> On Thu, May

Re: staging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function

2019-05-27 Thread Sergio Paracuellos
Hi Greg, On Mon, May 27, 2019 at 9:29 AM Greg Ungerer wrote: > > Hi Sergio, > > On 27/5/19 4:35 pm, Sergio Paracuellos wrote: > > On Mon, May 27, 2019 at 6:37 AM Greg Ungerer wrote: > >> On 24/5/19 3:35 pm, Sergio Paracuellos wrote: > >>> On Fri, May

Re: staging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function

2019-05-29 Thread Sergio Paracuellos
Hi Greg, On Wed, May 29, 2019 at 9:11 AM Greg Ungerer wrote: > > Hi Sergio, > > On 27/5/19 6:02 pm, Sergio Paracuellos wrote: > > On Mon, May 27, 2019 at 9:29 AM Greg Ungerer wrote: > >> On 27/5/19 4:35 pm, Sergio Paracuellos wrote: > >>> On Mon, May

Re: staging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function

2019-05-31 Thread Sergio Paracuellos
Hi Greg, On Thu, May 30, 2019 at 3:46 AM Greg Ungerer wrote: > > Hi Sergio, > > On 30/5/19 10:44 am, Greg Ungerer wrote: > > On 29/5/19 6:08 pm, Sergio Paracuellos wrote: > > [snip] > >> I have added gpio consumer stuff and reorder a bit the code to be more

Re: staging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function

2019-06-02 Thread Sergio Paracuellos
Hi Greg, No luck for us also today :-( On Mon, Jun 3, 2019 at 3:26 AM Greg Ungerer wrote: > > Hi Sergio, > > On 31/5/19 10:37 pm, Sergio Paracuellos wrote: > > On Thu, May 30, 2019 at 3:46 AM Greg Ungerer wrote: > >> On 30/5/19 10:44 am, Greg Ungerer wrote: >

Re: staging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function

2019-06-03 Thread Sergio Paracuellos
Hi Greg, On Mon, Jun 3, 2019 at 2:32 PM Greg Ungerer wrote: > > Hi Sergio, > > On 3/6/19 3:34 pm, Sergio Paracuellos wrote: > > On Mon, Jun 3, 2019 at 3:26 AM Greg Ungerer wrote: > >> On 31/5/19 10:37 pm, Sergio Paracuellos wrote: > >>> On Thu, May

Re: staging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function

2019-06-03 Thread Sergio Paracuellos
Hi Greg, On Tue, Jun 4, 2019 at 3:31 AM Greg Ungerer wrote: > > Hi Sergio, > > On 4/6/19 5:59 am, Sergio Paracuellos wrote: > > On Mon, Jun 3, 2019 at 2:32 PM Greg Ungerer wrote: > >> On 3/6/19 3:34 pm, Sergio Paracuellos wrote: > >>> On Mon, Jun

Re: staging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function

2019-06-04 Thread Sergio Paracuellos
Hi Greg, Thanks for the traces. On Tue, Jun 4, 2019 at 9:14 AM Greg Ungerer wrote: > > Hi Sergio, > > On 4/6/19 3:06 pm, Sergio Paracuellos wrote: > > On Tue, Jun 4, 2019 at 3:31 AM Greg Ungerer wrote: > >> On 4/6/19 5:59 am, Sergio Paracuellos wrote: > >>&

Re: staging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function

2019-06-04 Thread Sergio Paracuellos
Hi Greg, On Wed, Jun 5, 2019 at 6:01 AM Greg Ungerer wrote: > > Hi Sergio, > > On 4/6/19 7:36 pm, Sergio Paracuellos wrote: > > On Tue, Jun 4, 2019 at 9:14 AM Greg Ungerer wrote: > >> On 4/6/19 3:06 pm, Sergio Paracuellos wrote: > >>> On Tue, Jun

Re: staging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function

2019-06-05 Thread Sergio Paracuellos
Hi Greg, On Wed, Jun 5, 2019 at 7:47 AM Sergio Paracuellos wrote: > > Hi Greg, > > On Wed, Jun 5, 2019 at 6:01 AM Greg Ungerer wrote: > > > > Hi Sergio, > > > > On 4/6/19 7:36 pm, Sergio Paracuellos wrote: > > > On Tue, Jun 4, 2019 at 9:14 AM

Re: staging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function

2019-06-05 Thread Sergio Paracuellos
Hi Greg, On Thu, Jun 6, 2019 at 5:06 AM Greg Ungerer wrote: > > Hi Sergio, > > On 5/6/19 10:28 pm, Sergio Paracuellos wrote: > > On Wed, Jun 5, 2019 at 7:47 AM Sergio Paracuellos > > wrote: > >> On Wed, Jun 5, 2019 at 6:01 AM Greg Ungerer wrote: > >&

Re: staging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function

2019-06-18 Thread Sergio Paracuellos
changes something? If it is not a reset issue it might be something with the boot order, according to the driver changes with properly working version. > Regards > Gregç Best regards, Sergio Paracuellos > > > > > I've put all the boot message logs (for both successe

[PATCH 0/4] staging: mt7621-pci: Use gpio perst instead builtin behaviour

2019-06-19 Thread Sergio Paracuellos
/2019-June/134947.html Sergio Paracuellos (4): staging: mt7621-pci: fix two messages in driver code staging: mt7621-pci: use gpio perst instead of builtin behaviour staging: mt7621-dts: add gpio perst to pcie bindings node staging: mt7621-pci: dt-bindings: add perst-gpio to sample bin

[PATCH 4/4] staging: mt7621-pci: dt-bindings: add perst-gpio to sample bindings

2019-06-19 Thread Sergio Paracuellos
Both driver and device tree have been updated to use GPIO perst. Update bindings documentation also. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/mediatek,mt7621-pci.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/mt7621-pci/mediatek,mt7621-pci.txt

[PATCH 3/4] staging: mt7621-dts: add gpio perst to pcie bindings node

2019-06-19 Thread Sergio Paracuellos
Driver has been changed to use perts gpio reset instead of perst builtin behaviour. Update device tree accordly. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-dts/mt7621.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/mt7621-dts/mt7621.dtsi b/drivers

[PATCH 1/4] staging: mt7621-pci: fix two messages in driver code

2019-06-19 Thread Sergio Paracuellos
There are two messages in driver code which are not correct. Fix both of them to clarify boot runs. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b

[PATCH 2/4] staging: mt7621-pci: use gpio perst instead of builtin behaviour

2019-06-19 Thread Sergio Paracuellos
Some boards seems to ignore the PERST builtin behaviour to properly perform a pcie line reset. Use gpio PERST behaviour instead which seems to be more common. Fixes: bd1a05bd87ad ("staging: mt7621-pci: use PERST_N instead of gpio control") Signed-off-by: Sergio Paracuellos --- drive

Re: [PATCH 0/4] staging: mt7621-pci: Use gpio perst instead builtin behaviour

2019-06-19 Thread Sergio Paracuellos
Hi Greg, On Thu, Jun 20, 2019 at 2:40 AM Greg Ungerer wrote: > > Hi Sergio, > > On 19/6/19 5:44 pm, Sergio Paracuellos wrote: > > Some boards seems to ignore builtin perst configuration and use gpio > > instead. This approach seems to be more common. Hence, update the dr

Re: [PATCH 0/4] staging: mt7621-pci: Use gpio perst instead builtin behaviour

2019-06-20 Thread Sergio Paracuellos
re confortable for you. > > thanks, > > greg k-h Best regards, Sergio Paracuellos ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH 1/4] staging: mt7621-pci: disable pcie port clock if there is no pcie link

2019-06-20 Thread Sergio Paracuellos
When there is no pcie link detected we have to properly disable the port pcie clock. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci

[PATCH 0/4] staging: mt7621-pci: Handle minor issues

2019-06-20 Thread Sergio Paracuellos
'mt7621_pcie_init_port' error path. * Move driver to init in a later stage using 'module_init' instead of using 'arch_initcall'. Patches are only compile-tested. It would be awasome to be tested before applied them (mainly the change to 'module_init' stuff). Hope this help

[PATCH 2/4] staging: mt7621-pci: add phy exit call if phy_power_on call fails

2019-06-20 Thread Sergio Paracuellos
Add missing call to 'phy_exit' function if the phy_power_on call fails. With this call added the error path is properly handled. Fixes: 07420a02b003 ("staging: mt7621-pci: use gpio perst instead of builtin behaviour") Signed-off-by: Sergio Paracuellos --- drivers/staging/m

[PATCH 4/4] staging: mt7621-pci: use 'module_init' instead of 'arch_initcall'

2019-06-20 Thread Sergio Paracuellos
This driver has dependencies on mt7621-gpio and mt7621-pci-phy which are init in later stages. Hence, when this driver is probed it is always returning 'EPROBE_DEFER' and being initialized afterwards. Use function 'module_init' to just initialize later. Signed-off-by

[PATCH 3/4] staging: mt7621-pci-phy: remove disable clock from the phy exit function

2019-06-20 Thread Sergio Paracuellos
The clock which has been used here is not about the phy but the pcie port. It has been properly handled into host pcie driver code. Hence, remove it from here which is the correct thing to do. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c | 8 1

Re: [PATCH 0/4] staging: mt7621-pci: Handle minor issues

2019-06-21 Thread Sergio Paracuellos
Hi Greg, On Fri, Jun 21, 2019 at 2:35 PM Greg Ungerer wrote: > > Hi Sergio, > > On 21/6/19 4:15 pm, Sergio Paracuellos wrote: > > This patch series properly handle minor issues in this driver. These are: > > * Disable pcie port clock on pci dirver instead of doing it

Re: [PATCH 0/4] staging: mt7621-pci: Handle minor issues

2019-06-22 Thread Sergio Paracuellos
Hi Brett, On Sun, Jun 23, 2019 at 4:15 AM Brett Neumeier wrote: > > On Fri, Jun 21, 2019 at 7:35 AM Greg Ungerer wrote: > > > > Hi Sergio, > > > > On 21/6/19 4:15 pm, Sergio Paracuellos wrote: > > > This patch series properly handle minor issues in this

Re: [PATCH 0/4] staging: mt7621-pci: Handle minor issues

2019-06-24 Thread Sergio Paracuellos
Hi Greg, On Tue, Jun 25, 2019 at 7:10 AM Greg Ungerer wrote: > > Hi Sergio, > > On 23/6/19 3:58 pm, Sergio Paracuellos wrote: > > On Sun, Jun 23, 2019 at 4:15 AM Brett Neumeier wrote: > >> On Fri, Jun 21, 2019 at 7:35 AM Greg Ungerer wrote: > >>> On 21

Re: [PATCH 0/4] staging: mt7621-pci: Handle minor issues

2019-06-25 Thread Sergio Paracuellos
Hi Greg, On Tue, Jun 25, 2019 at 7:18 AM Sergio Paracuellos wrote: > > Hi Greg, > > On Tue, Jun 25, 2019 at 7:10 AM Greg Ungerer wrote: > > > > Hi Sergio, > > > > On 23/6/19 3:58 pm, Sergio Paracuellos wrote: > > > On Sun, Jun 23, 2019 at 4:15 AM Bre

Re: [PATCH 0/4] staging: mt7621-pci: Handle minor issues

2019-06-26 Thread Sergio Paracuellos
Hi Greg, On Wed, Jun 26, 2019 at 5:31 AM Greg Ungerer wrote: > > Hi Sergio, > > On 25/6/19 10:47 pm, Sergio Paracuellos wrote: > > On Tue, Jun 25, 2019 at 7:18 AM Sergio Paracuellos > > wrote: > >> On Tue, Jun 25, 2019 at 7:10 AM Greg Ungerer wrote: > >&g

[PATCH] staging: mt7621-pci: fix PCIE_FTS_NUM_LO macro

2019-06-26 Thread Sergio Paracuellos
Add missing parenthesis to PCIE_FTS_NUM_LO macro to do the same it was being done in original code. Fixes: a4b2eb912bb1 ("staging: mt7621-pci: rewrite RC FTS configuration") Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 2 +- 1 file changed, 1 inser

Re: [PATCH 0/4] staging: mt7621-pci: Handle minor issues

2019-06-26 Thread Sergio Paracuellos
Hi Greg, On Wed, Jun 26, 2019 at 2:18 PM Greg Ungerer wrote: > > Hi Sergio, > > On 26/6/19 5:10 pm, Sergio Paracuellos wrote: > > On Wed, Jun 26, 2019 at 5:31 AM Greg Ungerer wrote: > >> On 25/6/19 10:47 pm, Sergio Paracuellos wrote: > >>> On Tue, Jun

Re: [PATCH 0/4] staging: mt7621-pci: Handle minor issues

2019-07-06 Thread Sergio Paracuellos
Hi Brett, On Fri, Jul 5, 2019 at 8:44 PM Brett Neumeier wrote: > > On Wed, Jun 26, 2019 at 7:45 AM Sergio Paracuellos > wrote: > > No problem, I also miss them rewritting code. That is bad :((. > > > BTW, I applied that on top of your other recent fixes (that ones >

Re: [PATCH] staging: mt7621-pci: Fix compiler error 'slot' may be used uninitialized

2019-07-06 Thread Sergio Paracuellos
ed++; > } > } > -- > 2.20.1 > I don't know what tree and branch are you using for this but this is kind of old code... You should use staging git tree, 'staging-next' branch for staging patches to avoid problems like this. Best regards, Sergio Paracuellos ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 0/4] staging: mt7621-pci: Handle minor issues

2019-07-06 Thread Sergio Paracuellos
Hi Brett, On Sat, Jul 6, 2019 at 3:43 PM Brett Neumeier wrote: > > On Sat, Jul 6, 2019 at 4:00 AM Sergio Paracuellos > wrote: > > > Out of curiosity, if it's not too complex an answer to go into, what's > > > the benefit of the staging-next driver? Is the

[PATCH] staging: mt7621-pci: avoid use 'err' local variable

2019-07-20 Thread Sergio Paracuellos
also returning zero on success. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c index 2e37fd136ab8..6b98827da57

[PATCH 01/13] staging: mt7621-pinctrl: avoid space after if condition

2018-06-28 Thread Sergio Paracuellos
Adding spaces between if condition and parenthesis are not needed at all and checkpatch script complains about them. Fix one in driver code. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH 00/13] staging: mt7621-pinctrl: some cleanups

2018-06-28 Thread Sergio Paracuellos
This patch series add remaining cleanups from previous series which had problems to applied from here: http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-June/121744.html Just send remaining patches in a new patch serie. Hope this helps. Best regards, Sergio Paracuellos

[PATCH 02/13] staging: mt7621-pinctrl: avoid lines over 80 chars

2018-06-28 Thread Sergio Paracuellos
This commit silence checkpatch warnings about lines which exceeds 80 chars. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 26 ++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/drivers/staging/mt7621-pinctrl

[PATCH 05/13] staging: mt7621-pinctrl: use tabs instead of spaces in some indentations

2018-06-28 Thread Sergio Paracuellos
Kernel coding style use tabs for indent code instead of spaces. Fix some places where spaces were being used silencing also checkpatch script complains. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

[PATCH 04/13] staging: mt7621-pinctrl: align function parameters in some functions

2018-06-28 Thread Sergio Paracuellos
Function parameters along the code has different alignment styles. Just unify all of them making style consistent. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 29 - 1 file changed, 14 insertions(+), 15 deletions(-) diff --git

[PATCH 03/13] staging: mt7621-pinctrl: replace seq_printf with seq_puts

2018-06-28 Thread Sergio Paracuellos
For a constant format without additional arguments, use seq_puts() instead of seq_printf() fixing also the following checkpatch.pl warning: 'Prefer seq_puts to seq_printf' Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 2 +- 1 file changed, 1

[PATCH 09/13] staging: mt7621-dts: use 'function' and 'group' for pinctrl bindings

2018-06-28 Thread Sergio Paracuellos
According to documentation 'pinctrl-bindings.txt' bindings 'group' and 'function' can be used directly. So replace all of them. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-dts/mt7621.dtsi | 48 +- 1 file changed,

[PATCH 08/13] staging: mt7621-pinctrl: make use of pinctrl_utils_reserve_map

2018-06-28 Thread Sergio Paracuellos
Function rt2880_pinctrl_dt_node_to_map was using 'kzalloc' to reserve map memory. There is a 'pinctrl_utils_reserve_map' to do this function. Just use it. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 12 +--- 1 file changed

[PATCH 07/13] staging: mt7621-pinctrl: replace uint8_t type with u8 for 'gpio' field

2018-06-28 Thread Sergio Paracuellos
Struct 'rt2880_priv' contains a field 'gpio' which is defined as uint8_t and should be defined with 'u8' which is preferred. Update some cast along the code related with this new change. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pinctrl/pinctr

[PATCH 10/13] staging: mt7621-pinctrl: refactor rt2880_pinctrl_dt_node_to_map function

2018-06-28 Thread Sergio Paracuellos
roups using 'of_property_for_each_string' calling 'pinctrl_utils_add_map_mux' function which is the same of the custom function in this driver code 'rt2880_pinctrl_dt_subnode_to_map' which is not needed anymore. Signed-off-by: Sergio Paracuellos --- drivers/staging/

[PATCH 06/13] staging: mt7621-pinctrl: make use of pinctrl_utils_free_map

2018-06-28 Thread Sergio Paracuellos
There was a custom 'rt2880_pinctrl_dt_free_map' function which it was doing the same as pinctrl_utils_free_map defined in 'pinctrl-utils.h' header file. Use it instead avoiding code duplications. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pinctrl/p

[PATCH 11/13] staging: mt7621-pinctrl: use ternary operator return in rt2880_get_group_name

2018-06-28 Thread Sergio Paracuellos
Trivial change to have only one return in 'rt2880_get_group_name' function using a ternary operator instead of an if statement and two returns. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 5 + 1 file changed, 1 insertion(+), 4 deletion

[PATCH 12/13] staging: mt7621-pinctrl: remove 'rt2880_pinctrl_pin_dbg_show' callback

2018-06-28 Thread Sergio Paracuellos
The debug information provided by this function does not make sense at all, so just remove it. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c b

[PATCH 13/13] staging: mt7621-pinctrl: replace core_initcall_sync with builtin_platform_driver

2018-06-28 Thread Sergio Paracuellos
We don't really need initialization of this at such an early stage. Just use builtin_platform_driver to initialize this driver. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dr

[PATCH v2 1/2] gpio: mediatek: add driver for MT7621

2018-06-29 Thread Sergio Paracuellos
Add driver support for gpio of MT7621 SoC. Signed-off-by: Sergio Paracuellos --- drivers/gpio/Kconfig | 8 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-mt7621.c | 320 + 3 files changed, 329 insertions(+) create mode 100644

[PATCH v2 2/2] dt-bindings: document gpio-mt7621 bindings

2018-06-29 Thread Sergio Paracuellos
Add a devicetree binding documentation for the mt7621 gpio. Signed-off-by: Sergio Paracuellos --- .../bindings/gpio/mediatek,mt7621-gpio.txt | 35 ++ 1 file changed, 35 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/mediatek,mt7621-gpio.txt

[PATCH v2 0/2] gpio: mediatek: driver for gpio chip in MT7621 SoC

2018-06-29 Thread Sergio Paracuellos
, Sergio Paracuellos Sergio Paracuellos (2): gpio: mediatek: add driver for MT7621 dt-bindings: document gpio-mt7621 bindings .../bindings/gpio/mediatek,mt7621-gpio.txt | 35 +++ drivers/gpio/Kconfig | 8 + drivers/gpio/Makefile

[PATCH v3 0/2] gpio: mediatek: driver for gpio chip in MT7621 SoC

2018-06-29 Thread Sergio Paracuellos
changes Hope this helps and thanks in advance. Best regards, Sergio Paracuellos Sergio Paracuellos (2): gpio: mediatek: add driver for MT7621 dt-bindings: document gpio-mt7621 bindings .../bindings/gpio/mediatek,mt7621-gpio.txt | 35 +++ drivers/gpio/Kconfig

[PATCH v3 1/2] gpio: mediatek: add driver for MT7621

2018-06-29 Thread Sergio Paracuellos
Add driver support for gpio of MT7621 SoC. Signed-off-by: Sergio Paracuellos --- drivers/gpio/Kconfig | 8 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-mt7621.c | 320 + 3 files changed, 329 insertions(+) create mode 100644

[PATCH v3 2/2] dt-bindings: document gpio-mt7621 bindings

2018-06-29 Thread Sergio Paracuellos
Add a devicetree binding documentation for the mt7621 gpio. Signed-off-by: Sergio Paracuellos --- .../bindings/gpio/mediatek,mt7621-gpio.txt | 35 ++ 1 file changed, 35 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/mediatek,mt7621-gpio.txt

Re: [PATCH v2 1/2] gpio: mediatek: add driver for MT7621

2018-06-29 Thread Sergio Paracuellos
sion. Last patch series was applied yesterday... Maybe you have not run against the updated tree? This patch fix them: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/commit/?h=staging-testing&id=bfb623c5b0935a2e4b5fe86eab79a37a37b67209 > > regards, > dan car

Re: [PATCH v2 1/2] gpio: mediatek: add driver for MT7621

2018-06-29 Thread Sergio Paracuellos
please drop us a note to > help improve the system] > > url: > https://github.com/0day-ci/linux/commits/Sergio-Paracuellos/gpio-mediatek-driver-for-gpio-chip-in-MT7621-SoC/20180629-225420 > base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git >

Re: [PATCH v2 1/2] gpio: mediatek: add driver for MT7621

2018-06-29 Thread Sergio Paracuellos
On Fri, Jun 29, 2018 at 6:52 PM, Sergio Paracuellos wrote: > On Fri, Jun 29, 2018 at 6:43 PM, kbuild test robot wrote: >> Hi Sergio, >> >> Thank you for the patch! Yet something to improve: >> >> [auto build test ERROR on gpio/for-next] >> [also buil

Re: [PATCH v5 18/18] staging: mt7621-gpio: avoid use banks in device tree

2018-06-29 Thread Sergio Paracuellos
On Sat, Jun 30, 2018 at 7:47 AM, NeilBrown wrote: > On Mon, Jun 18 2018, Sergio Paracuellos wrote: > >> Banks shouldn't be defined in DT if number of resources >> per bank is not variable. We actually know that this SoC >> has three banks so take that into account in

Re: [PATCH v2 1/2] gpio: mediatek: add driver for MT7621

2018-06-29 Thread Sergio Paracuellos
On Fri, Jun 29, 2018 at 2:43 PM, Sergio Paracuellos wrote: > Add driver support for gpio of MT7621 SoC. > > Signed-off-by: Sergio Paracuellos > --- > drivers/gpio/Kconfig | 8 ++ > drivers/gpio/Makefile | 1 + > drivers/gpi

Re: [PATCH v5 18/18] staging: mt7621-gpio: avoid use banks in device tree

2018-07-04 Thread Sergio Paracuellos
On Thu, Jul 05, 2018 at 10:51:39AM +1000, NeilBrown wrote: > On Sat, Jun 30 2018, Sergio Paracuellos wrote: > > > On Sat, Jun 30, 2018 at 7:47 AM, NeilBrown wrote: > >> On Mon, Jun 18 2018, Sergio Paracuellos wrote: > >> > >>> Banks shouldn't be

[PATCH 0/4] staging: mt7621-gpio: fix problem using one node in DT

2018-07-04 Thread Sergio Paracuellos
This series fix problem related with the last changes included to use only one node in the device tree and some gpio banks naming issues. Hope this helps. Best regards, Sergio Paracuellos Sergio Paracuellos (4): staging: mt7621-gpio: set irq chip name only once staging: mt7621-gpio: use

[PATCH 1/4] staging: mt7621-gpio: set irq chip name only once

2018-07-04 Thread Sergio Paracuellos
There is only one irq chip so set its name only once in driver probe function. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/gpio-mt7621.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c b/drivers/staging/mt7621

[PATCH 3/4] staging: mt7621-gpio: assign gpio chip custom changes after bgpio_init

2018-07-04 Thread Sergio Paracuellos
bgpio_init function set different data of the gpio chip, like the name. We want specific name for each bank so to get that not overwritten move all custom changes after the bgpio_init function call. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/gpio-mt7621.c | 7 --- 1

[PATCH 2/4] staging: mt7621-gpio: use custom xlate function

2018-07-04 Thread Sergio Paracuellos
The default gpio.of_xlate function assumes there is one gpio chip for each devicetree node. Device tree had changed to only use one node, which corresponds to 3 different gpio chips now. For that approach to work we need a custom xlate function. Signed-off-by: Sergio Paracuellos --- drivers

[PATCH 4/4] staging: mt7621-gpio: use devm_kasprintf to set gpio banks labels

2018-07-04 Thread Sergio Paracuellos
Instead of using a custom function to return desired name for gpio use the default assigned one and concat it '-bankN' suffix using devm_kasprintf kernel function. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/gpio-mt7621.c | 12 ++-- 1 file changed, 2

Re: [PATCH 0/4] staging: mt7621-gpio: fix problem using one node in DT

2018-07-04 Thread Sergio Paracuellos
On Thu, Jul 05, 2018 at 04:27:31PM +1000, NeilBrown wrote: > On Thu, Jul 05 2018, Sergio Paracuellos wrote: > > > This series fix problem related with the last changes included > > to use only one node in the device tree and some gpio banks > > naming issues. > > >

[PATCH v4 1/2] gpio: mediatek: add driver for MT7621

2018-07-05 Thread Sergio Paracuellos
Add driver support for gpio of MT7621 SoC. Signed-off-by: Sergio Paracuellos Reviewed-by: NeilBrown --- drivers/gpio/Kconfig | 8 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-mt7621.c | 331 + 3 files changed, 340 insertions

[PATCH v4 0/2] gpio: mediatek: driver for gpio chip in MT7621 SoC

2018-07-05 Thread Sergio Paracuellos
making it simple - Implement high and low level irqs - avoid include gpio.h - use builtin_platform_driver - add COMPILE_TEST - cleanups after this changes Hope this helps and thanks in advance. Best regards, Sergio Paracuellos Sergio Paracuellos (2): gpio: mediatek: add driver for MT7621

[PATCH v4 2/2] dt-bindings: document gpio-mt7621 bindings

2018-07-05 Thread Sergio Paracuellos
Add a devicetree binding documentation for the mt7621 gpio. Signed-off-by: Sergio Paracuellos Reviewed-by: NeilBrown --- .../bindings/gpio/mediatek,mt7621-gpio.txt | 35 ++ 1 file changed, 35 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio

[PATCH] staging: mt7621-pci: refactor pci related read and writes functions

2018-07-07 Thread Sergio Paracuellos
to easily obtain config address. Also to get pci base address a global 'mt7621_pci_base' variable has been included and initialized as a pointer to RALINK_PCI_BASE in driver probe function. With this changes LOC is clearly decreased and readability is increased. Signed-off-by

[PATCH v2 09/18] staging: mt7621-pci: minor refactor in duplicated code

2018-07-08 Thread Sergio Paracuellos
Use a for loop to check pci port N_FTS in each controller. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci

[PATCH v2 17/18] staging: mt7621-pci: factor out mt7621_pci_init_gpios function

2018-07-08 Thread Sergio Paracuellos
In driver probe function there are some ugly initialization to use gpios. Factor out to mt7621_pci_init_gpios function making use of readl and writel to read and write memory. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 35 +++-- 1

[PATCH v2 00/18] Some cleanups

2018-07-08 Thread Sergio Paracuellos
This patch series clean up a bit mt7621-pci driver. Changes from v2: - It includes new 17 patches from PATCH 2 to PATCH 18 - PATCH 1 was send before alone and is being included as it is in this new series. Hope this helps. Best regards, Sergio Paracuellos Sergio Paracuellos

[PATCH v2 02/18] staging: mt7621-pci: simplify pci dependant registers arithmetics

2018-07-08 Thread Sergio Paracuellos
mt7621_pci_reg_[read|write] functions where the base is neing taking into account to get and do the correct operations. Register useds along the code modified to use the new approach. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 81 - 1 file

[PATCH v2 16/18] staging: mt7621-pci: fix and remove some comments

2018-07-08 Thread Sergio Paracuellos
There are some comments not needed at all. Remove them. Adjust one comment to follow kernel style. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621

[PATCH v2 10/18] staging: mt7621-pci: factor out mt7621_pci_enable function

2018-07-08 Thread Sergio Paracuellos
Factor out mt7621_pci_enable function to avoid duplicate code in driver probe function. This increase readability. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 36 ++--- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git

[PATCH v2 06/18] staging: mt7621-pci: make ASSERT_SYSRST_PCIE and DEASSERT_SYSRST_PCIE inline functions

2018-07-08 Thread Sergio Paracuellos
ASSERT_SYSRST_PCIE and DEASSERT_SYSRST_PCIE are defined as preprocessor macros and can be defined as inline functions instead which are preferred. Do it and rename to mt7621_pcie_assert_sysrst and mt7621_pcie_deassert_sysrst respectively. Signed-off-by: Sergio Paracuellos --- drivers/staging

[PATCH v2 03/18] staging: mt7621-pci: avoid pointer arithmetics in some macros

2018-07-08 Thread Sergio Paracuellos
RALINK_PCI_MEMBASE, RALINK_PCI_IOBASE, RALINK_PCI_PCICFG_ADDR and RALINK_PCI_PCIMSK_ADDR are using very ugly pointer arithmetics to read and write along the code. Instead of doing this, use the mt7621_pci_reg_read and mt7621_pci_reg_write functions making this a bit cleaner. Signed-off-by: Sergio

[PATCH v2 18/18] staging: mt7621-pci: add SPDX identifier

2018-07-08 Thread Sergio Paracuellos
which can be used instead of the full boiler plate text. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 28 ++-- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt762

[PATCH v2 04/18] staging: mt7621-pci: use BIT macro in definitions

2018-07-08 Thread Sergio Paracuellos
There are some definitions which are using its custom implementation of BIT macro. Just just BIT macro instead. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a

[PATCH v2 12/18] staging: mt7621-pci: add blank line between declarations and code statements

2018-07-08 Thread Sergio Paracuellos
There was a missing line between declarations and code statements in function setup_cm_memory_region. this improves readability. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/mt7621-pci/pci

[PATCH v2 01/18] staging: mt7621-pci: refactor pci related read and writes functions

2018-07-08 Thread Sergio Paracuellos
to easily obtain config address. Also to get pci base address a global 'mt7621_pci_base' variable has been included and initialized as a pointer to RALINK_PCI_BASE in driver probe function. With this changes LOC is clearly decreased and readability is increased. Signed-off-by

[PATCH v2 08/18] staging: mt7621-pci: factor out mt7621_pci_enable_irqs and mt7621_pci_disable

2018-07-08 Thread Sergio Paracuellos
set fields. Controller number will be the array index 'pcie_controllers' which subs the 'offsets' array. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 120 ++-- 1 file changed, 67 insertions(+), 53 deletions(-) diff

[PATCH v2 15/18] staging: mt7621-pci: add some common calculations to mt7621_pci_get_cfgaddr

2018-07-08 Thread Sergio Paracuellos
In places where function mt7621_pci_get_cfgaddr is being used, there is a common pattern that could be included inside mt7621_pci_get_cfgaddr. Include it improving readability. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 20 1 file

[PATCH v2 05/18] staging: mt7621-pci: use read and writes in set_pcie_phy function

2018-07-08 Thread Sergio Paracuellos
set_pcie_phy can be refactor to use mt7621_pci_reg_write and mt7621_pci_reg_read functions intead of use pointer arithmetics. Use them and simplify implicated calls and definitions along the code. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 122

[PATCH v2 07/18] staging: mt7621-pci: rewrite [read|write]_config functions

2018-07-08 Thread Sergio Paracuellos
to those function to match the new prototypes. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 56 - 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-

[PATCH v2 13/18] staging: mt7621-pci: remove unused preprocessor defines

2018-07-08 Thread Sergio Paracuellos
There are a lot of definitions that are not being used at all. Just remove them cleaning the code a bit. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 20 ++-- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/drivers/staging/mt7621

[PATCH v2 14/18] staging: mt7621-pci: rename RALINK_PCI_CONFIG_DATA_VIRTUAL_REG definition

2018-07-08 Thread Sergio Paracuellos
RALINK_PCI_CONFIG_DATA_VIRTUAL_REG is a very long name and makes lines to be very long when it is used. Rename it to a shorter one RALINK_PCI_CONFIG_DATA. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions

[PATCH v2 11/18] staging: mt7621-pci: factor out mt7621_pci_configure function

2018-07-08 Thread Sergio Paracuellos
Factor out mt7621_pci_configure function to avoid a lot of duplicated code in driver probe function. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 35 - 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/drivers

Re: [PATCH v2 00/18] Some cleanups

2018-07-08 Thread Sergio Paracuellos
On Sun, Jul 8, 2018 at 3:14 PM, Greg KH wrote: > On Sun, Jul 08, 2018 at 02:57:08PM +0200, Sergio Paracuellos wrote: >> This patch series clean up a bit mt7621-pci driver. > > Your subject line for the 00/XX email needs some work (like putting what > driver and subsystem it i

Re: [PATCH v2 18/18] staging: mt7621-pci: add SPDX identifier

2018-07-08 Thread Sergio Paracuellos
On Sun, Jul 8, 2018 at 3:16 PM, Greg KH wrote: > On Sun, Jul 08, 2018 at 02:57:26PM +0200, Sergio Paracuellos wrote: >> It's good to have SPDX identifiers in driver files to make it easier to >> audit the kernel tree for correct licenses. >> >> Fix up the one of s

Re: [PATCH v2 18/18] staging: mt7621-pci: add SPDX identifier

2018-07-08 Thread Sergio Paracuellos
On Sun, Jul 8, 2018 at 4:22 PM, Greg KH wrote: > On Sun, Jul 08, 2018 at 04:06:08PM +0200, Sergio Paracuellos wrote: >> On Sun, Jul 8, 2018 at 3:16 PM, Greg KH wrote: >> > On Sun, Jul 08, 2018 at 02:57:26PM +0200, Sergio Paracuellos wrote: >> >> It's good to ha

Re: [PATCH] staging: mt7621-pci: refactor pci related read and writes functions

2018-07-08 Thread Sergio Paracuellos
On Sun, Jul 8, 2018 at 5:36 PM, Greg KH wrote: > On Sat, Jul 07, 2018 at 09:48:37PM +0200, Sergio Paracuellos wrote: >> This commit simplifies and clean a lot of stuff related with pci >> reads and writes. It deletes a lot of not needed at all functions >> and use kernel arc

Re: [PATCH 13/18] staging: mt7621-pinctrl: make use of pinctrl_utils_reserve_map

2018-07-08 Thread Sergio Paracuellos
On Mon, Jul 09, 2018 at 08:48:14AM +1000, NeilBrown wrote: > On Thu, Jun 07 2018, Sergio Paracuellos wrote: > > > Function rt2880_pinctrl_dt_node_to_map was using 'kzalloc' to > > reserve map memory. There is a 'pinctrl_utils_reserve_map' to > > do th

Re: [PATCH 13/13] staging: mt7621-pinctrl: replace core_initcall_sync with builtin_platform_driver

2018-07-08 Thread Sergio Paracuellos
On Mon, Jul 09, 2018 at 09:40:18AM +1000, NeilBrown wrote: > On Thu, Jun 28 2018, Sergio Paracuellos wrote: > > > We don't really need initialization of this at such an early stage. > > Just use builtin_platform_driver to initialize this driver. > > > >

Re: [PATCH] staging: mt7621-pci: refactor pci related read and writes functions

2018-07-08 Thread Sergio Paracuellos
On Mon, Jul 09, 2018 at 07:16:41AM +1000, NeilBrown wrote: > On Sun, Jul 08 2018, Sergio Paracuellos wrote: > > > > I can try to split this a bit but I don't really know how to do atomic > > changes because > > of the related things included here. > > Some su

Re: [PATCH v2 03/18] staging: mt7621-pci: avoid pointer arithmetics in some macros

2018-07-08 Thread Sergio Paracuellos
On Mon, Jul 09, 2018 at 09:13:02AM +1000, NeilBrown wrote: > On Sun, Jul 08 2018, Sergio Paracuellos wrote: > > > RALINK_PCI_MEMBASE, RALINK_PCI_IOBASE, RALINK_PCI_PCICFG_ADDR and > > RALINK_PCI_PCIMSK_ADDR are using very ugly pointer arithmetics to > > read and write al

Re: [PATCH v2 00/18] Some cleanups

2018-07-08 Thread Sergio Paracuellos
On Mon, Jul 09, 2018 at 11:08:58AM +1000, NeilBrown wrote: > On Sun, Jul 08 2018, Sergio Paracuellos wrote: > > > This patch series clean up a bit mt7621-pci driver. > > > > Changes from v2: > > - It includes new 17 patches from PATCH 2 to PATCH 18 > >

<    1   2   3   4   5   6   7   8   9   10   >