Function 'to_mediatek_gpio' cannot return NULL, so this NULL
checkings are pointless.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 9 -
1 file changed, 9 deletions(-)
diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c
b/drivers/staging/mt7621
Update kernel doc for mtk_data and also remove no needed
documentation for mtk_gc which is clear enough to don't
need it.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 15 +++
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/drivers
There was two remaining defines which weren't properly
aligned with the rest. Align them improving readability.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/mt7621-gpio
Now that all seems to be working these are the last minor
cleanups in order to make a second try to get this out
of staging.
Sergio Paracuellos (7):
staging: mt7621-gpio: remove no more necessary PIN_MASK macro
staging: mt7621-gpio: update kerneldoc for state containers
staging: mtk7621
On Tue, Jun 12, 2018 at 12:33:42PM +1000, NeilBrown wrote:
> On Mon, Jun 11 2018, Sergio Paracuellos wrote:
>
> > After submiting this driver to try to get mainlined and get
> > out of staging some new cleanups seems to be necessary.
> > According to this main of Lin
On Tue, Jun 12, 2018 at 12:01:38PM +1000, NeilBrown wrote:
> On Mon, Jun 11 2018, Sergio Paracuellos wrote:
>
> > On Mon, Jun 11, 2018 at 06:33:44PM +1000, NeilBrown wrote:
> >> On Mon, Jun 11 2018, Sergio Paracuellos wrote:
> >>
> >> > After submiting t
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/pinctrl-rt2880.c | 16
This commit replaces all 'unsigned' type declarations along
the driver code in favour of the preferred one 'unsigned int'.
This also silence checkpatch script warnings about this issue.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 27
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
This commit replaces ENOSYS return with ENOTSUPP silencing the
following checkpatch warning:
WARNING: ENOSYS means 'invalid syscall nr' and nothing else
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion
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 insertion
Call to kernel function 'devm_kzalloc' has no space between one
of its parameters and checkpatch script complains about. Fix it.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers
This commit silence checkpatch warnings about lines which
exceeds 80 chars. Some devm_kzalloc has been modified with
dev_kcalloc to get this lines more properly indented.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 34 +++--
1 file
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, 24 insertions(+), 24 deletions
, which can be used instead of
the full boiler plate text.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c
b/drivers/staging/mt7621-pinctrl
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 deletions(-)
diff
Messages when memory allocation fails are not needed at all
and checkpatch script complains about them. Remove one in this
driver code.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git
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
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
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, 9 insertions(+), 3
We don't really need initialization of this at such an early stage.
Just use module_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/drivers
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/pinctrl-rt2880.c | 7 +++
1 file
'
- PATCH 15: use 'for_each_node_with_property' to count groups nodes.
The rest of patches are the same.
Best regards,
Sergio Paracuellos
Sergio Paracuellos (18):
staging: mt7621-pinctrl: add SPDX identifier
staging: mt7621-pinctrl: replace 'unsigned' types with 'unsigned int
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
' 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/mt7621-pinctrl/pinctrl-rt2880.c | 58 +++--
1 file
that have to be changed because there unlikely work properly.
>
> regards,
> dan carpenter
>
Best regards,
Sergio Paracuellos
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
On Fri, Jun 08, 2018 at 02:20:20PM +0300, Dan Carpenter wrote:
> On Thu, Jun 07, 2018 at 01:00:48PM +0200, Sergio Paracuellos wrote:
> > This commit silence checkpatch warnings about lines which
> > exceeds 80 chars. In some cases to improve code redability
> > temporal 'si
On Mon, Jun 18, 2018 at 10:53:31AM +0200, Greg KH wrote:
> On Mon, Jun 18, 2018 at 09:07:57AM +0200, 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 t
H 7. Avoid the
use of a switch-case statement which was wrong and
distinc if we have RISSING AND FALLING EDGE interrupt
or HIGH LOW level ones. This last two are exclusive and
cannot be generated at the same time.
Hope this helps.
Thanks in advance.
Best regards,
Sergio P
This chip support high level and low level interrupts. Those
have to be implemented also to get a complete and clean driver.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 47 ---
1 file changed, 37 insertions(+), 10 deletions
Update kernel doc for mtk_data and also remove no needed
documentation for mtk_gc which is clear enough to don't
need it.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 15 +++
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/drivers
PIN_MASK macro was being used because of the fact we were only
using one interrupt controller for all of the gpio chips. This
has been changed to use one per gpio chip and each has 32 irqs.
Because of this this macro is not needed anymore. Use BIT macro
instead.
Signed-off-by: Sergio Paracuellos
There is no need to check for 'pending' before loop over the
interrupts using 'for_each_set_bit' if nothing is set the
return values will be the same so just avoid this check avoiding
also one level intentation and improving readability.
Signed-off-by: Sergio Paracuellos
---
drivers/staging
ll: 'mt7621-bank[0-2]'.
Create a new 'mediatek_gpio_bank_name' function which return the
name depending on the bank number. This function is allways called
with a valid index 0, 1 or 2.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 14 --
1 fil
This driver is actually platform-agnostic. Add COMPILE_TEST for
the compilation test coverage.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/mt7621-gpio/Kconfig
b/drivers/staging
write and
read functions which are being used for remaining irq handling
stuff have been updated also as well as its dependencies along
the code.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/Kconfig | 1 +
drivers/staging/mt7621-gpio/gpio-mt7621.c | 136
Function 'to_mediatek_gpio' cannot return NULL, so this NULL
checkings are pointless.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 9 -
1 file changed, 9 deletions(-)
diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c
b/drivers/staging/mt7621
' with the
device from 'mediatek_request_resources' function.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 42 +++
1 file changed, 37 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c
b/drivers/staging
This commit adds kerneldoc for the two data containers in
order to better understanding of its existence.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/drivers/staging/mt7621-gpio/gpio
This driver was being registered using 'module_platform_driver'
but it is not a module at all. Instead of this use
'builtin_platform_driver' which seems to be the correct one.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 2 +-
1 file changed, 1 insertion
Including file '' should be avoided in
new drivers code, so just remove it because it is
no necessary at all.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c
b/drivers
There was two remaining defines which weren't properly
aligned with the rest. Align them improving readability.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/mt7621-gpio
accordly.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-dts/gbpc1.dts | 10 ++--
drivers/staging/mt7621-dts/mt7621.dtsi | 31 ++--
drivers/staging/mt7621-gpio/gpio-mt7621.c | 21
.../staging/mt7621-gpio/mediatek,mt7621-gpio.txt
If there is no interrupt defined in the dts 'irq_of_parse_and_map'
returns 0 and we should't set up interrupts for each gpio chip in
that case.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 42 ---
1 file changed, 22 insertions
Checkpatch script is complaining about a comment line
which exceeds 80 characteres. Just silence it.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c
domain from the gpio_chip in
'irq_find_mapping' function. Function 'mediatek_gpio_bank_probe'
has been moved a it to the botton to have all the irq related
functions together and avoid some forward declarations to resolve
some symbols along the code.
Signed-off-by: Sergio Paracuellos
---
drivers
Kconfig is using a generic 'Mediatek GPIO Support' in
description and help which is not specific at all about
the current SoC which is MT7621. Update it.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
Hi Rob,
Thanks for your time in reviewing this.
On Tue, Jun 12, 2018 at 10:56 PM, Rob Herring wrote:
> On Sat, Jun 02, 2018 at 09:30:10AM +0200, Sergio Paracuellos wrote:
>> Add a devicetree binding documentation for the mt7621 driver.
>
> Bindings are for h/w, not a driver.
On Wed, Jun 13, 2018 at 01:28:35PM -0600, Rob Herring wrote:
> On Wed, Jun 13, 2018 at 10:23 AM, Sergio Paracuellos
> wrote:
> > Hi Rob,
> >
> > Thanks for your time in reviewing this.
> >
> > On Tue, Jun 12, 2018 at 10:56 PM, Rob Herring wrote:
> >
This commit adds kerneldoc for the two data containers in
order to better understanding of its existence.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/drivers/staging/mt7621-gpio/gpio
This chip support high level and low level interrupts. Those
have to be implemented also to get a complete and clean driver.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 47 ---
1 file changed, 37 insertions(+), 10 deletions
' with the
device from 'mediatek_request_resources' function.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 42 +++
1 file changed, 37 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c
b/drivers/staging
ll: 'mt7621-bank[0-2]'.
Create a new 'mediatek_gpio_bank_name' function which return the
name depending on the bank number. This function is allways called
with a valid index 0, 1 or 2.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 14 --
1 fil
PIN_MASK macro was being used because of the fact we were only
using one interrupt controller for all of the gpio chips. This
has been changed to use one per gpio chip and each has 32 irqs.
Because of this this macro is not needed anymore. Use BIT macro
instead.
Signed-off-by: Sergio Paracuellos
domain from the gpio_chip in
'irq_find_mapping' function. Function 'mediatek_gpio_bank_probe'
has been moved a it to the botton to have all the irq related
functions together and avoid some forward declarations to resolve
some symbols along the code.
Signed-off-by: Sergio Paracuellos
---
drivers
level ones. This last two are exclusive and
cannot be generated at the same time.
Hope this helps.
Thanks in advance.
Best regards,
Sergio Paracuellos
Sergio Paracuellos (18):
staging: mt7621-gpio: make use 'bgpio_init' from GPIO_GENERIC
staging: mt7621-gpio: avoid including 'gpio.h'
Including file '' should be avoided in
new drivers code, so just remove it because it is
no necessary at all.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c
b/drivers
This driver was being registered using 'module_platform_driver'
but it is not a module at all. Instead of this use
'builtin_platform_driver' which seems to be the correct one.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 2 +-
1 file changed, 1 insertion
There is no need to check for 'pending' before loop over the
interrupts using 'for_each_set_bit' if nothing is set the
return values will be the same so just avoid this check avoiding
also one level intentation and improving readability.
Signed-off-by: Sergio Paracuellos
---
drivers/staging
Function 'to_mediatek_gpio' cannot return NULL, so this NULL
checkings are pointless.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 9 -
1 file changed, 9 deletions(-)
diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c
b/drivers/staging/mt7621
There was two remaining defines which weren't properly
aligned with the rest. Align them improving readability.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/mt7621-gpio
Checkpatch script is complaining about a comment line
which exceeds 80 characteres. Just silence it.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c
This driver is actually platform-agnostic. Add COMPILE_TEST for
the compilation test coverage.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/mt7621-gpio/Kconfig
b/drivers/staging
accordly.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-dts/gbpc1.dts | 10 ++--
drivers/staging/mt7621-dts/mt7621.dtsi | 31 ++--
drivers/staging/mt7621-gpio/gpio-mt7621.c | 19 +++
.../staging/mt7621-gpio/mediatek,mt7621-gpio.txt
write and
read functions which are being used for remaining irq handling
stuff have been updated also as well as its dependencies along
the code.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/Kconfig | 1 +
drivers/staging/mt7621-gpio/gpio-mt7621.c | 136
If there is no interrupt defined in the dts 'irq_of_parse_and_map'
returns 0 and we should't set up interrupts for each gpio chip in
that case.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 42 ---
1 file changed, 22 insertions
Update kernel doc for mtk_data and also remove no needed
documentation for mtk_gc which is clear enough to don't
need it.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 15 +++
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/drivers
Kconfig is using a generic 'Mediatek GPIO Support' in
description and help which is not specific at all about
the current SoC which is MT7621. Update it.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
On Thu, Jun 14, 2018 at 4:17 PM, Linus Walleij wrote:
> On Thu, Jun 14, 2018 at 6:45 AM, Sergio Paracuellos
> wrote:
>
>> Ok, so... does the following single node sounds acceptable?
>>
>> gpio: gpio@600 {
>> #gpio-cells = <2>;
>> #interrupt-ce
accordly.
Signed-off-by: Sergio Paracuellos
---
Changes in v2:
Last patch in previous 'last cleanups' series is wrong passing
around a not initialized 'bank' to the 'mediatek_gpio_bank_probe'
function. Fix it here and because that patch is the last one in
the series just only resend this.
drivers
On Fri, Jun 8, 2018 at 1:59 PM, Linus Walleij wrote:
> Hi Sergio!
>
> Thanks for your patch!
Hi Linus,
First of all, thanks for your feedback and effort reviewing this.
>
> On Sat, Jun 2, 2018 at 9:30 AM, Sergio Paracuellos
> wrote:
>
>> Add driver support for gpio
ee banks until you find a hit, provided
> you code it up properly.
Ok, I'll give it a try to use this also.
>
> There were some problems with removing an irqchip like
> that but your driver is anyway a bool so I think it might work
> just fine.
>
> Yours,
> Linus Walleij
Thanks again
write and
read functions which are being used for remaining irq handling
stuff have been updated also as well as its dependencies along
the code.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/Kconfig | 1 +
drivers/staging/mt7621-gpio/gpio-mt7621.c | 136
irq_domain. Correct me if I am wrong, please.
Hope this helps.
Thanks in advance.
Best regards,
Sergio Paracuellos
Sergio Paracuellos (7):
staging: mt7621-gpio: make use 'bgpio_init' from GPIO_GENERIC
staging: mt7621-gpio: avoid including 'gpio.h'
staging: mt7621-gpio: make use
This commit adds kerneldoc for the two data containers in
order to better understanding of its existence.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/drivers/staging/mt7621-gpio/gpio
Including file '' should be avoided in
new drivers code, so just remove it because it is
no necessary at all.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c
b/drivers
This driver is actually platform-agnostic. Add COMPILE_TEST for
the compilation test coverage.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/mt7621-gpio/Kconfig
b/drivers/staging
This driver was being registered using 'module_platform_driver'
but it is not a module at all. Instead of this use
'builtin_platform_driver' which seems to be the correct one.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 2 +-
1 file changed, 1 insertion
This chip support high level and low level interrupts. Those
have to be implemented also to get a complete and clean driver.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 51 +++
1 file changed, 38 insertions(+), 13 deletions
' with the
device from 'mediatek_request_resources' function.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 42 +++
1 file changed, 37 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c
b/drivers/staging
domain from the gpio_chip in 'irq_find_mapping' function.
Function 'mediatek_gpio_bank_probe' has been moved a it to the
botton to have all the irq related functions together and avoid
some forward declarations to resolve some symbols along the code.
Signed-off-by: Sergio Paracuellos
---
Changes in v2
domain from the gpio_chip in 'irq_find_mapping' function.
Function 'mediatek_gpio_bank_probe' has been moved a it to the
botton to have all the irq related functions together and avoid
some forward declarations to resolve some symbols along the code.
Signed-off-by: Sergio Paracuellos
---
Changes in v3
write and
read functions which are being used for remaining irq handling
stuff have been updated also as well as its dependencies along
the code.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/Kconfig | 1 +
drivers/staging/mt7621-gpio/gpio-mt7621.c | 136
This driver is actually platform-agnostic. Add COMPILE_TEST for
the compilation test coverage.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/mt7621-gpio/Kconfig
b/drivers/staging
This driver was being registered using 'module_platform_driver'
but it is not a module at all. Instead of this use
'builtin_platform_driver' which seems to be the correct one.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 2 +-
1 file changed, 1 insertion
Paracuellos
Sergio Paracuellos (8):
staging: mt7621-gpio: make use 'bgpio_init' from GPIO_GENERIC
staging: mt7621-gpio: avoid including 'gpio.h'
staging: mt7621-gpio: make use of 'builtin_platform_driver'
staging: mt7621-gpio: implement '.irq_[request|release]_resources'
functions
' with the
device from 'mediatek_request_resources' function.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 42 +++
1 file changed, 37 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c
b/drivers/staging
Including file '' should be avoided in
new drivers code, so just remove it because it is
no necessary at all.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c
b/drivers
This commit adds kerneldoc for the two data containers in
order to better understanding of its existence.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/drivers/staging/mt7621-gpio/gpio
domain from the gpio_chip in
'irq_find_mapping' function. Function 'mediatek_gpio_bank_probe'
has been moved a it to the botton to have all the irq related
functions together and avoid some forward declarations to resolve
some symbols along the code.
Signed-off-by: Sergio Paracuellos
---
drivers
This chip support high level and low level interrupts. Those
have to be implemented also to get a complete and clean driver.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 47 ---
1 file changed, 37 insertions(+), 10 deletions
On Mon, Jun 11, 2018 at 06:33:44PM +1000, NeilBrown wrote:
> On Mon, Jun 11 2018, Sergio Paracuellos wrote:
>
> > After submiting this driver to try to get mainlined and get
> > out of staging some new cleanups seems to be necessary.
> > According to this main of Lin
On Mon, Jun 11, 2018 at 06:26:09PM +1000, NeilBrown wrote:
> On Mon, Jun 11 2018, Sergio Paracuellos wrote:
>
> > Instead of create a custom irq_domain for this chip, use
> > 'gpiochip_set_chained_irqchip' from GPIOLIB_IRQCHIP. It
> > is ok to call this function seve
There is no special gain in using pointers for 'gc_map' inside
'mtk_data' structure. We know the number of banks which is fixed
to MTK_BANK_CNT and we can just statically allocate them without
using kernel allocators.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621
after previous series which are
before in this mail thread.
Hope this helps.
Best regards,
Sergio Paracuellos
Sergio Paracuellos (6):
staging: mt7621-dts: fix property #interrupt-cells for the gpio node
staging: mt7621-gpio: dt-bindings: update documentation for
#interrupt-cells
Function to_mediatek_gpio can directly return without declaring
anything else in its body improving readability. Also change
pointer '*' declaration to be with return type in the upper line.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 10 +++---
1 file
This commit update documentation for #interrupt-cells property in
the gpio node which has been changed from '1' to '2'.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/mediatek,mt7621-gpio.txt | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git
This commit reviews driver includes reordering them in
alphabetic order. This improves readability.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621
There are macros in gpio kernel's headers to define direction
of a gpio. Use them instead of return custom '0' and '1' values.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging
Most gpio chips have two cells for interrupts and this should be also.
Set this property accordly fixing this up.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-dts/mt7621.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/mt7621-dts/mt7621
601 - 700 of 1965 matches
Mail list logo